mardi 4 août 2015

Mapping "Data access objects" and "domain model objects" in Android app

I consider to use data access layer objects (managed by an ORM) and map them to domain model objects, so that the model objects are independent of ORM and database specific dependencies.

So the application would have "parallel" classes like

  • Order and OrderDA
  • OrderLine and OrderLineDA

(data access layer classes are suffixed with "DA")

Are there architectural design pattern which I can use? For example if I remove a OrderLine object from the domain layer Order object, how do I apply this also to the data access layer, when I do not want to include database specific record ID in the domain object?

Aucun commentaire:

Enregistrer un commentaire