Is it better to split a MVC project into multiple projects?

Is it better to split a MVC project into multiple projects?

Maintainability is about clean code, small methods, small classes each having a single responsibility and limited coupling between these classes. Splitting a project with with fat classes and fat methods into BLL/DAL projects doesn’t improve the maintainability of your software.

Why are partial classes used in ASP.NET MVC?

Partial classes allow you to spread your class across multiple files. That way you can group relevant areas of your controller into separate files, and yet they’ll all still be part of the same controller. e.g. I would not want to have 50 controllers.

What are the different tiers of ASP.NET MVC?

Web applications are often inherently multi-tired. In a web application we often have the following tiers: Client/Presentation Tier: That’s the piece running inside the user’s browser. Middle/Application/Logic Tier: That’s the part built with ASP.NET MVC (or other similar server-side frameworks) running in a web server.

When do you need more than one MVC controller?

E.g. if you have multiple administrative/HR-type use cases which are likely to be available to a limited group of people, bundle those in one controller. Other controllers could be organized around specific domain model objects – e.g. self-service leave management, salary queries etc.

Can you have multiple applications in one portal?

2- Multiple applications under a single portal: Another use case that one of the readers suggested is where you have multiple small applications that are hosted in a single portal. So, from the end user’s point of view these applications are not separate; they are all different domains of the same application.

When to split a project into multiple assemblies?

Assemblies are units of versioning and deployment. Split a project into multiple projects if you want to re-use certain parts of that in other projects, or if you want to independently version and deploy each project. As always, keep it simple! If you enjoyed this post, please share it with your friends.