You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Surely the repository would be for the top level object and then you would have methods on the repository to retrieve anything it requires from that top level object.
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 :
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 ?
How to handle a situation in which I have inheritance in Repositories ?
Object Foo
Object Bar
My apologies if it's off topic
BR
Refael
The text was updated successfully, but these errors were encountered: