Is Model-View-Controller (MVC) the best pattern for developing web applications? It seems most of the frameworks in use follow that pattern- Rails, Django, and now ASP.net MVC.
views:
339answers:
8For a good comparison between ASP.NET MVC and ASP.NET WebForms:
http://www.asp.net/learn/mvc/tutorial-01-cs.aspx
(scroll down to Deciding When to Create an MVC Application)
I've been using web forms for the past few years, but after reading the sample MVC chapter Scott Guthrie published I am really excited for this new technology. I'm definitely not the person to say if it is the best, but it looks promising.
"Best" is a dangerous term to throw around.
It's a very popular design pattern, and there are a ton of frameworks across many languages that exist to follow that pattern.
Having done some MVC web apps recently, I can say that, for myself, it was a very great approach for the projects I was working on.
My guess to why it has become so popular is that there is a separation between application logic and the design. This means designers can work happily with the templates/design and not care about what the programmers are doing. Or, at least that is how it should work in theory.
Some responders seem to mix design patterns and frameworks that implement them. I think your question was more oriented towards patterns, so I would answer by giving my preference to the MVP pattern (Passive View variant) over MVC.
Reasons? I highly recommend reading "MVP: Model-View-Presenter: The Taligent Programming Model for C++ and Java " from the people who "invented" the pattern as an update of MVC.
Probably not the best but step in the right direction.
There is more than one MVC, by the way.
MVC is good for complex, frequently changed applicaitons. With simple web apps, its complexity is overkill.
Flat out NO.
Good, maybe. Best, no way.
If a team uses it and is in sych, awesome.
If a team picks it because it is the flavor of the month, alas.