﻿<?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>JohnLiXet commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans
I agreee with you Frans. Why don't you blog about the right way to this?
Gosh it cannot be that long since we read
"Stored procedures are bad, m'kay?"</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment39</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment39</guid><pubDate>Thu, 19 Jan 2012 15:46:10 GMT</pubDate></item><item><title>Sean Kearon commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Right-click method, hit Generate Sequence Diagram.  OMG, I never knew that was there.  :-)) </description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment38</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment38</guid><pubDate>Tue, 17 Jan 2012 08:17:35 GMT</pubDate></item><item><title>Francois Germain commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Ayende, good review.  There's one thing I am missing from this post...  Did you actually look run this code through a profiler?

Obviously I don't have all the code in front of me but I am sure you are fully aware that entity framework won't load the same PK twice if it's already loaded in the context unless you force it too?  Since the unit of work seems to come from the WorkerService, the entity you think is loaded twice should not be...  Doesn't make it good anyway, but I think one of your assumption is wrong in this post...

My next question would be, how do you unit test your controllers through a unit test framework without a connection to a database if you do not abstract the DA layer out?</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment37</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment37</guid><pubDate>Mon, 16 Jan 2012 16:14:02 GMT</pubDate></item><item><title>Ayende Rahien commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Akava,
I use VS to do that.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment36</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment36</guid><pubDate>Mon, 16 Jan 2012 07:18:31 GMT</pubDate></item><item><title>Bob commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Dmitry

Dude, MATCO was just this windbag blowing hard.  He said forever he was going to write an end-to-end sample app so everyone would finally see the right way to do it - errrrrr - I mean the Oren way.  Whatever.

Dude serves up about a dozen screenshots a year ago and the project goes dark.  Typical big mouth.  He's too busy reading other peoples code and bashing to finish writing his own.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment35</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment35</guid><pubDate>Mon, 16 Jan 2012 01:40:55 GMT</pubDate></item><item><title>Bob commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans Bouma

Yeah buddy.  I've been saying for quite some time now half the post on this big mouths website are simply there to troll for traffic.

Dudes what he is - an assh*le. </description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment34</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment34</guid><pubDate>Mon, 16 Jan 2012 01:15:34 GMT</pubDate></item><item><title>Akava commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Morning Ayende,
could you tell me what tool did you use to draw the UML? Was it generated by this tool or been written by you?

Thanks</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment33</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment33</guid><pubDate>Sun, 15 Jan 2012 09:41:42 GMT</pubDate></item><item><title>Dmitry commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>I wish Ayende would actually take time to create the Macto project instead of making very similar negative posts about various code bases.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment32</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment32</guid><pubDate>Sat, 14 Jan 2012 19:44:00 GMT</pubDate></item><item><title>Dan Plaskon commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Personally, I think Fabio had it right with his idea of Enhanced Query Objects (http://fabiomaulo.blogspot.com/2010/07/enhanced-query-object.html) - if you need ORM-agnostic support for data access, this approach has little downside.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment31</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment31</guid><pubDate>Sat, 14 Jan 2012 18:29:17 GMT</pubDate></item><item><title>Tonio commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans you wrong beacuse the autors of NSK are professional coders that would show me (beginner) the rigth (ideal) code!!! and offer me a book!
ayende is rude but real and he yes help me!!
</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment30</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment30</guid><pubDate>Sat, 14 Jan 2012 17:00:48 GMT</pubDate></item><item><title>Frank commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Learning from mistakes is one of the most effective ways of learning. So I for one am grateful for Ayende taking on this task of pointing out these mistakes.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment29</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment29</guid><pubDate>Sat, 14 Jan 2012 15:39:04 GMT</pubDate></item><item><title>gunteman commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>We (I) love your many constructive posts, but hate that your approach to show bad practices is almost always to take a public piss at someone else. I no longer think you're doing it to teach, but simply that you get a kick out of the pissing act. 
It's not uncommon behavior. Most of us do it, in some way or other, but it's seriously reducing the value of your blog, your legacy and, I think, also your business.
</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment28</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment28</guid><pubDate>Sat, 14 Jan 2012 14:43:56 GMT</pubDate></item><item><title>Ayende Rahien commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Frans,
Did you miss the fact that I have... you know, actually written a small amount of posts that actually does go and specifically talks about how and why I think you should write software?
The point is to point out bad things, so when you run into them, or use them, you know that they are bad. Then you can go and read about how to do it right.
</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment27</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment27</guid><pubDate>Sat, 14 Jan 2012 13:55:44 GMT</pubDate></item><item><title>Ed commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans, in this serie he writes how not to do it and then later he will give examples of a better way to do it. It's a serie.

Also you're not helping calling names like 'self proclaimed super dev'.

You can argue his style but not critizing (bashing in your words) other people's code because you have a populair blog is no argument at all.


</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment26</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment26</guid><pubDate>Sat, 14 Jan 2012 11:04:26 GMT</pubDate></item><item><title>Roland commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Take a look at the upcoming posts. It seems a few blog entries will be devoted to "how-to" instead of "how-not-to".</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment25</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment25</guid><pubDate>Sat, 14 Jan 2012 10:19:04 GMT</pubDate></item><item><title>Frans Bouma commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@fellce that's not the point. That some self-proclaimed super-dev is wrong on the internet isn't an incentive to write a series of blogposts to prove that person wrong, as there are a LOT of people wrong on the internet, every day. 

The main issue I have with the series of articles is that it's apparently a good thing to simply bash a person's code, as that apparently teaches people something. But that's silly, it only shows someone made bad choices and ended up with a pile of shit. Gee. 

If Oren wants to teach people how to do things right, he should write a series of blogposts about how to do it right. As that's 1) more efficient, 2) less bullying and 3) it actually teaches something. 

Because there are a million ways to do things the wrong way. Telling your audience this person's code is one of them isn't teaching anything. Well, only if you are first convinced that the way the code bashed to pieces is how you'd write it yourself. </description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment24</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment24</guid><pubDate>Sat, 14 Jan 2012 10:12:40 GMT</pubDate></item><item><title>Felice Pollano commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans Yes, declared by the authors, of course.But such a declaration  requires, if someone disagree, a well explained motivation, and this is what Ayende is trying to do. </description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment23</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment23</guid><pubDate>Sat, 14 Jan 2012 08:09:45 GMT</pubDate></item><item><title>gunteman commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans and Bryan

I wholeheartedly agree, but to fling some cold truth in the other direction, asking Ayende to be a gentleman is pointless. Such skills are not his forte. Zing.

Most of the bashing and bullying that happens on the net (and elsewhere) comes from people who can't assert themselves in any other way than by belittling others. Ayende is most certainly not in that position. Most of us envy his skills and insight. Still, for some reason, this continues to happen.

Also, I actually think this is hurting Hibernating Rhinos' bottom line. I know I'm not the only one who's very reluctant to send any money the way of such behavior. My loss, I guess, but still...</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment22</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment22</guid><pubDate>Sat, 14 Jan 2012 01:33:22 GMT</pubDate></item><item><title>flukus commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>A lot of us have to work with architecture this bad. Showing bad examples is just as important as showing good examples, it can help you realize when your going/gone down the wrong path.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment21</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment21</guid><pubDate>Fri, 13 Jan 2012 22:54:15 GMT</pubDate></item><item><title>comment commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>horrible architecture. i'm sorry for the poor coders that need to maintain this layers of shit</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment20</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment20</guid><pubDate>Fri, 13 Jan 2012 22:09:20 GMT</pubDate></item><item><title>Nick commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Regardless of context, this is a great post isn't it? Showing us precisely how we can abstract data access so far down the layers we don't realise what calls are being made to the database by our high-level code.

When we suddenly do realise, we've got to twist all those layers to gain performance...or in many case die trying.

I've written a lot of code with these abstractions, and it has been Ayende's posts that have taught me to really consider adding all those layers. 

Btw, Ayende has been on this developer's life and he stressed these weren't personal attacks. 

I shall remain impartial and continue to learn from "the master".

</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment19</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment19</guid><pubDate>Fri, 13 Jan 2012 20:00:47 GMT</pubDate></item><item><title>Tonio commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>+1 for Abdu</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment18</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment18</guid><pubDate>Fri, 13 Jan 2012 19:16:38 GMT</pubDate></item><item><title>Janus Knudsen commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>Frans Bouma, Bryan...
I fully respect your point of views, but this blog isn't about pedagogical instructions and avoid calling bad code for bad code. 

I think it's a blog for serious people who are willing to discuss and learn from each other, if some one wants a more educational soft approach they should attend a seminar instead.

Unfortunately the world is overflowed with people calling them self for developers, where in fact they only produce bad and smelly code. These people are producing bad code and gives software projects a bad reputation.
Why do you think nearly all public software projects takes twice as long as supposed and drain the public cent by cent?
</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment17</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment17</guid><pubDate>Fri, 13 Jan 2012 19:05:47 GMT</pubDate></item><item><title>Larz commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>This series is awful, and smacks of cyber-bullying. i'm gonna buy a copy of Raven so I know I'm safe and he won't attack my code.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment16</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment16</guid><pubDate>Fri, 13 Jan 2012 18:23:45 GMT</pubDate></item><item><title>Abdu commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans Like anything in life, pick the good and leave the bad behind. Putting his style aside, Ayende is one of the most .NET prolific bloggers and I thank him for his posts. 

Note1: I wrote a comment very similar to yours (http://ayende.com/blog/152706/application-review-northwind-starter-kit).

Note2: BTW, I am interested in see a comparison between your profiler an Ayende's. (I don't mean one by you)</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment15</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment15</guid><pubDate>Fri, 13 Jan 2012 18:00:32 GMT</pubDate></item><item><title>Frans Bouma commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Felice 
Declared by who? The author? So what! There are a lot of repositories on e.g. github where the author/developer thinks it's gods gift to humanity while it's a stinking pile of goo. Bashing that doesn't make the world better. It only makes the basher look like a person who thinks he never wrote bad code nor claimed the same thing. 

Sure it's extremely over-engineered and therefore isn't the best choice as an example, but you can tell that 1 sentence (I just did) and move on. </description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment14</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment14</guid><pubDate>Fri, 13 Jan 2012 16:10:49 GMT</pubDate></item><item><title>Joe commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>"In my next post, I’ll show a better way to handle this scenario. A way that is actually simpler and make use an of actual read model and not infinite levels of indirection."

Thanks.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment12</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment12</guid><pubDate>Fri, 13 Jan 2012 15:53:19 GMT</pubDate></item><item><title>Felice Pollano commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@Frans you are correct, but the NSK project is declared to be: "intended to be used as a blueprint when designing and implementing a .NET layered application architecture.", it is not just a someone else messy code...</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment11</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment11</guid><pubDate>Fri, 13 Jan 2012 14:23:04 GMT</pubDate></item><item><title>Derek commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>http://community.devexpress.com/blogs/seth/archive/2011/03/09/interview-with-ayende-rahien-aka-oren-eini.aspx

Interesting take on the repo pattern.</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment10</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment10</guid><pubDate>Fri, 13 Jan 2012 14:22:11 GMT</pubDate></item><item><title>Matt commented on Northwind Starter Kit Review: Data Access review thoughts</title><description>@linkgoron

Yes, IoC does help with ISession creation, but I still like a repository pattern to separate commands from queries.  

This is hard to explain succinctly, but say you have a windows service and a web project (yes, MVC3).  Both use shared services that handle your domain commands.  As the creator of the API, you do not know what COMBINATIONS of commands are required by the various platforms, you just provide the domain layer.

If, for example, there are two service methods that can be used separately in some instances, or together in others.  You don't want a transaction opened in each case, but you HAVE to, because they can be called independently and NHib doesn't supported nested transactions.  

I would like to see good advice on how these layers SHOULD be implemented, taking into account the following:

* how to implement a service layer, where the exposed methods can be used independently or together (when is the right time to create transactions, sessions, load entities, etc)
* where the BLL can be used from different tiers e.g. you want to put ISession objects in a "using" statement for a desktop app, but you don't want to do that in a web app - you want it cleaned up at the end of an Http web request using StructureMap or whatever.

I'm waffling now, but all I'm saying is I'd like to see more suggestions on best practice - what has been done in the Starter Kit project and how he SHOULD have done it, instead of just nailing the poor guy.
</description><link>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment9</link><guid>http://ayende.com/153058/northwind-starter-kit-review-data-access-review-thoughts#comment9</guid><pubDate>Fri, 13 Jan 2012 14:19:54 GMT</pubDate></item></channel></rss>