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

Knut Urdalen's Blog: ORM the manual way

Travis Swicegood's Blog: Why Inheritance Sucks

VG Tech: Inheriting Configuration in Zend Framework 2 Applications

Matthew Weir O'Phinney's Blog: Start Writing Embeddable Applications

Anthony Ferrara's Blog: In Response To: Building Secured Web Applications Using PHP - The Basics


Community Events





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


community conference security tool release voicesoftheelephpant framework introduction language podcast symfony artisanfiles composer library opinion interview laravel version list series

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