Skip to content

(All) Avoiding Repositories overhead #288

Open
@refaelraz

Description

@refaelraz

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 :

  1. 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 ?
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions