Multiple domain objects and repositories to support different uses of the same entity? -


i developing application allows users track work-order status. default interface lists open work-orders , allows users update status of individual work-order. list 'live' in update when changes made other users on other workstations.

there optional ui used infrequently (but required) list work-orders current day (w/o open @ point during day). users cannot make changes list , list static, i.e. snapshot @ time list displayed , not 'live'.

work-order data retrieved back-end service. service contract can updated needed.

my issue modeling domain around 2 use-cases workorder entity. have 2 views , associated view models in presentation layer, should have 2 separate domain objects , repositories?

additional info:

  • the "all" view accessed infrequently , end of business day, list quite large , require sizable amount of memory if cached on client.
  • the "current" view kept in-sync changes other users handling broadcast event/notification indicating changes made , refreshing list.

you don't need separate workorder entities since same work order concept present in both views, may need distinct read-models represent entities in specific types of queries. read model read only, data object designed fit particular query.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -