asp.net mvc - Application design using DDD -
i designing solution strucure application. planning use domain driven design. asp.net mvc , entity framework. need inputs in areas.
data access designed using entity framework code first reposirotires built on top of ef data acces domain model designed usind domain model on top of repositories application serveices built on top of damain layer ui developed on top of application services
the flow is
ui (controller) --> application service --> domain layer --> repositories --> data access --> data base.
i not clear of how share data in between layers.
my domain model can used sahre data between repositories, data access , domain layer. thinking way data should passed daomin layert application service , application service ui. can use dtos, not sure weather option or not, have models in domain model, view model in ui.
reuse domain model or ui model not good, make layers tightly coupled. it's difficult develop large scale applications way.
what think correct, application thin layer, it's bunch of actions called directly ui layer , information passed through object called actionparameter. actionparameters defined in application layer , actionparameter objects constructed on ui layer , passed application layer.
application retrieve data db via data access layer. query action need fetch data many source, different domain entities , data need projected, transformed or formatted before return ui layer. have actionresult objects contains data returned ui layer.
it seems there lot of codes think it's necessary. each layer has own purpose , when change one, other layers won't impacted.
Comments
Post a Comment