<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicio.us/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jak Charlton - Insane World - All Comments</title><link>http://devlicio.us/blogs/casey/default.aspx</link><description>Hang the code, and hang the rules. They&amp;#39;re more like guidelines anyway</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Domain Driven Design</title><link>http://devlicio.us/blogs/casey/archive/2009/03/11/ddd-invariants-or-contextual-validation.aspx#70836</link><pubDate>Thu, 17 Jan 2013 18:38:48 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70836</guid><dc:creator>TrackBack</dc:creator><description>&lt;img src="http://devlicio.us/aggbug.aspx?PostID=70836" width="1" height="1"&gt;</description></item><item><title>Greenfield Development with ASP.NET MVC &amp; S#arp Lite - Day 2</title><link>http://devlicio.us/blogs/casey/archive/2009/02/11/ddd-bounded-contexts.aspx#70373</link><pubDate>Fri, 12 Oct 2012 22:25:34 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70373</guid><dc:creator>Billy McCafferty</dc:creator><description>&lt;p&gt;A series of posts providing proven guidance for developing ASP.NET MVC applications from idea to well&lt;/p&gt;
&lt;img src="http://devlicio.us/aggbug.aspx?PostID=70373" width="1" height="1"&gt;</description></item><item><title>Recovering a Project with ASP.NET MVC and Agile - Jak Charlton - Insane World - Devlicio.us - Just the Tasty Bits</title><link>http://devlicio.us/blogs/casey/archive/2008/08/13/recovering-a-project-with-asp-net-mvc-and-agile.aspx#69722</link><pubDate>Fri, 27 Apr 2012 11:32:02 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:69722</guid><dc:creator>Blue Ray Plus - Latest Technology News</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from Blue Ray Plus - Latest Technology News&lt;/p&gt;
&lt;img src="http://devlicio.us/aggbug.aspx?PostID=69722" width="1" height="1"&gt;</description></item><item><title>re: Avoiding Prescriptive Requirements</title><link>http://devlicio.us/blogs/casey/archive/2012/02/09/avoiding-prescriptive-requirements.aspx#69486</link><pubDate>Thu, 09 Feb 2012 05:43:37 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:69486</guid><dc:creator>Nick</dc:creator><description>&lt;p&gt;I agree, I&amp;#39;ve started using SpecFlow &lt;a rel="nofollow" target="_new" href="http://www.specflow.org/"&gt;http://www.specflow.org/&lt;/a&gt; for this. It has the concept of Features that describe your core requirements, and Scenarios which describe the detailed implementations/flows.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=69486" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67991</link><pubDate>Thu, 14 Jul 2011 10:58:23 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67991</guid><dc:creator>Quooston</dc:creator><description>&lt;p&gt;I agree, using partial classes in order to disguise bigger problems related to SRP and such is not a good thing. I don&amp;#39;t believe one action per controller is a good thing either. &lt;/p&gt;
&lt;p&gt;I would say that if you can&amp;#39;t handle a Login, and a Logout action in one controller based on an overzealous SRP gland, you&amp;#39;re just not being pragmatic enough. &lt;/p&gt;
&lt;p&gt;Also, often times in something like a repository class, partials come in handy all the time; and not due to infrastructure requirements either. Linq statements can become very verbose and sometimes it makes a lot of sense to split the class into partials purely for the sake of readability. And no, creating another repo just because of a verbose syntax, citing SRP as a reason is not a good answer there either.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67991" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67985</link><pubDate>Tue, 12 Jul 2011 23:49:01 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67985</guid><dc:creator>Jak Charlton</dc:creator><description>&lt;p&gt;Partial classes should only ever be used by code generation&lt;/p&gt;
&lt;p&gt;Splitting code arbitrarily across files just to increase readability is masking another problem and creating more problems - if it&amp;#39;s too long/complex to read easily in one file, it&amp;#39;s probably breaking SoC, SRP and a whole bunch of other good practices&lt;/p&gt;
&lt;p&gt;But mostly, this is about splitting responsibility - there should be only one reason for a class to change - and a controller with even fairly closely related methods has many reasons for change&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67985" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67978</link><pubDate>Tue, 12 Jul 2011 07:53:43 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67978</guid><dc:creator>Quooston</dc:creator><description>&lt;p&gt;+1 for partial classes for better organization. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67978" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67971</link><pubDate>Tue, 12 Jul 2011 00:42:42 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67971</guid><dc:creator>tobi</dc:creator><description>&lt;p&gt;1) and 2) can be solved by training - be pragmatic, not obsessive. 3) is harder. I solved it by using a base class receiving a bunch of common services by property injection and extending the action invoker to inject dependencies as method parameters.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67971" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67970</link><pubDate>Mon, 11 Jul 2011 16:10:48 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67970</guid><dc:creator>jrnail23</dc:creator><description>&lt;p&gt;Hi Jak, good to see someone else exploring this approach as well. &amp;nbsp;Here&amp;#39;s a link to Derek Greer&amp;#39;s discussion of single action controllers, which also asks and answers some interesting questions: &lt;a rel="nofollow" target="_new" href="http://lostechies.com/derekgreer/2011/04/29/single-action-controllers-with-asp-net-mvc"&gt;lostechies.com/.../single-action-controllers-with-asp-net-mvc&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67970" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67969</link><pubDate>Mon, 11 Jul 2011 15:57:31 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67969</guid><dc:creator>Jon Galloway</dc:creator><description>&lt;p&gt;While it doesn&amp;#39;t help at all with SRP issues (cases of overly complex controllers and constructor overload abuse), if you want to split up actions among multiple files for readability you can just split a controller into partial classes.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67969" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67968</link><pubDate>Mon, 11 Jul 2011 09:25:28 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67968</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;is this smart, or just plain trickery?&lt;/p&gt;
&lt;p&gt;1) Use a single .cs file with separate controller classes&lt;/p&gt;
&lt;p&gt;2) Use a single .cs file with a single class with several nested controller classes.&lt;/p&gt;
&lt;p&gt;I experimented with each but it&amp;#39;s more about code organisation...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67968" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67967</link><pubDate>Mon, 11 Jul 2011 09:05:03 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67967</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;I took a similar approach with the Tinyweb framework I wrote, where a Handler class can have Get/Post/Put/Delete methods only and the handler class itself determines the URL. &lt;/p&gt;
&lt;p&gt;From your example, IndexHandler, LogonHandler and LogoffHandler would produce /index, /logon and /logoff respectively and force the pattern you mention.&lt;/p&gt;
&lt;p&gt;You can find the project here if you&amp;#39;re interested: &lt;a rel="nofollow" target="_new" href="https://github.com/martinrue/Tinyweb"&gt;github.com/.../Tinyweb&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67967" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67966</link><pubDate>Mon, 11 Jul 2011 05:37:07 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67966</guid><dc:creator>Jak Charlton</dc:creator><description>&lt;p&gt;1) You don&amp;#39;t end up with massive controller classes&lt;/p&gt;
&lt;p&gt;2) Due to the relative verbosity of C#, a controller class is mostly filled with blank lines and braces (controllers should have almost no logic). I find that doing this lets me concentrate easily on the actual functionality and not have to scan a lot of whitespace&lt;/p&gt;
&lt;p&gt;3) and most important of all - you don&amp;#39;t do things like overloading constructors with a dozen services or repositories to support every operation - you can focus on the single responsibility the controller action really has. SRP FTW :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67966" width="1" height="1"&gt;</description></item><item><title>re: Single Action per Controller in ASP.NET MVC</title><link>http://devlicio.us/blogs/casey/archive/2011/07/11/single-action-per-controller-in-asp-net-mvc.aspx#67965</link><pubDate>Mon, 11 Jul 2011 05:26:14 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67965</guid><dc:creator>hazzik</dc:creator><description>&lt;p&gt;What advantages of this approach?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67965" width="1" height="1"&gt;</description></item><item><title>re: What is Domain Driven Design?</title><link>http://devlicio.us/blogs/casey/archive/2011/05/16/what-is-domain-driven-design.aspx#67349</link><pubDate>Fri, 20 May 2011 08:15:38 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67349</guid><dc:creator>Technology</dc:creator><description>&lt;p&gt;Fantastic article. Well elaborated and also to the point.&lt;/p&gt;
&lt;p&gt;So, the Domain expert, is not really the project champion, he is an expert in the line of business who knows the intricacies involved within the business domain, it&amp;#39;s chanllenges and what is expected of the technical or development team to cater and solve business requirements.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67349" width="1" height="1"&gt;</description></item></channel></rss>