﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Kijana Woodard commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Phillip And I think your comment is the linchpin to Ayende's entire argument. If it turns out that the ORM I've chosen has limitations and I've abstracted it away into a repository, I CAN'T work around it (i.e. ship code and make my client happy). Since I have this lovely abstractions, I say EF sucks and switch to NHibernate only to discover it has limitations in other areas. Ooops. 

You really will need to be able to optimize queries for the situation at hand. The only code that knows that situation is the consuming code. 

If you abstract away the ORM, you can't use it's features to optimize. If you expose it's features, you just leaked your ORM's implementation details through your abstractions and now you can't switch ORMs anymore.

So you might as well just use your ORM from the beginning and ship code.

EF or NHibernate both let us switch between many database engines. Once we work out all the issues of *that* abstraction for one ORM, what value do we get from switching our ORM?</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment22</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment22</guid><pubDate>Sat, 14 Jan 2012 02:22:31 GMT</pubDate></item><item><title>Rafal commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>I demand next article in this series. The plot is getting interesting and I'm sinking into it</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment21</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment21</guid><pubDate>Fri, 13 Jan 2012 09:38:26 GMT</pubDate></item><item><title>Phillip commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Steve - I'm not saying NHibernate is perfect or that NH is better than EF. All I mean is we shouldn't have to change our implementation just because something is not supported by a framework.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment20</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment20</guid><pubDate>Fri, 13 Jan 2012 09:31:15 GMT</pubDate></item><item><title>Steve Py commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Phillip Well, it's 6 eggs one way, or half a dozen the other. I've seen plenty of problems with NHibernate implementations where the issues boil down to bad assumptions about what should be, or shouldn't be lazy loaded. Several were set up to either lazy load everything or nothing.

Having a design that explicitly designates an entity that's intended to be loaded separately may be a change in design, but not a bad change in design.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment19</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment19</guid><pubDate>Fri, 13 Jan 2012 05:11:13 GMT</pubDate></item><item><title>Bob commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>Yep use the context or session directly in your controller, lets just move back to code behinds while we are at it.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment18</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment18</guid><pubDate>Fri, 13 Jan 2012 03:03:38 GMT</pubDate></item><item><title>Phillip Haydon commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Bek - That would be changing your design to work around the limitations of EF rather than not having to worry about limitations to begin with.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment17</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment17</guid><pubDate>Fri, 13 Jan 2012 02:53:53 GMT</pubDate></item><item><title>Bek commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>well technically, you can lazy load properties in EF. You have to split the table into two entities.  </description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment16</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment16</guid><pubDate>Thu, 12 Jan 2012 22:42:16 GMT</pubDate></item><item><title>Bob commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Ignacio 

I hate to say it, but you must be new.  This is what this guy does all the time.  It's troll bait to get people mad so they talk about him.  Of course he's an a**.  Everyone already knows that.


</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment15</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment15</guid><pubDate>Thu, 12 Jan 2012 22:38:48 GMT</pubDate></item><item><title>Ronnie Overby commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>Kids in the back, people. http://herdingcode.com/wp-content/uploads/HerdingCode-0131-Chris-Williams-and-Matthew-Podwysocki-on-the-Javascript-community.mp3</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment14</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment14</guid><pubDate>Thu, 12 Jan 2012 20:54:46 GMT</pubDate></item><item><title>Karep commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>If we have ActiveContext why not call ExecuteStoreCommand instead of creating command by hand? Also the reader is not disposed.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment13</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment13</guid><pubDate>Thu, 12 Jan 2012 20:38:19 GMT</pubDate></item><item><title>Karep commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>Ayende I don't know how lazy properties work in NHibernate but you can just create another object (Image) and add association from Category to Image and then you have lazy loading of image.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment12</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment12</guid><pubDate>Thu, 12 Jan 2012 20:36:12 GMT</pubDate></item><item><title>Karep commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>Returning Image from repository seems so wrong.</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment11</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment11</guid><pubDate>Thu, 12 Jan 2012 20:34:29 GMT</pubDate></item><item><title>João Bragança commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Ignacio

There's some pretty good bread here: https://github.com/ayende/Alexandria</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment10</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment10</guid><pubDate>Thu, 12 Jan 2012 19:12:59 GMT</pubDate></item><item><title>Nikolai Mynkow commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>Well, actually he is.
good bread = use the orm directly, because it is actually a repository. If we are talking about NHibernate use ISession/ISession instead of leaky IRepository abstraction. Regards</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment9</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment9</guid><pubDate>Thu, 12 Jan 2012 18:18:10 GMT</pubDate></item><item><title>Ignacio Fuentes commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@ Nikolai

thats not the case here at all... 

ayende here is just telling me that mouldy bread is not good... hes not even mentioning other kinds of bread. </description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment8</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment8</guid><pubDate>Thu, 12 Jan 2012 15:47:20 GMT</pubDate></item><item><title>Nikolai Mynkow commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Ignacio

If you have to choose between 3 types of bread and I tell you that mouldy bread is not tasty was that helpful for you?</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment7</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment7</guid><pubDate>Thu, 12 Jan 2012 15:44:55 GMT</pubDate></item><item><title>Ignacio Fuentes commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@ayende,

these posts are in now way useful!!

you are not saying how to do it right, just pointing out how wrong this approach is.

how is this helpful?</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment6</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment6</guid><pubDate>Thu, 12 Jan 2012 14:20:41 GMT</pubDate></item><item><title>juakali commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>I would only return the byte array. But hey how loosy do you want to go. 
I would say it's a nice readable and maintainable code and super fast.
Or maybe cache (in memory) the categories and pick it from memory instead of DB.

</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment5</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment5</guid><pubDate>Thu, 12 Jan 2012 14:18:00 GMT</pubDate></item><item><title>Bogdan Marian commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Ayende: Is "unparapetrized" a shortcut for unparameterized? ;)</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment4</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment4</guid><pubDate>Thu, 12 Jan 2012 13:17:49 GMT</pubDate></item><item><title>Bogdan Marian commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>@Ayende: Is "unparapetrized" a shortcut for unparameterized? ;)</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment3</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment3</guid><pubDate>Thu, 12 Jan 2012 13:17:29 GMT</pubDate></item><item><title>NexusSharp commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>"By the way, the most logical reason for this to be done is to avoid mapping the Picture column to the category, since the OR/M in use here (EF) doesn’t support the notion of lazy properties."

Even that would be no reason to do it like that, why not use a binarydocument class that would contain the picture, this would allow lazy loading on the many-to-one side from category.

</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment2</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment2</guid><pubDate>Thu, 12 Jan 2012 12:54:57 GMT</pubDate></item><item><title>Stefan commented on Northwind Starter Kit Review: The parents have eaten sour grapes, and the children&amp;rsquo;s teeth are set on edge</title><description>Bestides this, I believe there's another thing that one should avoid at this level of abstraction: System.Drawing.Image as this has got to do with GDI stuff and this namespace doesn't make sense in the web world. 
Also, in WPF (unless you NEED to do some GDI stuff), you will not need System.Drawing at all and you might want to opt for something else just to display images on the screens...
I haven't seen the place where this repository is used, but I guess it's only Winforms so perhaps a better name for this would be WinformsCustomerRepository? :)</description><link>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment1</link><guid>http://ayende.com/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-children-s-teeth-are-set-on-edge#comment1</guid><pubDate>Thu, 12 Jan 2012 10:53:35 GMT</pubDate></item></channel></rss>