Of Models / Entities and N-tier applications
Posted
by Jonn
on Stack Overflow
See other posts from Stack Overflow
or by Jonn
Published on 2010-05-03T15:44:46Z
Indexed on
2010/05/03
15:48 UTC
Read the original article
Hit count: 262
n-tier-architecture
|model
I've only discovered a month ago the folly of directly accessing entities / models from the data access layer of an n-tier app. After reading about ViewModels while studying ASP.NET MVC, I've come to understand that to make a truly extensible application the model that the UI layer interacts with must be different from the one that the Data Access layer has access to.
But what about the Business layer? Should I have a different set of models for my business layer as well? For true separation of concern, should I have a specific set of models that are relevant only to my business layer so as not to mess around with any entities (possibly generated by for example, the entity framework, or EJB) in the DAL or would that be overkill?
© Stack Overflow or respective owner