Multilayered architecture

Why use a multilayered architecture ?
Flexibility It's easier to understand, create, correct, upgrade a very specialized software component instead of a many-specialized one.
Crosscutting Concerns
Configuration Management
Exception Management
Logging and Instrumentation
State Management
Rich Domain vs Anaemic Domain
Domain Objects vs Persistence Model (ORM Entities)!-The-Domain-Model-Is-Not-The-Persistence-Model.aspx

Practical examples
ORM ids might differ the DO's identifier (if any).
In many-to-many relationships you might have methods to add an element to a collection and also to set the element's parent this object. This kind of ORM method might not exists/be necessary to DO (domain object).
ORM might need Formula properties but DO not.
ORM might need usage of @EntityListeners but DO not.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.