Closed papyr closed 6 years ago
Hi Papi,
http://www.aspnetboilerplate.com/Pages/Documents/NLayer-Architecture is worth a read and there is also the http://www.codeproject.com/Articles/768664/Introduction-to-ASP-NET-Boilerplate which provides some context.
HTH's
Thank man, I have been reading this. Its chunked up and I have like 10 sheets printed on the floor to understand this 😆 BTW I am now follower you hahahaha
I'm using ASP .NET MVC, and I have both controllers and application services (I don't use fornt-end framework).
Should my controllers use application services? Logic should be in my controllers or in my application services?
Is it "legit" or "normal" to put some logic inside my controller, or these should only call application services?
Placing the logic in your controllers is generally not a good idea. It means code re-use is low and code complexity goes up. Generally your logic should be in your application layer.
The reason for this is that you can call it from your Web/Presentation layer(s) ie MVC, WebApi and the logic is all in one place. Also say you wanted to add Angualar front end then you call your application layer and things "just work".
There is also another school of thought that you should use a mediator patter to further keep your presentation layer thinner. You can have a read of:
The key here is:
Hi, When will an architectural picture be put up?
Hi @papyr,
There is the pic in readme file. https://github.com/aspnetboilerplate/aspnetboilerplate
Hello, it would be nice to have a simple picture similar to this, where we know which boxes are mandatory.
I am working on simplifying the patterns.
-Papi