<?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: ASP.NET MVC Controller Best Practices – Skinny Controllers</title>
	<atom:link href="http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/</link>
	<description>Jag Reehal on Agile Development, ASP.NET MVC, Silverlight and all manner of good stuff</description>
	<lastBuildDate>Sun, 25 Jul 2010 19:27:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Neil Kerkin</title>
		<link>http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/comment-page-1/#comment-30</link>
		<dc:creator>Neil Kerkin</dc:creator>
		<pubDate>Mon, 26 Oct 2009 16:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.arrangeactassert.com/?p=285#comment-30</guid>
		<description>Hi Jag, 
my point is that if someone follows your current approach they only get a few of the benefits of skinny controllers e.g. SoC and simplified tests(which you haven&#039;t show for GetAnimals). 

You specifically mention Paging and DRY but this logic will be repeated in every IService class. Hence duplicate logic and tests. 

Effectively you haven&#039;t removed the smell, just moved it to another layer.  

Don&#039;t get me wrong, i think this is a good article. Just needs that extra step to show the full benefits of skinny controllers.

Maybe a follow-up post?</description>
		<content:encoded><![CDATA[<p>Hi Jag,<br />
my point is that if someone follows your current approach they only get a few of the benefits of skinny controllers e.g. SoC and simplified tests(which you haven&#8217;t show for GetAnimals). </p>
<p>You specifically mention Paging and DRY but this logic will be repeated in every IService class. Hence duplicate logic and tests. </p>
<p>Effectively you haven&#8217;t removed the smell, just moved it to another layer.  </p>
<p>Don&#8217;t get me wrong, i think this is a good article. Just needs that extra step to show the full benefits of skinny controllers.</p>
<p>Maybe a follow-up post?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jag Reehal</title>
		<link>http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/comment-page-1/#comment-23</link>
		<dc:creator>Jag Reehal</dc:creator>
		<pubDate>Wed, 14 Oct 2009 20:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.arrangeactassert.com/?p=285#comment-23</guid>
		<description>Hi Neil thanks for the comment.      

I agree that in a real world ASP.NET MVC website you should abstract the paging logic so you don’t end up repeating yourself.  

The aim of the post is to show why you should keep your controllers skinny and how you could go about refactoring a fat controller.  Any further refactoring would take the focus away from this.</description>
		<content:encoded><![CDATA[<p>Hi Neil thanks for the comment.      </p>
<p>I agree that in a real world ASP.NET MVC website you should abstract the paging logic so you don’t end up repeating yourself.  </p>
<p>The aim of the post is to show why you should keep your controllers skinny and how you could go about refactoring a fat controller.  Any further refactoring would take the focus away from this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Kerkin</title>
		<link>http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/comment-page-1/#comment-22</link>
		<dc:creator>Neil Kerkin</dc:creator>
		<pubDate>Wed, 14 Oct 2009 18:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.arrangeactassert.com/?p=285#comment-22</guid>
		<description>I&#039;m all for skinny controllers (http://stackoverflow.com/questions/975680/asp-net-mvc-actions-separation-of-concerns-single-responsibility-principle) but you haven&#039;t removed any complexity from your application. i.e. you now have to test repeated logic (paging) in each of your services rather than on your controllers.

Why not show one further refactoring and abstract out the paging logic e.g. PagedList?  I understand this isn&#039;t a &quot;How to implement paging&quot; article but i feel it would improve the example.</description>
		<content:encoded><![CDATA[<p>I&#8217;m all for skinny controllers (<a href="http://stackoverflow.com/questions/975680/asp-net-mvc-actions-separation-of-concerns-single-responsibility-principle" rel="nofollow">http://stackoverflow.com/questions/975680/asp-net-mvc-actions-separation-of-concerns-single-responsibility-principle</a>) but you haven&#8217;t removed any complexity from your application. i.e. you now have to test repeated logic (paging) in each of your services rather than on your controllers.</p>
<p>Why not show one further refactoring and abstract out the paging logic e.g. PagedList?  I understand this isn&#8217;t a &#8220;How to implement paging&#8221; article but i feel it would improve the example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Cravens</title>
		<link>http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/comment-page-1/#comment-17</link>
		<dc:creator>Bob Cravens</dc:creator>
		<pubDate>Sat, 26 Sep 2009 20:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.arrangeactassert.com/?p=285#comment-17</guid>
		<description>Thanks for refactoring the data access details out of the controller. Although LINQ to SQL / Entity Framework makes our lives easy, it is often overused in controllers (presentation layer). It is too easy to use .skip / .take for paging in the controller. This has maintainability issues. Much better to have the LINQ code refactored into a service (like you have presented).</description>
		<content:encoded><![CDATA[<p>Thanks for refactoring the data access details out of the controller. Although LINQ to SQL / Entity Framework makes our lives easy, it is often overused in controllers (presentation layer). It is too easy to use .skip / .take for paging in the controller. This has maintainability issues. Much better to have the LINQ code refactored into a service (like you have presented).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marcdormey</title>
		<link>http://www.arrangeactassert.com/asp-net-mvc-controller-best-practices-%e2%80%93-skinny-controllers/comment-page-1/#comment-16</link>
		<dc:creator>marcdormey</dc:creator>
		<pubDate>Fri, 25 Sep 2009 14:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.arrangeactassert.com/?p=285#comment-16</guid>
		<description>This is a perfect example of &quot;Command/Query Separation&quot;.

1.	Find a domain entity
2.	Execute one method on that entity
3.	Commit the transaction

Keeps the controller and presentation clean.
Read more http://dylanbeattie.blogspot.com/2009/09/altnet-beers-commandquery-separation.html</description>
		<content:encoded><![CDATA[<p>This is a perfect example of &#8220;Command/Query Separation&#8221;.</p>
<p>1.	Find a domain entity<br />
2.	Execute one method on that entity<br />
3.	Commit the transaction</p>
<p>Keeps the controller and presentation clean.<br />
Read more <a href="http://dylanbeattie.blogspot.com/2009/09/altnet-beers-commandquery-separation.html" rel="nofollow">http://dylanbeattie.blogspot.com/2009/09/altnet-beers-commandquery-separation.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
