<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Going Controller-less in MVC: The Way Fowler Meant It To Be</title>
	<atom:link href="http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/</link>
	<description>Software development, testing, and techie life</description>
	<lastBuildDate>Thu, 08 Mar 2012 22:19:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Chad Myers</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1250</link>
		<dc:creator>Chad Myers</dc:creator>
		<pubDate>Tue, 03 May 2011 20:03:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1250</guid>
		<description>@HoyaBaptiste Yeah, I saw that and commented on Derek&#039;s post.  FubuMVC was built to allow ultimate flexibility in defining actions and routes that way YOU want to. I think Joshua Flanagan explained it well in his post &quot;FubuMVC: Define your actions your way&quot; http://lostechies.com/joshuaflanagan/2010/01/18/fubumvc-define-your-actions-your-way/

Here&#039;s a REST-y kinda controller I did for &quot;FubuDinner&quot; a year ago when I was playing around with rewriting NerdDinner in Fubu:
https://github.com/chadmyers/fubudinner/blob/master/src/FubuDinner.Web/Actions/Accounts/RegisterAction.cs

Note that it has a &quot;Query&quot; and a &quot;Command&quot; method that corresponds to GET and POST respectively.

Notice that Joshua&#039;s post that I linked above  is over a year old.  And this post is even older.  It was nearly impossible in ASP.NET MVC to do what we have been able to do naturally in FubuMVC since the beginning. It looks like only now (2+ years and 3 versions later), they&#039;re able to talk about single-action controllers.  I wonder if it&#039;ll take another 2+ years and 3 versions before they can do even half of all the myriad of ways we can define actions in FubuMVC :)
</description>
		<content:encoded><![CDATA[<p>@HoyaBaptiste Yeah, I saw that and commented on Derek&#8217;s post.  FubuMVC was built to allow ultimate flexibility in defining actions and routes that way YOU want to. I think Joshua Flanagan explained it well in his post &#8220;FubuMVC: Define your actions your way&#8221; <a href="http://lostechies.com/joshuaflanagan/2010/01/18/fubumvc-define-your-actions-your-way/" rel="nofollow">http://lostechies.com/joshuaflanagan/2010/01/18/fubumvc-define-your-actions-your-way/</a></p>
<p>Here&#8217;s a REST-y kinda controller I did for &#8220;FubuDinner&#8221; a year ago when I was playing around with rewriting NerdDinner in Fubu:<br />
<a href="https://github.com/chadmyers/fubudinner/blob/master/src/FubuDinner.Web/Actions/Accounts/RegisterAction.cs" rel="nofollow">https://github.com/chadmyers/fubudinner/blob/master/src/FubuDinner.Web/Actions/Accounts/RegisterAction.cs</a></p>
<p>Note that it has a &#8220;Query&#8221; and a &#8220;Command&#8221; method that corresponds to GET and POST respectively.</p>
<p>Notice that Joshua&#8217;s post that I linked above  is over a year old.  And this post is even older.  It was nearly impossible in ASP.NET MVC to do what we have been able to do naturally in FubuMVC since the beginning. It looks like only now (2+ years and 3 versions later), they&#8217;re able to talk about single-action controllers.  I wonder if it&#8217;ll take another 2+ years and 3 versions before they can do even half of all the myriad of ways we can define actions in FubuMVC :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1249</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 03 May 2011 13:16:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1249</guid>
		<description>@Chad: A comparable article was recently posted on LosTechies called &quot;Single Action Controllers with ASP.Net MVC&quot;  (http://lostechies.com/derekgreer/2011/04/29/single-action-controllers-with-asp-net-mvc/). Following SRP, Derek creates controllers with single Actions and uses routing to map requests to controllers. I&#039;d would like to hear your take on this approach.</description>
		<content:encoded><![CDATA[<p>@Chad: A comparable article was recently posted on LosTechies called &#8220;Single Action Controllers with ASP.Net MVC&#8221;  (<a href="http://lostechies.com/derekgreer/2011/04/29/single-action-controllers-with-asp-net-mvc/" rel="nofollow">http://lostechies.com/derekgreer/2011/04/29/single-action-controllers-with-asp-net-mvc/</a>). Following SRP, Derek creates controllers with single Actions and uses routing to map requests to controllers. I&#8217;d would like to hear your take on this approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad Myers</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1248</link>
		<dc:creator>Chad Myers</dc:creator>
		<pubDate>Mon, 02 May 2011 02:03:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1248</guid>
		<description>@SoundLogic: Read the Fowler link in the original post: &quot;The Front Controller consolidates all request handling by channeling requests through a single handler object. This object can carry out common behavior, which can be modified at runtime with decorators. The handler then dispatches to command objects for behavior particular to a request.&quot;

So yes, Front Controller sits in front and dispatches a bunch of Command Pattern commands. Front Controller != Command, but uses commands.

Repository is something different as it is intended primarily for database access (at leas the P of EAA version).  Though in FubuMVC there is an element of repository-type searching through all model to match routes to actions to views. But that all happens at initialization-time, not at run-time in FubuMVC. In ASP.NET MVC, it happens at run-time (figuring out which controller to execute for a given route).</description>
		<content:encoded><![CDATA[<p>@SoundLogic: Read the Fowler link in the original post: &#8220;The Front Controller consolidates all request handling by channeling requests through a single handler object. This object can carry out common behavior, which can be modified at runtime with decorators. The handler then dispatches to command objects for behavior particular to a request.&#8221;</p>
<p>So yes, Front Controller sits in front and dispatches a bunch of Command Pattern commands. Front Controller != Command, but uses commands.</p>
<p>Repository is something different as it is intended primarily for database access (at leas the P of EAA version).  Though in FubuMVC there is an element of repository-type searching through all model to match routes to actions to views. But that all happens at initialization-time, not at run-time in FubuMVC. In ASP.NET MVC, it happens at run-time (figuring out which controller to execute for a given route).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1247</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 01 May 2011 13:15:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1247</guid>
		<description>I realize I&#039;m a bit late to this party, but this all sounds like old patterns being re-branded -- coming from more of a Silverlight background, I believe this is similar to the &quot;Command Pattern&quot; (http://blogs.microsoft.co.il/blogs/gilf/archive/2008/06/23/command-pattern.aspx), although it seems to be referred to, more often, in MVC as the repository pattern. Would others agree? Or are these patterns vastly different to the extent that they deserve different names? </description>
		<content:encoded><![CDATA[<p>I realize I&#8217;m a bit late to this party, but this all sounds like old patterns being re-branded &#8212; coming from more of a Silverlight background, I believe this is similar to the &#8220;Command Pattern&#8221; (<a href="http://blogs.microsoft.co.il/blogs/gilf/archive/2008/06/23/command-pattern.aspx" rel="nofollow">http://blogs.microsoft.co.il/blogs/gilf/archive/2008/06/23/command-pattern.aspx</a>), although it seems to be referred to, more often, in MVC as the repository pattern. Would others agree? Or are these patterns vastly different to the extent that they deserve different names? </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex pedenko</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1019</link>
		<dc:creator>alex pedenko</dc:creator>
		<pubDate>Wed, 24 Jun 2009 12:40:29 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1019</guid>
		<description>That&#039;s actually one of the fundemental design principles in Bistro - (as sergio said - www.bistroframework.org). Aside from the f# piece (which isn&#039;t a requirement), the major premise there is that you bind controllers to aspects of a url, and multiple controllers service a single request, without being tightly coupled with each other. that way, your url becomes the first-class citizen you describe.</description>
		<content:encoded><![CDATA[<p>That&#8217;s actually one of the fundemental design principles in Bistro &#8211; (as sergio said &#8211; <a href="http://www.bistroframework.org" rel="nofollow">http://www.bistroframework.org</a>). Aside from the f# piece (which isn&#8217;t a requirement), the major premise there is that you bind controllers to aspects of a url, and multiple controllers service a single request, without being tightly coupled with each other. that way, your url becomes the first-class citizen you describe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1018</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Tue, 23 Jun 2009 08:08:05 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1018</guid>
		<description>I reallly like where this idea is headed Chad. Hope that some samples and code spikes come out so we can begin exploring it further. 

Even just having Controller&#039;s as actions with a Get/Post method is really a great start. </description>
		<content:encoded><![CDATA[<p>I reallly like where this idea is headed Chad. Hope that some samples and code spikes come out so we can begin exploring it further. </p>
<p>Even just having Controller&#8217;s as actions with a Get/Post method is really a great start. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Peters</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1017</link>
		<dc:creator>Andrew Peters</dc:creator>
		<pubDate>Tue, 23 Jun 2009 02:25:14 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1017</guid>
		<description>&quot;The limitations of our imaginations: That’s how we’ve always done MVC!&quot;

Not really true. In Java, this pattern has been around for donkeys years. For a good example, take a look at WebWork, which powers the Atlassian apps like Jira etc.</description>
		<content:encoded><![CDATA[<p>&#8220;The limitations of our imaginations: That’s how we’ve always done MVC!&#8221;</p>
<p>Not really true. In Java, this pattern has been around for donkeys years. For a good example, take a look at WebWork, which powers the Atlassian apps like Jira etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio Pereira</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1016</link>
		<dc:creator>Sergio Pereira</dc:creator>
		<pubDate>Tue, 23 Jun 2009 00:33:18 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1016</guid>
		<description>@James, you may want to take a look at Bistro (http://bistroframework.org/index.php?title=Bistro_Framework_Home), which is an F# MVC framework. 
</description>
		<content:encoded><![CDATA[<p>@James, you may want to take a look at Bistro (<a href="http://bistroframework.org/index.php?title=Bistro_Framework_Home" rel="nofollow">http://bistroframework.org/index.php?title=Bistro_Framework_Home</a>), which is an F# MVC framework. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Olson</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1015</link>
		<dc:creator>Jeff Olson</dc:creator>
		<pubDate>Mon, 22 Jun 2009 06:34:43 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1015</guid>
		<description>Well, everyone else is self-promoting in here, so what the heck. Here&#039;s my take on the problems discussed in this post: http://github.com/olsonjeffery/mercury

If you&#039;re interested in another (drastically) different approach to the issues of controller/action composition and how endpoints are exposed from the server to the client (which is a big chunk of what the controller/action mapping convention that is so popular in the &quot;non-stupid&quot; ASP.NET frameworks these days is about), you should really check out the marvelous Ruby-based Sinatra (http://www.sinatrarb.com/) framework. The excellent stuff going on in that framework is what is driving my current experiments in ASP.NET.

Try all you guys want to make MVC &quot;prettier&quot; and more intention-revealing in C#. The problem, though, is this: You&#039;re stuck using a crappy, general-purpose language to try and elegantly express what is really better expressed in other ways. And I don&#039;t think &quot;But! But! Tooling!&quot; is convincing enough of an argument, longterm, to justify this self-flagellation.

If you look at what the current state-of-the-art is with regard to web apps (rich js client, rich domain), you can pretty much see that the job of the actual web framework (grossly over-simplified: map data to/from the client/server) is 1) narrowly-scoped and 2) highly optimizable. 

Years of pounding the ideas of loose-coupling, SRP, DRY, etc into our heads has given us web applications mappings that are, when you get down to it, pretty damn anemic. All the data-access, behavior, etc lives in the domain or is abstracted out into the app service layer. We&#039;ve (hopefully) broken the cycle of abuse of using retarded server callbacks in rendered views in favor or much more easier testable js (javascript controllers/views, anyone?). We&#039;re using view engines that don&#039;t suck to compose tighter, less-entangled rendered views (that are becoming pretty anemic, themselves, as the js side of things gets more of a share of the the action). So what about what&#039;s left over? 

What I&#039;m saying this: The stuff we code at the web framework level (controllers, actions, behaviors, etc) is pretty damn rote, all in all. In other words: A perfect candidate for a DSL.

Enter things like Sinatra (or my own solution, which is still incubating and thus not heavily pimped, here).

You&#039;re gonna be stuck with chestnuts like overloading constructors of a class to model actions as long as you remain in the BDSM box of C# as your only way to do this kind of thing (to get the tired Matrix cliche out of the way: it&#039;s a prison for your mind).

The domain requires a rich language to be expressed fully; use C# there. The client requires a rich language to be expressed; go ahead and use js or whatever for that, as well.

But the web framework? Seriously. In statically typed .NET, the most complicated things it does is 1) deliver dependencies to 2) do query/command tasks to ultimately 3) map data to/from the client/server. period. Item 1 isn&#039;t that big of a deal in Ruby because you can monkey-patch that stuff away and bait-and-switch dependencies when testing. Oh yeah, and the web framework probably manages your security and session baggage, as well.

Anywho, I&#039;ll get off my soapbox, now. I just think that the entire discussion up until this point is predicated on the assumption that the job that web frameworks do is something that really *requires* verbose, convoluted solutions like those that&#039;re prevalent in the debate. We can do better, in my opinion.</description>
		<content:encoded><![CDATA[<p>Well, everyone else is self-promoting in here, so what the heck. Here&#8217;s my take on the problems discussed in this post: <a href="http://github.com/olsonjeffery/mercury" rel="nofollow">http://github.com/olsonjeffery/mercury</a></p>
<p>If you&#8217;re interested in another (drastically) different approach to the issues of controller/action composition and how endpoints are exposed from the server to the client (which is a big chunk of what the controller/action mapping convention that is so popular in the &#8220;non-stupid&#8221; ASP.NET frameworks these days is about), you should really check out the marvelous Ruby-based Sinatra (<a href="http://www.sinatrarb.com/" rel="nofollow">http://www.sinatrarb.com/</a>) framework. The excellent stuff going on in that framework is what is driving my current experiments in ASP.NET.</p>
<p>Try all you guys want to make MVC &#8220;prettier&#8221; and more intention-revealing in C#. The problem, though, is this: You&#8217;re stuck using a crappy, general-purpose language to try and elegantly express what is really better expressed in other ways. And I don&#8217;t think &#8220;But! But! Tooling!&#8221; is convincing enough of an argument, longterm, to justify this self-flagellation.</p>
<p>If you look at what the current state-of-the-art is with regard to web apps (rich js client, rich domain), you can pretty much see that the job of the actual web framework (grossly over-simplified: map data to/from the client/server) is 1) narrowly-scoped and 2) highly optimizable. </p>
<p>Years of pounding the ideas of loose-coupling, SRP, DRY, etc into our heads has given us web applications mappings that are, when you get down to it, pretty damn anemic. All the data-access, behavior, etc lives in the domain or is abstracted out into the app service layer. We&#8217;ve (hopefully) broken the cycle of abuse of using retarded server callbacks in rendered views in favor or much more easier testable js (javascript controllers/views, anyone?). We&#8217;re using view engines that don&#8217;t suck to compose tighter, less-entangled rendered views (that are becoming pretty anemic, themselves, as the js side of things gets more of a share of the the action). So what about what&#8217;s left over? </p>
<p>What I&#8217;m saying this: The stuff we code at the web framework level (controllers, actions, behaviors, etc) is pretty damn rote, all in all. In other words: A perfect candidate for a DSL.</p>
<p>Enter things like Sinatra (or my own solution, which is still incubating and thus not heavily pimped, here).</p>
<p>You&#8217;re gonna be stuck with chestnuts like overloading constructors of a class to model actions as long as you remain in the BDSM box of C# as your only way to do this kind of thing (to get the tired Matrix cliche out of the way: it&#8217;s a prison for your mind).</p>
<p>The domain requires a rich language to be expressed fully; use C# there. The client requires a rich language to be expressed; go ahead and use js or whatever for that, as well.</p>
<p>But the web framework? Seriously. In statically typed .NET, the most complicated things it does is 1) deliver dependencies to 2) do query/command tasks to ultimately 3) map data to/from the client/server. period. Item 1 isn&#8217;t that big of a deal in Ruby because you can monkey-patch that stuff away and bait-and-switch dependencies when testing. Oh yeah, and the web framework probably manages your security and session baggage, as well.</p>
<p>Anywho, I&#8217;ll get off my soapbox, now. I just think that the entire discussion up until this point is predicated on the assumption that the job that web frameworks do is something that really *requires* verbose, convoluted solutions like those that&#8217;re prevalent in the debate. We can do better, in my opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastien Lambla</title>
		<link>http://lostechies.com/chadmyers/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it/#comment-1014</link>
		<dc:creator>Sebastien Lambla</dc:creator>
		<pubDate>Sat, 20 Jun 2009 12:17:31 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/06/18/going-controller-less-in-mvc-the-way-fowler-meant-it.aspx#comment-1014</guid>
		<description>Hey there,

yes it&#039;s somehting that has been in OR for a while, the idea that resource types (what snooze calls strongly-typed URLs) are the things that drive URIs.

That said, as you correctly point out, by default in OR the action semantics is based on the resoure type and the http verb, and from what I understand, your proposal carries the operation semantic as part of the model definition (your EditProduct).

Laribee suggested the idea of using profiles in OR to let you define various programming models, and is something that i&#039;m investigating. The latest version of OR includes a new way of defining / discovering / executing operations, and so this scenario, like a few others (around controllers with only one methods and public properties for resolution by binders and codecs) should be very easy to support.

If there&#039;s demand for it, it&#039;d be easy to make such a profile to run fubu on top of OR instead of asp.net, and get the best of both worlds :)

Seb</description>
		<content:encoded><![CDATA[<p>Hey there,</p>
<p>yes it&#8217;s somehting that has been in OR for a while, the idea that resource types (what snooze calls strongly-typed URLs) are the things that drive URIs.</p>
<p>That said, as you correctly point out, by default in OR the action semantics is based on the resoure type and the http verb, and from what I understand, your proposal carries the operation semantic as part of the model definition (your EditProduct).</p>
<p>Laribee suggested the idea of using profiles in OR to let you define various programming models, and is something that i&#8217;m investigating. The latest version of OR includes a new way of defining / discovering / executing operations, and so this scenario, like a few others (around controllers with only one methods and public properties for resolution by binders and codecs) should be very easy to support.</p>
<p>If there&#8217;s demand for it, it&#8217;d be easy to make such a profile to run fubu on top of OR instead of asp.net, and get the best of both worlds :)</p>
<p>Seb</p>
]]></content:encoded>
	</item>
</channel>
</rss>
