c# - MVC Web application architectural concern -
i have inherited mvc application designed along above project structure. application uses unity framework dependency injection, , user interactions go upstream database in following order view -> controller -> viewmodels -> repository services -> orm -> database
the infrastructure components used statically throughout application in different layers.
my question structure miss vital components in terms of best practices? , in essence correct?
you have split front-end part back-end part.
the front-end mvc application, consisting of models, view models, views , controllers, , in fact presentation layer.
the backend consists of:
- services layer
- application layer
- domain layer
- infrastructure layer
basically, controllers use services layer query information or send commands. gets models, transformed view models, passed dedicated views.
the services layer uses underlying application layer, uses domain layer , infrastructure layer query information or execute commands, or logging , tracing , other infrastructural concerns.
finally, if program against interfaces , inject instances using ioc container, can remove infrastructural dependencies domain , make testable , modular.
Comments
Post a Comment