﻿<?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>NHibernate 4.0 released!</title><description>&lt;p&gt;You can get it &lt;a href="http://sourceforge.net/projects/nhibernate/?source=directory"&gt;here&lt;/a&gt;!&lt;/p&gt; &lt;p&gt;This has a lot of bug fixes, fitting into the .NET 4.x eco system and in general good stuff.&lt;/p&gt; &lt;p&gt;Probably my favorite one is the SQL Server 2012 paging, which is so &lt;em&gt;much&lt;/em&gt; easier to understand.&lt;/p&gt; &lt;p&gt;Happy hibernating…&lt;/p&gt;</description><link>http://ayende.com/167938/nhibernate-4-0-released?Key=732958ff-b3db-4c5c-a711-7cd51a7a20f5</link><guid>http://ayende.com/167938/nhibernate-4-0-released?Key=732958ff-b3db-4c5c-a711-7cd51a7a20f5</guid><pubDate>Thu, 21 Aug 2014 09:00:00 GMT</pubDate></item><item><title>NHibernate.RunFaster() secret toggle</title><description>&lt;p&gt;I keep getting asked by people: “What is the configuration option to make NHibernate run faster?”&lt;/p&gt; &lt;p&gt;People sort of assume that NHibernate is configured to be slow by default because it amuses someone.&lt;/p&gt; &lt;p&gt;Well, while there isn’t a “Secret_incantation” = “chicken/sacrifice” option in NHibernate, there is this one:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/NHibernate.RunFaster-secret-toggle_AB87/image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/NHibernate.RunFaster-secret-toggle_AB87/image_thumb.png" width="374" height="49"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And it pretty much does the same thing.&lt;/p&gt; &lt;p&gt;No, I won’t explain why. Go read the docs.&lt;/p&gt;
</description><link>http://ayende.com/164353/nhibernate-runfaster-secret-toggle?Key=587fe66e-0bcb-4146-96a6-cdb6e2df7df5</link><guid>http://ayende.com/164353/nhibernate-runfaster-secret-toggle?Key=587fe66e-0bcb-4146-96a6-cdb6e2df7df5</guid><pubDate>Thu, 28 Nov 2013 10:00:00 GMT</pubDate></item><item><title>Courses, courses! All you can learn!</title><description>&lt;p&gt;
	So here is my near term schedule:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		A &lt;a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahien-nhibernate-3-0-workshop/ps-398"&gt;2 days &lt;strong&gt;NHibernate&lt;/strong&gt; course&lt;/a&gt; in &lt;strong&gt;London&lt;/strong&gt; on &lt;strong&gt;Feb 25&lt;/strong&gt; &amp;ndash; those are intense 2 days where I am going to jump you from novice to master in NHibernate, including understanding &lt;em&gt;what is going on&lt;/em&gt; and much more importantly, &lt;em&gt;why?!&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;
		A &lt;a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahien-ravendb-workshop/ps-398"&gt;3 days RavenDB course&lt;/a&gt; in &lt;strong&gt;London&lt;/strong&gt; on &lt;strong&gt;Feb 27 &lt;/strong&gt;&amp;ndash; in this course we are going to go over RavenDB 2.x from top to bottom, from how it works, to all the little tricks and hidden details that you wished you knew. We are going to cover architecture, design, implementation and a lot of goodies. Also, there is going to be a lot of fun, and I promise that you go back to work with a lot less load on your shoulders.&lt;/li&gt;
	&lt;li&gt;
		A &lt;a href="http://www.labcenter.se/Lab/Mastering_RavenDB_-_with_Ayende_Rahien"&gt;2 days condensed RavenDB course&lt;/a&gt; in &lt;strong&gt;Stockholm&lt;/strong&gt; on &lt;strong&gt;Mar 4&lt;/strong&gt; &amp;ndash; Like the previous one, but with a sharper focus, and the guarantee that you will go Wow and Oh! on a regular basis.&lt;/li&gt;
&lt;/ul&gt;
</description><link>http://ayende.com/160931/courses-courses-all-you-can-learn?Key=d7454f63-6b41-488e-b986-8758bc441e16</link><guid>http://ayende.com/160931/courses-courses-all-you-can-learn?Key=d7454f63-6b41-488e-b986-8758bc441e16</guid><pubDate>Tue, 29 Jan 2013 10:00:00 GMT</pubDate></item><item><title>A week in London: RavenDB &amp; NHibernate training</title><description>&lt;p&gt;
	I&amp;rsquo;ll be spending the last week on November in London, at the Skills Matter offices.&lt;/p&gt;
&lt;p&gt;
	On the 26 Nov, I&amp;rsquo;ll be giving a &lt;a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahiens-nhibernate-3-0-workshop/ps-398"&gt;3 days NHibernate course&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
	And on the 29 Nov, I&amp;rsquo;ll be giving &lt;a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahiens-ravendb-workshop/ps-398"&gt;2 full days of RavenDB awesomeness&lt;/a&gt;. This course is scheduled to run along the same time as the RavenDB 1.2 release, which leads me to the In The Brains session I&amp;rsquo;ll be giving along the way.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&lt;a href="http://skillsmatter.com/podcast/design-architecture/what-is-new-in-ravendb-1-2/ps-398"&gt;What is new in RavenDB 1.2&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	RavenDB 1.0 was exciting and fun. RavenDB 1.2 builds on top of that and adds a whole host of really nice features.&lt;br /&gt;
	Come to hear about the new Changes API, or how you can use evil patching to make the database bow to your wished. Learn how you can add encryption and compression to your database in a few minutes, and watch how operational tasks became even simpler. In short, come and see all of the new stuff for RavenDB!&lt;/p&gt;
</description><link>http://ayende.com/159586/a-week-in-london-ravendb-nhibernate-training?Key=a667e460-1bdd-4631-ac46-0c7413839d9d</link><guid>http://ayende.com/159586/a-week-in-london-ravendb-nhibernate-training?Key=a667e460-1bdd-4631-ac46-0c7413839d9d</guid><pubDate>Wed, 24 Oct 2012 14:00:00 GMT</pubDate></item><item><title>On Umbraco’s NHibernate’s Pullout</title><description>&lt;p&gt;I was asked to comment on this topic:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb.png" width="529" height="116"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here is the link to the &lt;a href="http://our.umbraco.org/forum/core/umbraco-5-general-discussion/28565-Umbraco-5-Performance-issues?p=17"&gt;full article&lt;/a&gt;, but here is the gist:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt;.&lt;br&gt;The culprit of v5 is &lt;font style="background-color: #ffff00"&gt;our usage of NHibernate&lt;/font&gt;. This doesn't mean that NHibernate is evil, just that it has turned out to be the wrong fit for our project (in part due to our architecture and db schema, in part due to lack of proper NHibernate experience on the team). It's a &lt;font style="background-color: #ffff00"&gt;badly tamed NHibernate that is caused the many N+1 SQL statements&lt;/font&gt;. The long term solution is to&lt;font style="background-color: #00ff00"&gt; replace NHibernate with native, optimized SQL calls&lt;/font&gt;&lt;font style="background-color: #ffc000"&gt; &lt;/font&gt;but it's a bigger operation that we'll look into over the summer. The short team solution is to continue with finding as many bottlenecks as we can as tune those, combined with introducing a Lucene based cache provider which will cache queries and results which will survive app pool restarts (much like the v4 XML cache). The architecture has been prepared for the latter and we'll have this in place by the end of May.&lt;/p&gt; &lt;p&gt;&lt;br&gt;Another thing that causes massive performance issues is that we're seeing a trend &lt;font style="background-color: #ffff00"&gt;where people are calling ToList() on razor queries &lt;/font&gt;to compensate for the lack of LINQ features in our implementation. Unfortunately, this causes most (if not all) of the database to be loaded into memory, naturally causing big performance issues (and an enormous number of N+1 SQL calls). This leads us to...&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And a &lt;a href="http://our.umbraco.org/forum/core/umbraco-5-general-discussion/28565-Umbraco-5-Performance-issues?p=24"&gt;while later&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;V5 couldn't be fixed. We needed to completely rewrite the entire business layer to ever get v5 into being the type of product people expect from Umbraco&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I marked the parts that I intend to respond to in yellow, green highlight is for some additional thoughts later on, keep it in mind.&lt;/p&gt; &lt;p&gt;Now, to be fair, I looked at Umbraco a few times, but I never actually used it, and I never actually dug deep. &lt;/p&gt; &lt;p&gt;The entire problem can be summed in &lt;a href="http://our.umbraco.org/documentation/v501/reference/templating/DynamicModel"&gt;this page&lt;/a&gt;, from the Umbraco documentation site. This is the dynamic model that Umbraco exposes to the views to actually generate the HTML. From the docs:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;DynamicModel is a dynamic object, this gives us a number of obvious benefits, mostly a much lighter syntax for accessing data, as well as dynamic queries, based on the names of your DocumentTypes and their properties, but at the same time, it does not provide intellisense. &lt;p&gt;&lt;a name="Getstarted"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Any time you provide the view with a way to generate queries, it is a BIG issue. For the purpose of discussion, I’ll focus on the &lt;a href="\http://our.umbraco.org/documentation/v501/reference/templating/MacroPartials/samples/ListChildPagesFromChosenNode"&gt;following example&lt;/a&gt;,&amp;nbsp; also taken from Umbraco docs:&lt;/p&gt; &lt;blockquote&gt; &lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;@inherits PartialViewMacroPage&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;@&lt;span class="kwrd"&gt;using&lt;/span&gt; Umbraco.Cms.Web&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;@&lt;span class="kwrd"&gt;using&lt;/span&gt; Umbraco.Cms.Web.Macros&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;@&lt;span class="kwrd"&gt;using&lt;/span&gt; Umbraco.Framework&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;@{&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    @* Get the macro parameter and check it has a &lt;span class="kwrd"&gt;value&lt;/span&gt; - otherwise set to empty hive Id *@&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    var startNodeID = String.IsNullOrEmpty(Model.MacroParameters.startNodeID) ? HiveId.Empty.ToString() : Model.MacroParameters.startNodeID;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;}&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;@* Check that startNodeID &lt;span class="kwrd"&gt;is&lt;/span&gt; not an empty HiveID AND also check the &lt;span class="kwrd"&gt;string&lt;/span&gt; &lt;span class="kwrd"&gt;is&lt;/span&gt; a valid HiveID *@&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;@&lt;span class="kwrd"&gt;if&lt;/span&gt; (startNodeID != HiveId.Empty.ToString() &amp;amp;&amp;amp; HiveId.TryParse(startNodeID).Success)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    @* Get the start node &lt;span class="kwrd"&gt;as&lt;/span&gt; a dynamic node *@&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;    var startNode = Umbraco.GetDynamicContentById(startNodeID);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;    @* Check &lt;span class="kwrd"&gt;if&lt;/span&gt; the startNode has any child pages, &lt;span class="kwrd"&gt;where&lt;/span&gt; the property umbracoNaviHide &lt;span class="kwrd"&gt;is&lt;/span&gt; not True *@    &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (startNode.Children.Where(&lt;span class="str"&gt;"umbracoNaviHide != @0"&lt;/span&gt;, &lt;span class="str"&gt;"True"&lt;/span&gt;).Any())&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        &amp;lt;ul&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;            @* For each child page under startNode, &lt;span class="kwrd"&gt;where&lt;/span&gt; the property umbracoNaviHide &lt;span class="kwrd"&gt;is&lt;/span&gt; not True *@&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;            @&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var page &lt;span class="kwrd"&gt;in&lt;/span&gt; startNode.Children.Where(&lt;span class="str"&gt;"umbracoNaviHide != @0"&lt;/span&gt;, &lt;span class="str"&gt;"True"&lt;/span&gt;))&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;            { &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                &amp;lt;li&amp;gt;&amp;lt;a href=&lt;span class="str"&gt;"@page.Url"&lt;/span&gt;&amp;gt;@page.Name&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        &amp;lt;/ul&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;    }    &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a great example of why you should never do queries from the views. Put simply, you don’t have any idea what is going to happen. Let us start going through the onion, and see where we get.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Umbraco.GetDynamicContentById &lt;/strong&gt;– Is actually UmbracoHelper.GetDynamicContentById, which looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_1.png" width="760" height="123"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I mean, I guess I could just stop right here, look at the first line, and it should tell you everything. But let us dig deeper. Here is what GetById looks like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_2.png" width="609" height="110"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Note that with NHibernate, this is a worst practice, because it forces a query, rather than allow us to use the session cache and a more optimized code paths that Load or Get would use.&lt;/p&gt;
&lt;p&gt;Also, note that this is generic on top of an IQueryable, so we have to go one step back and look at Cms().Content, which is implemented in:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_3.png" width="918" height="395"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I just &lt;em&gt;love&lt;/em&gt; how we dispose of the Unit of Work that we just created, &lt;em&gt;before it is used by any client&lt;/em&gt;. But let us dig a bit deeper, okay?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_10.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_4.png" width="1297" height="133"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_12.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_5.png" width="1413" height="310"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_14.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_6.png" width="1132" height="100"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And we &lt;em&gt;still&lt;/em&gt; haven’t found NHibernate! That is the point where I give up, I am pretty sure that Umbraco 5 is using NHibernate, I just can’t find how or where.&lt;/p&gt;
&lt;p&gt;Note that in those conditions, it is pretty much settled that any optimizations that you can offer isn’t going to work, since you don’t have any good way to apply it, it is so hidden behind all those layers.&lt;/p&gt;
&lt;p&gt;But I am pretty sure that it all end up with a Linq query on top of&amp;nbsp; a session.Query&amp;lt;Content&amp;gt;(), so I’ll assume that for now.&lt;/p&gt;
&lt;p&gt;So we have this query in line 15, to load the object, then, on line 18, we issue what looks like a query:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (startNode.Children.Where(&lt;span class="str"&gt;"umbracoNaviHide != @0"&lt;/span&gt;, &lt;span class="str"&gt;"True"&lt;/span&gt;).Any())&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;We actually issue two queries here, one to load the Children collection, and the second in the Where(). It took a while to figure out what the Where was, but I am pretty sure it is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_16.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/On-Umbracos-NHibernates-Pullout_D9F0/image_thumb_7.png" width="1203" height="114"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Which translate the string to a Linq query, which then have to be translated to a string again. To be perfectly honest, I have no idea if this is executed against the database ( I assume so ) or against the in memory collection.&lt;/p&gt;
&lt;p&gt;Assuming it is against the database, then we issue the same query again, two lines below that.&lt;/p&gt;
&lt;p&gt;And this is in a small sample, think about the implications for a more complex page. When you have most of you data access so abstracted, it is very hard to &lt;em&gt;see&lt;/em&gt; what is going on, let alone do any optimizations. And when you are doing data access in the view, the very last thing that the developer has in his mind is optimizing data access.&lt;/p&gt;
&lt;p&gt;This is just setting up for failure. Remember what I said about: &lt;font style="background-color: #00ff00"&gt;replace NHibernate with native, optimized SQL calls&lt;/font&gt;, this is where it gets interesting. Just about every best practice of NHibernate was violated here, but the major problem is &lt;em&gt;not&lt;/em&gt; the NHibernate usage. The major problem is that there is very little correlation between what is happening and the database. And the number of queries that are likely to be required to generate each page are truly enormous.&lt;/p&gt;
&lt;p&gt;You don’t issues queries from the view, that is the #1 reason for SELECT N+1, and when you create a system where that seems to be the primary mode of operation, that is always going to cause you issues.&lt;/p&gt;
&lt;p&gt;Replace NHibernate with optimized SQL calls, but you are still making tons of direct calls to the DB from the views. &lt;/p&gt;
&lt;p&gt;I actually agree with the Umbraco decision, it &lt;em&gt;should&lt;/em&gt; be re-written. But the starting point isn’t just the architectural complexity. The starting point should be the actual interface that you intend to give to the end developer.&lt;/p&gt;</description><link>http://ayende.com/156577/on-umbraco-s-nhibernate-s-pullout?Key=f86428f3-23b0-4d7d-9878-9aefd8b086da</link><guid>http://ayende.com/156577/on-umbraco-s-nhibernate-s-pullout?Key=f86428f3-23b0-4d7d-9878-9aefd8b086da</guid><pubDate>Fri, 15 Jun 2012 09:00:00 GMT</pubDate></item><item><title>What have we been up to? And some future plans</title><description>&lt;p&gt;We have been head down for a while, doing some really cool things with RavenDB (sharding, read striping, query intersection, indexing reliability and more). But that meant that for a while,things that are not about writing code for RavenDB has been more or less on auto-pilot.&lt;/p&gt; &lt;p&gt;So here are some things that we are planning. We will increase the pace of RavenDB courses and conference presentation. You can track it all in the &lt;a href="http://ravendb.net/events"&gt;RavenDB events page&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Conferences&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://skillsmatter.com/event/nosql/progressive-nosql-tutorials"&gt;Progressive NoSQL – RavenDB – 2nd generation document database&lt;/a&gt;.– May 9&amp;nbsp; London – I’ll be talking about RavenDB to a crowd of NoSQL enthusiastic, should be interesting, especially the compare &amp;amp; contrast part.  &lt;li&gt;&lt;a href="http://skillsmatter.com/podcast/home/ayende-ravendb/js-3919"&gt;Sharding and Scaling with RavenDB&lt;/a&gt; – May 15, London – Prepare for some truly awesome demos.  &lt;li&gt;&lt;a href="http://devsum.se/talare/ayende-rahien/"&gt;DevSum 20120 - RavenDB and the Amazing Features&lt;/a&gt; – May 23 , Stockholm, I am going to try and go through some of the more cool features of RavenDB, stuff that is going to make you go gaga wanting to use it.  &lt;li&gt;&lt;a href="http://ndcoslo.oktaset.com/t-4913"&gt;NDC 2012 – RavenDB Data Modeling&lt;/a&gt; – June 7, Oslo. Itamar is going to go over how to model data in RavenDB. This is one of the greatest challenges people moving over to RavenDB from RDBMS are facing, and Itamar is going to cover common scenarios and walkthrough about how to approach the problem.  &lt;li&gt;&lt;a href="http://oredev.org/"&gt;Ordev 2012 - Sharding and Scaling with RavenDB&lt;/a&gt; – Nov 5, Malmo.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;RavenDB Courses&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="mailto:R@RavenDB Workshop"&gt;2 Days RavenDB Workshop&lt;/a&gt; – Oren Eini – May 14, London.  &lt;li&gt;&lt;a href="http://www.cornerstone.se/Web/Templates/CoursePage.aspx?id=2513&amp;amp;course=COUR2012012314201105395937&amp;amp;epslanguage=SV"&gt;2 Days RavenDB Workshop&lt;/a&gt; – Oren Eini – May 21, Stockholm.  &lt;li&gt;&lt;a href="http://www.ndcoslo.com/Workshop/ravendb"&gt;2 Days RavenDB Workshop&lt;/a&gt; – Itamar Syn-Hershko – June 4, Oslo.  &lt;li&gt;&lt;a href="http://www.labcenter.se/lab/2129"&gt;2 Days RavenDB Workshop&lt;/a&gt; – Oren Eini – June 28, Malmo.  &lt;li&gt;&lt;a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahien-ravendb-workshop-nyc/ps-3784"&gt;2 Days RavenDB Workshop&lt;/a&gt; – Itamar Syn-Hershko – Aug 21, New York.  &lt;li&gt;&lt;a href="https://skillsmatter.com/register-online/course/2436"&gt;2 Days RavenDB Workshop&lt;/a&gt; – Itamar Syn-Hershko – Sep 12, London.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;NHibernate Courses&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahiens-nhibernate-3-0-workshop/ps-398"&gt;3 Days NHibernate 3.x Workshop&lt;/a&gt; – Oren Eini, May 16, London.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Not finalized yet&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;August 2012.  &lt;ul&gt; &lt;li&gt;User groups talks in Philadelphia &amp;amp; Washington DC by Itamar Syn-Hershko.  &lt;li&gt;One day boot camp for moving from being familiar with RavenDB to being a master in Chicago.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;September 2012.  &lt;ul&gt; &lt;li&gt;RavenDB Course in Austin, Texas.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Consulting Opportunities&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We are also available for on site consulting in the following locations and times. Please contact us directly if you would like to arrange for one of RavenDB core team to show up at your door step. Or if you want me to do architecture or NHibernate consulting.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Oren Eini – Malmo, June 26 – 27.  &lt;li&gt;Oren Eini – Berlin, July 2 – 4.  &lt;li&gt;Itamar Syn-Hershko – New York, Aug 23.  &lt;li&gt;Itamar Syn-Hershko – Chicago, Aug 30 or Sep 3.  &lt;li&gt;Itamar Syn-Hershko – Austin, Sep 3.  &lt;li&gt;Itamar Syn-Hershko – Toronto, Sep 9 – 10.  &lt;li&gt;Itamar Syn-Hershko – London, Sep 11.&lt;/li&gt;&lt;/ul&gt;</description><link>http://ayende.com/155649/what-have-we-been-up-to-and-some-future-plans?Key=abbae717-a233-4f7f-a84c-fdeba1b59459</link><guid>http://ayende.com/155649/what-have-we-been-up-to-and-some-future-plans?Key=abbae717-a233-4f7f-a84c-fdeba1b59459</guid><pubDate>Fri, 30 Mar 2012 10:00:00 GMT</pubDate></item><item><title>Taking a look at S#arp Lite–final thoughts</title><description>&lt;p&gt;&lt;img style="display: inline; float: right" align="right" src="http://devlicio.us/resized-image.ashx/__size/300x0/__key/CommunityServer.Blogs.Components.WeblogFiles/billy_5F00_mccafferty/SharpLite_5F00_Logo.png"&gt;This is a review of the &lt;a href="https://github.com/codai/Sharp-Lite"&gt;S#arp Lite project&lt;/a&gt;, the version from Nov 4, 2011.  &lt;p&gt;This project is significantly better than the S#arp Arch project that I reviewed a while ago, but that doesn’t mean that it is good. There is a lot to like, but frankly, the insistence to &lt;em&gt;again&lt;/em&gt; abstract the data access behind complex base classes and repositories makes things much harder in the longer run.  &lt;p&gt;If you are writing an application and you find yourself writing abstractions on top of CUD operations, stop, you are doing it wrong.  &lt;p&gt;I quite like S#arp approach for querying, though. You expose things directly, and if it is ugly, you just wrap it in a dedicated query object. That is how you should be handling things.  &lt;p&gt;Finally, whenever possible, push things to the infrastructure, it is usually pretty good and that is the right level of handling things like persistence, validation, etc. And no, you don’t have to write that, it is already there.  &lt;p&gt;A lot of the code in the sample project was simply to manage persistence and validation (in fact, there was an entire project for that) that could be safely deleted in favor of:  &lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ValidationListener : NHibernate.Event.IPreUpdateEventListener, NHibernate.Event.IPreInsertEventListener
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; OnPreUpdate(PreUpdateEvent @&lt;span class="kwrd"&gt;event&lt;/span&gt;)
    {
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (!DataAnnotationsValidator.TryValidate(@&lt;span class="kwrd"&gt;event&lt;/span&gt;.Entity)) 
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;"Updated entity is in an invalid state"&lt;/span&gt;);

        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; OnPreInsert(PreInsertEvent @&lt;span class="kwrd"&gt;event&lt;/span&gt;)
    {
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (!DataAnnotationsValidator.TryValidate(@&lt;span class="kwrd"&gt;event&lt;/span&gt;.Entity))
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;"Updated entity is in an invalid state"&lt;/span&gt;);

        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;Register that with NHibernate, and it will do that validation work for you, for example. Don’t try too hard, it &lt;em&gt;should&lt;/em&gt; be simple, if it ain’t, you are either doing something very strange or you are doing it wrong, and I am willing to bet on the later.&lt;/p&gt;
&lt;p&gt;To be clear, the problems that I had with the codebase were mostly with regards to the data access portions. I didn’t have any issues with the rest of the architecture.&lt;/p&gt;</description><link>http://ayende.com/153569/taking-a-look-at-s-arp-lite-final-thoughts?Key=fcab01f8-ca05-4dbe-be7d-ed4105b552ed</link><guid>http://ayende.com/153569/taking-a-look-at-s-arp-lite-final-thoughts?Key=fcab01f8-ca05-4dbe-be7d-ed4105b552ed</guid><pubDate>Thu, 08 Mar 2012 10:00:00 GMT</pubDate></item><item><title>Taking a look at S#arp Lite– The MVC parts</title><description>&lt;p&gt;This is a review of the &lt;a href="https://github.com/codai/Sharp-Lite"&gt;S#arp Lite project&lt;/a&gt;, the version from Nov 4, 2011.&lt;/p&gt; &lt;p&gt;Okay, after going over all of the rest of the application, let us take a look a the parts that actually &lt;em&gt;do&lt;/em&gt; something. &lt;/p&gt; &lt;p&gt;the following are from the CustomerController:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite-The-MVC-parts_1058/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite-The-MVC-parts_1058/image_thumb.png" width="456" height="314"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It is fairly straight forward, all in all. Of course, the problem is that is isn’t doing much. The moment that it does, we are going to run into problems. Let us move a different controller, ProductController and the Index action:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite-The-MVC-parts_1058/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite-The-MVC-parts_1058/image_thumb_1.png" width="432" height="92"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Seems fine, right? Except that in the view…&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite-The-MVC-parts_1058/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite-The-MVC-parts_1058/image_thumb_2.png" width="435" height="231"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As you can see, we got a Select N+1 here. I’ll admit, I actually had to spend a moment or two to look for it (hint, look for @foreach&amp;nbsp; in the view, that is usually an indication of a place that requires attention).&lt;/p&gt; &lt;p&gt;The problem is that we really don’t have anything to do about it. If we want to resolve this, we would have to create our own query object to completely encapsulate the query. But all we need is to just add a FetchMany and we are done, except that there is that nasty OR/M abstraction that doesn’t do much except make our life harder.&lt;/p&gt;</description><link>http://ayende.com/153537/taking-a-look-at-s-arp-lite-the-mvc-parts?Key=a56dbd94-bda5-400c-99a3-7da804aceed4</link><guid>http://ayende.com/153537/taking-a-look-at-s-arp-lite-the-mvc-parts?Key=a56dbd94-bda5-400c-99a3-7da804aceed4</guid><pubDate>Wed, 07 Mar 2012 10:00:00 GMT</pubDate></item><item><title>Taking a look at S#arp Lite, Part III–tasks</title><description>&lt;p&gt;This is a review of the &lt;a href="https://github.com/codai/Sharp-Lite"&gt;S#arp Lite project&lt;/a&gt;, the version from Nov 4, 2011.&lt;/p&gt; &lt;p&gt;So far, we have gone over the general structure and the domain. Next on the list is going over the tasks project. No idea what this is. I would expect that to be some sort of long running, background tasks, but haven’t checked it yet.&lt;/p&gt; &lt;p&gt;Unfortunately, this isn’t the case. Tasks seems to be about another name for DAL. And to make matter worse, this is a DAL on top or a Repository on top of an OR/M. &lt;/p&gt; &lt;p&gt;And as if that wasn’t enough to put my teeth on edge, we got some really strange things going on there. Let us see how it goes.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/0efd1e3fa8b9_79F/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/0efd1e3fa8b9_79F/image_thumb.png" width="628" height="196"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Basically, a CudTask seems to be all about translating from the data model (I intentionally don’t call it domain model) to the view model. I spoke about the issues with repositories many times before, so I’ll suffice with saying that this is still wasteful and serve no real purpose and be done with it.&lt;/p&gt; &lt;p&gt;This TransferFormValuesTo() is a strange beast, and it took me a while to figure out what is going on here. let us look in the parent class to figure out what is going on there.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/0efd1e3fa8b9_79F/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/0efd1e3fa8b9_79F/image_thumb_1.png" width="1010" height="475"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Let me count the things that are wrong here.&lt;/p&gt; &lt;p&gt;First, we have this IsTransient() method, why do we have that? All we need to do is just to call SaveOrUpdate and it will do it for us. Then the rest of the method sunk in. &lt;/p&gt; &lt;p&gt;The way this system works, you are going to have &lt;em&gt;two &lt;/em&gt;instances of every entity that you load (not really true, by the way, because you have leakage for references, which must cause some really interesting bugs). One instance is the one that is managed by NHibernate, dealing with lazy loading, change management, etc. The second is the value that &lt;em&gt;isn’t&lt;/em&gt; managed by NHibernate. I assume that this is an instance that you get when you bind the entity view the action parameters.&lt;/p&gt; &lt;p&gt;NHibernate contains &lt;em&gt;explicit &lt;/em&gt;support for handling that (session.Merge), and that support is there for &lt;em&gt;bad application&lt;/em&gt;s. You shouldn’t be doing things this way. Extend the model binder so it would load the entity from NHibernate and bind to that instance directly. You wouldn’t have to worry about all of this code, it would just work.&lt;/p&gt; &lt;p&gt;For that matter, the same goes for validation as well, you can push that into NHibernate as a listener. So all of this code just goes away, poof!&lt;/p&gt; &lt;p&gt;And then there is the Delete method:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/0efd1e3fa8b9_79F/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/0efd1e3fa8b9_79F/image_thumb_2.png" width="902" height="374"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I mean, is there a &lt;strong&gt;rule&lt;/strong&gt; that says “developers should discard error information as soon as possible, because it is useless.” I mean, the next step is to see C# code littered with things like:&lt;/p&gt; &lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;catch&lt;/span&gt;(Exception e)
{
   &lt;font color="#0000ff"&gt;delete&lt;/font&gt; e; &lt;span class="rem"&gt;// early release for the memory held by the exception&lt;/span&gt;
}&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;The one good thing that I can say about the CudTasks is that at least they are explicit about not handling reads, and that reads seems to be handled properly so far (but I haven’t looked at the actual code yet).&lt;/p&gt;</description><link>http://ayende.com/153505/taking-a-look-at-s-arp-lite-part-iii-tasks?Key=6228ac6f-7151-45e1-8b29-dd873e7a6d99</link><guid>http://ayende.com/153505/taking-a-look-at-s-arp-lite-part-iii-tasks?Key=6228ac6f-7151-45e1-8b29-dd873e7a6d99</guid><pubDate>Tue, 06 Mar 2012 10:00:00 GMT</pubDate></item><item><title>Taking a look at S#arp Lite, Part II–the domain</title><description>&lt;p&gt;This is a review of the &lt;a href="https://github.com/codai/Sharp-Lite"&gt;S#arp Lite project&lt;/a&gt;, the version from Nov 4, 2011.&lt;/p&gt; &lt;p&gt;In my previous post, I looked at the general structure, but not much more. In this one, we are going to focus on the Domain project.&lt;/p&gt; &lt;p&gt;We start with the actual domain:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_thumb.png" width="781" height="533"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I have only few comments about this sort of model:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;This is a pure CRUD model, which is good, since it is simple and easy to understand, but one does wonder where the actual business logic of the system is. It might be that there isn’t any (we &lt;em&gt;are&lt;/em&gt; talking about a sample app, after all).  &lt;li&gt;The few methods that are there are also about data (in this case, aggregation, and Order.GetTotal() will trigger a lazy loaded query when called, which might be a surprise to the caller.  &lt;li&gt;Probably the worst point of this object model is that it is &lt;em&gt;highly connected&lt;/em&gt;, which encourages people to try to walk the object graphs where they should issue a separate query instead.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Next, let us look at the queries. We have seen one example where NHibernate low level API was hidden behind an interface, but that was explicitly called out as rare. So how does this get handled on a regular basis?&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_thumb_1.png" width="863" height="603"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Hm… I have some issues here with regards to the naming. I don’t like the “Find” vs. “Query” naming. I would use WhereXyz to add a filter and SelectXyz to add a transformation. It would read better when writing Linq queries, but that is about it for the domain. &lt;/p&gt; &lt;p&gt;One thing that I haven’t touched so far is the entities base class:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_thumb_2.png" width="398" height="72"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And its parent:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/ff52a6fb7643_340/image_thumb_3.png" width="651" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I strongly support the notion of ComparableObject, this is recommended when you use NHibernate. But what is it about GetTypeSpecificSignatureProperties? What it actually does is select all the properties that has the [DomainSignature] attribute. But what would you want something like that? &lt;/p&gt; &lt;p&gt;Looking at the code, the Customer.FirstName and Customer.LastName have this attribute, looking at the code, I really can’t understand what went on here. This seems to be selected specifically to create hard to understand and debug bugs.&lt;/p&gt; &lt;p&gt;Why do I say that? The ComparableObject uses properties marked with [DomainSignature] for the GetHashCode() calculation. What this means is that &lt;em&gt;if you change the customer name you change its hash code value&lt;/em&gt;. This hash code value is used for, among other things, finding the entity in the unit of work, so changing the customer name can cause NHibernate to loose track of it and behave in some really strange ways.&lt;/p&gt; &lt;p&gt;This is also violating one of the &lt;strong&gt;core &lt;/strong&gt;principals of &lt;a href="https://www.google.com/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=entity#hl=en&amp;amp;q=entity&amp;amp;tbs=dfn:1&amp;amp;tbo=u&amp;amp;sa=X&amp;amp;ei=ItwHT87DIs2gtwfz7qnQBg&amp;amp;ved=0CC8QkQ4&amp;amp;bav=on.2,or.r_gc.r_pw.,cf.osb&amp;amp;fp=a832e4bee034e5be&amp;amp;biw=1599&amp;amp;bih=815"&gt;entities&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;A thing with distinct and independent existence.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In other words, an entity doesn’t exists because of the particular values that are there for the first and last names. If those change, the customer doesn’t change. It is the same as saying that by changing the shirt I wear, I becomes a completely different person.&lt;/p&gt; &lt;p&gt;Domain Signature is something that I am completely opposed, not only for the implementation problems, but because it has no meaning when you start to consider what an entity &lt;em&gt;is&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;Next, we are going to explore tasks…&lt;/p&gt;</description><link>http://ayende.com/153473/taking-a-look-at-s-arp-lite-part-ii-the-domain?Key=489a72ca-eb04-45d9-9d78-826e4eb042d0</link><guid>http://ayende.com/153473/taking-a-look-at-s-arp-lite-part-ii-the-domain?Key=489a72ca-eb04-45d9-9d78-826e4eb042d0</guid><pubDate>Fri, 02 Mar 2012 10:00:00 GMT</pubDate></item><item><title>Taking a look at S#arp Lite, Part I</title><description>&lt;p&gt;This is a review of the &lt;a href="https://github.com/codai/Sharp-Lite"&gt;S#arp Lite project&lt;/a&gt;, the version from Nov 4, 2011.&lt;/p&gt; &lt;p&gt;I was asked to review this project a long time ago, but I never got around to it. I had some time and I decided that I might take a look and see how it goes. I don’t like the S#arp Arch project, because it seems too complex and heavy weight for the purpose.&lt;/p&gt; &lt;p&gt;The project comes with a sample application, which is good, because it is easy to see how the framework is intended to be used. Unfortunately, it is &lt;em&gt;yet another&lt;/em&gt; online store example, I am getting heartily sick of that. On the other hand, it is a fairly simple model and easy to understand, so I grok why this keeps getting chosen.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Review Rule, I look at the &lt;em&gt;code&lt;/em&gt;. If I wanted to deal with documentation, I would write some for our products. I am doing this because I find it fun to look at other people’s code. So skip any comments about “if you read the docs…”. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;We start from the project structure:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_thumb.png" width="232" height="157"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I am not sure if I like it, I don’t know if I agree that all of those splits are needed, but this is well within reasonable limits, so I am willing to let it slide on the grounds that this is personal taste more than anything else. Looking at the dependencies, we see:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_thumb_1.png" width="897" height="645"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The Init project contains two files, which are responsible for… well, starting up, it seems. Again, I don’t see any reason why this would be a separate project, but that is about it so far.&lt;/p&gt; &lt;p&gt;Next in line is the NHibernateProvider project, in this case, we have the following:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_thumb_2.png" width="292" height="173"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So far, I am cautiously optimistic. All of the files / folders marked with red are actually all about &lt;em&gt;setting NHibernate up&lt;/em&gt;, not about hiding it. But then we get to the read me file, which reads in part:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;This folder contains any concrete, NHibernate-specific query classes.&lt;br&gt;There should only be classes in here for any respective query *interfaces* found in &lt;br&gt;/MyStore.Domain/Queries/&lt;/p&gt; &lt;p&gt;This folder will usually be empty except for very exceptive cases.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is… interesting. Can’t say whatever I agree or not yet. Looking at the QueryForProductOrderSummaries, we see:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Taking-a-look-at-Sarp-Lite_14CDC/image_thumb_3.png" width="700" height="375"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Note the comment, there &lt;em&gt;are&lt;/em&gt; better ways to do it, but we demonstrate an ugly way, and how to nicely encapsulate it.&lt;/p&gt; &lt;p&gt;That is enough for now, I think, next post, I’ll touch on the actual model…&lt;/p&gt;</description><link>http://ayende.com/153441/taking-a-look-at-s-arp-lite-part-i?Key=e698d1fe-b6e2-4f35-b4d0-2ed2701b59b5</link><guid>http://ayende.com/153441/taking-a-look-at-s-arp-lite-part-i?Key=e698d1fe-b6e2-4f35-b4d0-2ed2701b59b5</guid><pubDate>Thu, 01 Mar 2012 10:00:00 GMT</pubDate></item><item><title>Win Free Copies of Nhibernate 3 Beginner's Guide</title><description>&lt;p&gt;I have teamed up with Packt Publishing and we are organizing a Giveaway for&amp;nbsp; three lucky who winners stand a chance to win a copy of the NHibernate 3 Beginner’s Guide.  &lt;blockquote&gt; &lt;h3&gt;Overview of Nhibernate 3 Beginner's Guide&lt;/h3&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/3bedfbea1ec6_9E3D/clip_image002_2.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://ayende.com/blog/Images/Windows-Live-Writer/3bedfbea1ec6_9E3D/clip_image002_thumb.jpg" width="281" height="301"&gt;&lt;/a&gt; &lt;p&gt;· Clear, precise step-by-step directions to get you up and running quickly  &lt;p&gt;· Test, profile, and monitor data access to tune the performance and make your applications fly  &lt;p&gt;· Reduce hours of application development time and get better application architecture and performance  &lt;p&gt;Read more about this book and download free: &lt;a href="http://link.packtpub.com/K4iYN8"&gt;Sample Chapter&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;How to Enter?&lt;/b&gt; &lt;p&gt;All you need to do is head on over to the &lt;a href="http://link.packtpub.com/K4iYN8"&gt;book page&lt;/a&gt; and look through the product description of this book and drop a line via the &lt;b&gt;comments below to let us know what interests you the most about this book&lt;/b&gt;. It’s that simple &lt;p&gt;Product description for NHibernate book: &lt;a href="http://www.packtpub.com/nhibernate-3-beginners-guide/book"&gt;http://www.packtpub.com/nhibernate-3-beginners-guide/book&lt;/a&gt; &lt;p&gt;Winners from the U.S. and Europe can either choose a physical copy of the book or the eBook. Users from other locales are limited to the eBook only. &lt;p&gt;&lt;strong&gt;Deadline&lt;/strong&gt; &lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt; &lt;p&gt;&lt;b&gt;The contest will close on 31/12/11 PT. Winners will be contacted by email, so be sure to use your real email address when you comment!&lt;/b&gt;</description><link>http://ayende.com/144385/win-free-copies-of-nhibernate-3-beginners-guide?Key=79b1747d-dc78-4316-8f30-b4810211a95a</link><guid>http://ayende.com/144385/win-free-copies-of-nhibernate-3-beginners-guide?Key=79b1747d-dc78-4316-8f30-b4810211a95a</guid><pubDate>Thu, 08 Dec 2011 10:00:00 GMT</pubDate></item><item><title>NHibernate vs. Entity Framework: Usage</title><description>&lt;p&gt;This is in a response to a question on twitter:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/NHibernate-vs.-Entity-Framework-Usage_B46A/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/NHibernate-vs.-Entity-Framework-Usage_B46A/image_thumb_2.png" width="697" height="120"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In general, for applications, I would always use NHibernate. Mostly because I am able to do so much more with it. &lt;/p&gt; &lt;p&gt;For one off utilities and such, where I just need to get the data and I don’t really care how, I would generally just use the EF wizard to generate a model and do something with it. Mostly, it is so I can get the code gen stuff ASAP and have the data working.&lt;/p&gt; &lt;p&gt;For example, the routine to &lt;a href="https://github.com/ayende/RaccoonBlog/blob/master/RaccoonBlog.ImportFromSubtext/Program.cs"&gt;import the data from the Subtext database to the RacconBlog database&lt;/a&gt; is using Entity Framework. Mostly because it is easier and it is a one time thing.&lt;/p&gt; &lt;p&gt;I guess that if I was running any of the tools for generating NHibernate model from the database, I would be using it, but honestly, it just doesn’t really matter at that point. I just don’t &lt;em&gt;care&lt;/em&gt; for those sort of tools.&lt;/p&gt;</description><link>http://ayende.com/137217/nhibernate-vs-entity-framework-usage?Key=16d54d1f-0095-49a8-ab9d-09324a3aacd9</link><guid>http://ayende.com/137217/nhibernate-vs-entity-framework-usage?Key=16d54d1f-0095-49a8-ab9d-09324a3aacd9</guid><pubDate>Thu, 24 Nov 2011 10:00:00 GMT</pubDate></item><item><title>When should you use NHibernate?</title><description>&lt;p&gt;If you are using a relational database, and you are going to do writes, you want to use NHibernate.&lt;/p&gt; &lt;p&gt;If all you are doing are reads, you don’t need NHibernate, you can use something like Massive instead, and it would probably be easier. But when you have read &amp;amp; writes on a relational database, NHibernate is going to be a better choice.&lt;/p&gt; &lt;p&gt;That said, look for the next post about when you should be using a relational database.&lt;/p&gt;</description><link>http://ayende.com/136195/when-should-you-use-nhibernate?Key=2ab3f207-036e-49f1-ac2b-56205205426d</link><guid>http://ayende.com/136195/when-should-you-use-nhibernate?Key=2ab3f207-036e-49f1-ac2b-56205205426d</guid><pubDate>Fri, 18 Nov 2011 10:00:00 GMT</pubDate></item><item><title>Reminder: RavenDB and NHibernate courses–New York coming up</title><description>&lt;p&gt;This is a reminder that the RavenDB and NHibernate courses are coming to New York at the end of this month:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.eventbee.com/event?eid=863437225"&gt;Advanced NHibernate Course - New York, 31 October 2011&lt;/a&gt; &lt;li&gt;&lt;a href="http://www.eventbee.com/event?eid=833838224"&gt;RavenDB Course – 3 November 2011&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;There are still open places if you want to register, so hurry up.&lt;/p&gt;</description><link>http://ayende.com/117761/reminder-ravendb-and-nhibernate-courses-new-york-coming-up?Key=760b633c-382c-4e8d-8b68-85a67fd768db</link><guid>http://ayende.com/117761/reminder-ravendb-and-nhibernate-courses-new-york-coming-up?Key=760b633c-382c-4e8d-8b68-85a67fd768db</guid><pubDate>Fri, 07 Oct 2011 07:43:55 GMT</pubDate></item><item><title>Advanced NHibernate Course - Warsaw, October 2011</title><description>&lt;p&gt;This is a reminder, my Advanced NHibernate Course will take place in Warsaw on the 17 – 19 Oct. There are still three places left, so if you want to register, you have better do so quickly.&lt;/p&gt; &lt;p&gt;You can register via: &lt;a title="http://www.eventbee.com/event?eid=887726315" href="http://www.eventbee.com/event?eid=887726315"&gt;http://www.eventbee.com/event?eid=887726315&lt;/a&gt;&lt;/p&gt;</description><link>http://ayende.com/110593/advanced-nhibernate-course-warsaw-october-2011?Key=31c4f04b-7d84-43d9-befc-1a5570596ed9</link><guid>http://ayende.com/110593/advanced-nhibernate-course-warsaw-october-2011?Key=31c4f04b-7d84-43d9-befc-1a5570596ed9</guid><pubDate>Tue, 27 Sep 2011 10:00:00 GMT</pubDate></item><item><title>NHibernate 3 Beginners Guide published</title><description>&lt;p&gt;&lt;img style="display: inline; float: right" alt="image" align="right" src="http://lostechies.com/gabrielschenker/files/2011/08/image_thumb.png"&gt;&lt;a href="http://www.packtpub.com/nhibernate-3-beginners-guide/book"&gt;NHibernate 3 Beginners Guide&lt;/a&gt; has finally been published.&lt;/p&gt; &lt;p&gt;This books covers 3.1 (and some parts of 3.x) and was written by &lt;a href="http://lostechies.com/gabrielschenker/author/gabrielschenker/"&gt;Gabriel Schenker&lt;/a&gt;, who has been maintaining the NHibernate FAQ blog for a while, and a friend of mine.&lt;/p&gt; &lt;p&gt;Please check it out, and the &lt;a href="http://lostechies.com/gabrielschenker/2011/08/29/nhibernate-3-beginners-guide-published/"&gt;full blog post about it&lt;/a&gt;.&lt;/p&gt;</description><link>http://ayende.com/83969/nhibernate-3-beginners-guide-published?Key=694886a7-af4e-4606-b777-dd9fcd3ac4f2</link><guid>http://ayende.com/83969/nhibernate-3-beginners-guide-published?Key=694886a7-af4e-4606-b777-dd9fcd3ac4f2</guid><pubDate>Mon, 05 Sep 2011 09:00:00 GMT</pubDate></item><item><title>NHibernate &amp; RavenDB Courses in New York, October/November 2011</title><description>&lt;p&gt;I think that the NHibernate and RavenDB workshops in DevLink has been awesome, and I have been asked to do more of those.&lt;/p&gt; &lt;p&gt;One thing that I learned in particular from the RavenDB workshop is that just one day is just not enough, and we expanded the single day workshop into a two days course. I’ll be giving this course in November, 3 – 4 2011, in New York.&lt;/p&gt; &lt;p&gt;And, of course, my old companion, the Advanced NHibernate Course, for the people who wants to &lt;em&gt;grok&lt;/em&gt; NHibernate and really understand what is going on under the cover, and maybe even more important, &lt;em&gt;why? &lt;/em&gt;That course will run on October 31 – November 2, 2011, also in New York.&lt;/p&gt; &lt;p&gt;And if you are from the other side of the pond, I’ll be giving my Advanced NHibernate Course in Warsaw, Poland on October 17 – 19, 2011.&lt;/p&gt; &lt;p&gt;Register now for early bird pricing:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.eventbee.com/event?eid=887726315"&gt;Advanced NHibernate Course - Warsaw, October 2011&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.eventbee.com/event?eid=863437225"&gt;Advanced NHibernate Course - New York, October 2011&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.eventbee.com/event?eid=833838224"&gt;RavenDB Course - November 2011&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;</description><link>http://ayende.com/82945/nhibernate-ravendb-courses-in-new-york-october-november-2011?Key=b7fbf953-1ab2-430a-bc25-9bbc2f637739</link><guid>http://ayende.com/82945/nhibernate-ravendb-courses-in-new-york-october-november-2011?Key=b7fbf953-1ab2-430a-bc25-9bbc2f637739</guid><pubDate>Sun, 28 Aug 2011 09:00:00 GMT</pubDate></item><item><title>Reminder: Advanced NHibernate Course–Warsaw, October 2011</title><description>&lt;p&gt;Just a note, I’ll be giving my Advanced NHibernate course in Warsaw, Poland between the 17 October to the 19 October, 2011. &lt;p&gt;You can register using the &lt;a href="http://www.eventbee.com/v/ayende/event?eid=887726315"&gt;this link&lt;/a&gt;.&lt;/p&gt;</description><link>http://ayende.com/80897/reminder-advanced-nhibernate-course-warsaw-october-2011?Key=e7d47bb5-3b26-4e66-b717-af65096951f2</link><guid>http://ayende.com/80897/reminder-advanced-nhibernate-course-warsaw-october-2011?Key=e7d47bb5-3b26-4e66-b717-af65096951f2</guid><pubDate>Wed, 24 Aug 2011 06:48:00 GMT</pubDate></item><item><title>The horror of having to enforce SLAs</title><description>&lt;p&gt;I am doing the NHibernate Course right now, and we go to the stage where everyone is tired and need some comic relief, at which point I decided to show them the &lt;em&gt;true&lt;/em&gt; meaning of an SLA.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Enforcing-SLAslimiting-the-number-of-que_DACE/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Enforcing-SLAslimiting-the-number-of-que_DACE/image_thumb_1.png" width="647" height="293"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;If you commit this without telling anyone, you get to have so much fun when the computer suddenly start screaming at those horribly inefficient pages. &lt;/p&gt;</description><link>http://ayende.com/64513/the-horror-of-having-to-enforce-slas?Key=94a80b66-2d5f-465c-b3df-da99220ef209</link><guid>http://ayende.com/64513/the-horror-of-having-to-enforce-slas?Key=94a80b66-2d5f-465c-b3df-da99220ef209</guid><pubDate>Mon, 22 Aug 2011 09:00:00 GMT</pubDate></item></channel></rss>