What are the alternatives to MVC architecture for web development? [duplicate]

落爺英雄遲暮 提交于 2019-12-20 19:36:23

问题


Possible Duplicate:
Alternatives to the MVC

I have searched around for alternatives just to see what is available, but I can hardly find anything.

I've read in many articles that web MVC is never true MVC for some reasons too technical for me to really grasp. And it is sometimes suggested to look for something else, but what are the something elses, what are the other architecture types? Where can i read more about it? Can someone provide more details about what is available out there?

By the way, I already read about the 3 tiers architectures, which in my opinion is pretty similar, unless proven otherwise.

What else is there?


回答1:


An (already a bit older) blog post from Larry Garfield is the best ressource I know about this topic:

http://www.garfieldtech.com/blog/mvc-vs-pac




回答2:


Sorry, don't have any easy to digest comparisons. But there is for example the Model-View-Presenter pattern which has superseded MVC, and is actually closer to what most PHP frameworks practically do. http://richnewman.wordpress.com/2008/02/26/model-view-presenter-variations-on-the-basic-pattern-introduction-to-cabscsf-part-24/

Articles like http://c2.com/cgi/wiki?TemplatingInPhp assume that PHP itself is the best model for webapps, and patterns instead of templates don't add enough benefits.

Besides PAC, there is also Model-View-ViewModel (which is currently a hot topic in C# but not in PHP) and and Model-Delegate http://c2.com/cgi/wiki?ModelDelegate which expand upon MVC. But they might not be as useful for generic webapps either.




回答3:


Model-View-Controller is a pretty good concept, but the interpretation by a frameworks can be different. Typically "view" is a template with some logic in it. Model is often described as an XML or YAML document. Finally Controller is a piece of code in a programming language.

My proposed alternative is based around Object-Oriented design. View is an object. Model is an object. Controller is an object too. This opens posibilites to a higher level of efficiency, simplicity and code re-use.

This principle is implemented in my web development framework and I am also describing it in details in my blog post — Object Oriented MVC



来源:https://stackoverflow.com/questions/5931085/what-are-the-alternatives-to-mvc-architecture-for-web-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!