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-Responder, Content Negotiation, and Routers
July 18, 2014 @ 10:17:57

In his latest post Paul Jones comes back to his proposed application structure, the idea of Action-Domain-Responder, and answers some questions about where content negotiation happens and routing.

While talking about Action-Domain-Responder on the Crafting Code Tour, one of the common questions I got was: "Where does content negotiation happen?" My response was always: "Where does it happen in Model-View-Controller?" That opened up a discussion on how content negotiation is a tricky bit that can go in different places, depending on how you want the concerns separated, and is not a problem specific to ADR.

He goes on and tries to answer the question a bit better, pointing out that "it's a problem for everyone" isn't really good enough to take action on. He works through the different pieces of the ADR pattern, trying to reason out where the right fit is. He suggests a "first filter" on the Controller level, more specifically at the Router level. That's not to say that the Router needs to know about content handling, but it does need to know how to pass that information on.

0 comments voice your opinion now!
action domain responder content negotiation routing

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

blog comments powered by Disqus

Similar Posts

DashExamples.com: Capture Content Security Policy (CSP) Violations in PHP

Matthew Weier O'Phinney: Better Understanding Controllers Through Basic Patterns

NewsForge: Choosing an open source CMS

Chris Hartjes' Blog: Tutorial: Integrating PHP/SWF Charts with CakePHP

IBM developerWorks: Accessing third-party content with oEmbed and PHP


Community Events

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


framework opinion wordpress language podcast laravel conference development api psr7 community laravel5 introduction extension voicesoftheelephpant release interview series library unittest

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