News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Jones:
Action-Domain-Response A Tentative MVC Refinement
May 07, 2014 @ 09:49:36

In his latest post Paul Jones has proposed a "tentative MVC refinement" as the structure behind your application. He suggests something called the action-domain-response pattern, focusing on some of the more common practices in web application development today instead of an ideal.

The term MVC has experienced some semantic diffusion from its original meaning, especially in a web context. Because of this diffusion, the Action-Domain-Response pattern description is intended as a web-specific refinement of the MVC pattern. I think ADR more closely fits what we actually do in web development on a daily basis. [...] We generally route and dispatch not to a controller class per se, but to a particular action method within a controller class. It is also partly revealed by the fact that we commonly think of the template as the View, when in a web context it may be more accurate to say that the HTTP response is the View. As such, I think ADR may represent a better separation of concerns than MVC does in a web context.

He goes through the structure he's worked up, showing the interaction between the parts and compares the flow to a typical MVC-based application. He also mentions a few other MVC pattern alternatives including Data-Context-Interaction and Model-View-ViewModel. He then gets into an actual code-based example using a typical blog application. He compares the directory structure and proposes that instead of one controller per file it becomes one action per file (and one response per file accordingly).

0 comments voice your opinion now!
modelviewcontroller mvc actiondomainresponse adr designpattern application

Link: http://paul-m-jones.com/archives/5970

blog comments powered by Disqus

Similar Posts

Vance Lucas' Blog: Protected vs Private Scope: Arrogance, Fear and Handcuffs

Redmond Developer News: What's Next for Microsoft and PHP?

iBuildings Blog: Verifying out software with OWASP ASVS

Bill Karwin's Blog: ActiveRecord does not suck

Michaelangelo van Dam' Blog: Configuring Zend Framework apps for Windows Azure


Community Events





Don't see your event here?
Let us know!


deployment update laravel symfony zendserver api release list opinion language package series interview podcast introduction library install community tips framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework