Search code examples
asp.net-mvcviewseparation-of-concernsmodular-design

How is ENFORCED the separation of concerns in ASP.NET MVC?


I have been studying, playing with and working with ASP.NET MVC since Preview 1 in 2007 (december). I have been a fan of it since 2008 and I support it all the way.

However I keep hearing and reading "ASP.NET MVC enforces a strict separation of concerns", including reading it in Professional ASP.NET MVC 1.0 by Rob Conery, Scott Hanselman, Phil Haack and Scott Guthrie.

What I don't understand is the enforcement. What if I define my controller with actions with nothing but

return View();

and in the view (aspx view engine) I do everything? (data fetching, business logic, decision making, rendering etc.)

How does it (ASP.NET MVC) ENFORCE me to separate the concerns?

I think this is a blatant overstatement and it should read "suggests a separation of concerns".

Can you convince me it enforces?


Solution

  • I don't think it enforces it, so they probably mispoke. Like you said, "suggests" or "promotes" is a better word.