<?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: Limiting your abstractions</title>
	<atom:link href="http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Thu, 20 Jun 2013 08:29: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: Rodi de Boer</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5488</link>
		<dc:creator>Rodi de Boer</dc:creator>
		<pubDate>Sun, 10 Feb 2013 15:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5488</guid>
		<description>Ok, so what&#039;s the plan if you have several &quot;front-ends&quot; on the same domain intersecting; for example an MVC app that let&#039;s users do things like management of certain things and a web service that lets other systems do things (some management and some other stuff too)?
Would you just use the Task/TaskExecuter scenario for all the intersecting functionality?
And is that Task scenario an implementation of the Command pattern?</description>
		<content:encoded><![CDATA[<p>Ok, so what&#8217;s the plan if you have several &#8220;front-ends&#8221; on the same domain intersecting; for example an MVC app that let&#8217;s users do things like management of certain things and a web service that lets other systems do things (some management and some other stuff too)?<br />
Would you just use the Task/TaskExecuter scenario for all the intersecting functionality?<br />
And is that Task scenario an implementation of the Command pattern?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodi de Boer</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5481</link>
		<dc:creator>Rodi de Boer</dc:creator>
		<pubDate>Fri, 08 Feb 2013 18:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5481</guid>
		<description>Nice post. I think I&#039;m starting to get this. So we don&#039;t just do a repository, but we encapsulate and introduce the right OO pattern at the momet we find the need to really do so.
Thanks. All those posts on the internet; combining them to something I can digest and make my own is pretty hard. :)</description>
		<content:encoded><![CDATA[<p>Nice post. I think I&#8217;m starting to get this. So we don&#8217;t just do a repository, but we encapsulate and introduce the right OO pattern at the momet we find the need to really do so.<br />
Thanks. All those posts on the internet; combining them to something I can digest and make my own is pretty hard. <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dariusz Gil</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5296</link>
		<dc:creator>Dariusz Gil</dc:creator>
		<pubDate>Sun, 11 Nov 2012 23:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5296</guid>
		<description>In short: Repo - bunch of methods FindSomethingXXXBy, Query Object: one query use case per class. And/Or you can use extension methods :)</description>
		<content:encoded><![CDATA[<p>In short: Repo &#8211; bunch of methods FindSomethingXXXBy, Query Object: one query use case per class. And/Or you can use extension methods <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Favor query objects over repositories &#124; Jimmy Bogard&#039;s Blog</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5149</link>
		<dc:creator>Favor query objects over repositories &#124; Jimmy Bogard&#039;s Blog</dc:creator>
		<pubDate>Mon, 05 Nov 2012 14:55:09 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5149</guid>
		<description>[...] I’m over Repositories, and definitely over abstracting your data layer, but where does that leave us? I don’t think creating an abstraction over your ORM provides much [...]</description>
		<content:encoded><![CDATA[<p>[...] I’m over Repositories, and definitely over abstracting your data layer, but where does that leave us? I don’t think creating an abstraction over your ORM provides much [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JustinBMichaels</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5239</link>
		<dc:creator>JustinBMichaels</dc:creator>
		<pubDate>Mon, 29 Oct 2012 14:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5239</guid>
		<description>Jimmy, how would you approach integration testing with your ORM querying being done in your controller&#039;s action?  Do you integration test your controllers by asserting against your ViewResult.Model or do you go for an automated Ui test and verify against the html?  I guess my confusion or over analyzing is happening when trying to test that my query returned what was expected.</description>
		<content:encoded><![CDATA[<p>Jimmy, how would you approach integration testing with your ORM querying being done in your controller&#8217;s action?  Do you integration test your controllers by asserting against your ViewResult.Model or do you go for an automated Ui test and verify against the html?  I guess my confusion or over analyzing is happening when trying to test that my query returned what was expected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Tiseo</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5194</link>
		<dc:creator>Paul Tiseo</dc:creator>
		<pubDate>Wed, 17 Oct 2012 20:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5194</guid>
		<description>Could you explain the difference between your Repository object and your Query object?</description>
		<content:encoded><![CDATA[<p>Could you explain the difference between your Repository object and your Query object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5176</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Tue, 09 Oct 2012 22:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5176</guid>
		<description>Can you please do a post expanding on your testing strategies around these ideas? You mention it briefly, and perhaps I&#039;m misinterpreting what you mean by &#039;I only stub out components I can’t control&#039;. I read this statement as the opposite to the advice &#039;don&#039;t mock objects you don&#039;t own.&#039; If you&#039;re calling your ORM directly, there is no way to isolate your controller test, and you&#039;re forced to integrate test it. It sounds like you advocate the approach to create a thin wrapper around the ORM which simply delegates to it to provide a seam to isolate test your controller, but then you say &#039;...it&#039;s just a matter of swapping out the underlying session with one going against an in-memory version...&#039;. I&#039;m unfamiliar with RavenDB, but we use Entity Framework, and running LINQ against an in-memory store (LINQ to objects) is not the same as against the database (LINQ to Entities), so swapping the ORM doesn&#039;t create a useful test. Is it a case that you just integrate test your controller (keeping your abstractions simple) until you need to manage the complexity by introducing some abstraction for the query, at which time you change the controller test to an isolated one?
</description>
		<content:encoded><![CDATA[<p>Can you please do a post expanding on your testing strategies around these ideas? You mention it briefly, and perhaps I&#8217;m misinterpreting what you mean by &#8216;I only stub out components I can’t control&#8217;. I read this statement as the opposite to the advice &#8216;don&#8217;t mock objects you don&#8217;t own.&#8217; If you&#8217;re calling your ORM directly, there is no way to isolate your controller test, and you&#8217;re forced to integrate test it. It sounds like you advocate the approach to create a thin wrapper around the ORM which simply delegates to it to provide a seam to isolate test your controller, but then you say &#8216;&#8230;it&#8217;s just a matter of swapping out the underlying session with one going against an in-memory version&#8230;&#8217;. I&#8217;m unfamiliar with RavenDB, but we use Entity Framework, and running LINQ against an in-memory store (LINQ to objects) is not the same as against the database (LINQ to Entities), so swapping the ORM doesn&#8217;t create a useful test. Is it a case that you just integrate test your controller (keeping your abstractions simple) until you need to manage the complexity by introducing some abstraction for the query, at which time you change the controller test to an isolated one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Reilly</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5121</link>
		<dc:creator>John Reilly</dc:creator>
		<pubDate>Wed, 03 Oct 2012 10:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5121</guid>
		<description>Hi Jimmy,


Really good article - thank you.  I&#039;ve recently been coming to similar conclusions to you and found your post after writing a blog post about my own experiences:


http://icanmakethiswork.blogspot.co.uk/2012/10/unit-testing-and-entity-framework-filth.html



I was coming from the perspective of assuming that there must be a simple way to MOQ Entity Framework and get my unit tests up and running.  It looks like I was mistaken both in the expectation that this was simple and also that it was even worthwhile!


I&#039;ve put a link in my blog post to this as I think you probably express the underlying issue rather better than I have - hope that&#039;s okay?</description>
		<content:encoded><![CDATA[<p>Hi Jimmy,</p>
<p>Really good article &#8211; thank you.  I&#8217;ve recently been coming to similar conclusions to you and found your post after writing a blog post about my own experiences:</p>
<p><a href="http://icanmakethiswork.blogspot.co.uk/2012/10/unit-testing-and-entity-framework-filth.html" rel="nofollow">http://icanmakethiswork.blogspot.co.uk/2012/10/unit-testing-and-entity-framework-filth.html</a></p>
<p>I was coming from the perspective of assuming that there must be a simple way to MOQ Entity Framework and get my unit tests up and running.  It looks like I was mistaken both in the expectation that this was simple and also that it was even worthwhile!</p>
<p>I&#8217;ve put a link in my blog post to this as I think you probably express the underlying issue rather better than I have &#8211; hope that&#8217;s okay?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5117</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 30 Sep 2012 22:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5117</guid>
		<description>1) This is every single query in the system?
2) Hundreds of actions? You have other problems then. How is many objects different than many methods? It&#039;s the same problem, now I just have a god object.</description>
		<content:encoded><![CDATA[<p>1) This is every single query in the system?<br />
2) Hundreds of actions? You have other problems then. How is many objects different than many methods? It&#8217;s the same problem, now I just have a god object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evgeny mz</title>
		<link>http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5116</link>
		<dc:creator>Evgeny mz</dc:creator>
		<pubDate>Sun, 30 Sep 2012 18:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/#comment-5116</guid>
		<description>There are still two issues:


1) Let&#039;s assume you want to add an additional condition .Where(post =&gt; post.Language == Language). You have to search through all your actions instead of doing it on one file (repository class);
2) Someone wants to get archived posts for N-date - he would repeat your Achive-action code because he wouldn&#039;t be able to examine hundreds of actions to find that there&#039;s already the code that could be abstracted in a query object as you suggested.


How do we solve those?</description>
		<content:encoded><![CDATA[<p>There are still two issues:</p>
<p>1) Let&#8217;s assume you want to add an additional condition .Where(post =&gt; post.Language == Language). You have to search through all your actions instead of doing it on one file (repository class);<br />
2) Someone wants to get archived posts for N-date &#8211; he would repeat your Achive-action code because he wouldn&#8217;t be able to examine hundreds of actions to find that there&#8217;s already the code that could be abstracted in a query object as you suggested.</p>
<p>How do we solve those?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
