Open
Description
Question - best practice for Repository
I know that Repository is a well known pattern but since all examples use this pattern, I believe it's worth the time to describe how to solve common Repositories scenarios.
It seems that applying Repositories for each Object will add a massive amount of overhead
but not doing so, will pollute the code.
example :
- Take a login scenario, I need to send a user name /pass to a server and receive a token
Building a Repository with remote rep to retrieve the token and a local one to store it will be a lot of overhead but to change it, I need to start separate my common communication layers that are being used from inside the Repository (for example - to the Presenters)
How to overcome that ? - Hierarchy -
How to handle a situation in which I have inheritance in Repositories ?
Object Foo
- Field fooProperty1,2.. (fields in objects of any kind)
- Field List barList (list of Bar object)
Object Bar
- Field...
My apologies if it's off topic
BR
Refael