Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Best architecture to be followed for an Asp.Net MVC web application

Best architecture to be followed for an Asp.Net MVC web application

Guest Post :

I would like to know what is the best architecture to be followed for an Asp.Net Mvc Web Application. Will creating a 3 tier architecture a good choice or it does not matter at all? Is having a business layer good choice or will business layer make the application look complex?

Solution :

Prefer to have a project with the Entity Framework model and "Manager" classes that have static methods to access the database through EF, then have another project that is the Mvc Web site. Bootstrap with KnockoutJS for the front, so it's talking to WebAPI controllers, which are "exposing" the managers from the business layer as needed. Some people like IoC patterns or dependency injection, your mileage may vary.

Depends on the size and complexity of the project. Domain driven design is suited for dealing with a lot of complexity. Check out the onion and hexagonal architectures. Microservices are something else to think about. I would say that TDD (test-driven development) should be a requirement for ALL non-trivial projects... just my opinion.

TDD is fine as long as people commit to maintain the associated test project. Some people forget that TDD is not a replacement for web site testing, users can find every error you left in. TDD is fine for the back-side code that is interfaced from the web site. Unit/integration testing are for developers. UAT should be left to program managers and stakeholders.

Clean coding, IMHO, is having good naming standards, project structures, proper error handling, and proper isolation/elimination of duplicate code. You can apply these techniques to any language and any coding model.

Users Please post your solution too.



This post first appeared on Asp.netSourceCodes, please read the originial post: here

Share the post

Best architecture to be followed for an Asp.Net MVC web application

×

Subscribe to Asp.netsourcecodes

Get updates delivered right to your inbox!

Thank you for your subscription

×