<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wagnerblog &#187; .NET Tools</title>
	<atom:link href="http://wagnerblog.com/category/net/net-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://wagnerblog.com</link>
	<description>Development Ideas and Ramblings</description>
	<lastBuildDate>Fri, 06 Nov 2009 19:11:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>LLBLGen &#8211; Linq  &#8211; NHibernate &#8211; an embarrassment of riches</title>
		<link>http://wagnerblog.com/2009/10/llblgen-linq-nhibernate-an-embarrassment-of-riches/</link>
		<comments>http://wagnerblog.com/2009/10/llblgen-linq-nhibernate-an-embarrassment-of-riches/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 21:33:27 +0000</pubDate>
		<dc:creator>twagner</dc:creator>
				<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[data access]]></category>
		<category><![CDATA[EF]]></category>
		<category><![CDATA[LLBLGen]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=1034</guid>
		<description><![CDATA[Recently I was asked “ What technology do you recommend Linq or NHibernate” ?  My knee jerk reaction was “ It depends – potentially neither”. But that’s not good enough as an answer. The feeling that I owed a better explanation led me to this post.
Let’s start with some basics. Object Relational Modeling has been [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was asked “ What technology do you recommend Linq or NHibernate” ?  My knee jerk reaction was “ It depends – potentially neither”. But that’s not good enough as an answer. The feeling that I owed a better explanation led me to this post.</p>
<p>Let’s start with some basics. Object Relational Modeling has been around for quite some time. The work by Dr. Raymond Chen has informed the design process of ORM systems for almost 30 years now. <a href="http://wagnerblog.com/2006/06/extra-extra-microsoft-to-use-30-year-old-data-model-in-adonet/" target="_blank">I posted 3 years</a> ago that even Microsoft based its own decisions on the work of Dr. Chen.</p>
<p>Fast forward 3 years and it seems that many MS shops think that Business Objects, or ORM, in .NET 3.5 requires Linq.  Far from it. There are other, potentially more rewarding ways of doing ORM in .NET. Two prominent and mature alternatives on the market  are NHibernate and LLBLGen.</p>
<p>I should qualify one thing right up front: Linq tries to be more than an ORM tool. By definition Linq is “ a set of proprietary query operators that can be used to query, project and filter data in arrays, enumerable classes, XML (XLINQ), relational database, and third party data sources “</p>
<p>In short, Linq is more than a typical ORM mapper against a database. That is its strength and also potentially its downfall when compared to ORM mapper. While I personally think its great to use Linq to query things like Directory Structures or Strings, I also personally think that both NHibernate and LLBLGen are better at ORM – much the same way that SQL Server is better at managing data than say an XML document. Specifically, for example, Linq requires a developer to <a href="- http://www.west-wind.com/Weblog/posts/38838.aspx" target="_blank">jump through some hoops when lazy loading an object graph</a>. In addition the query tree expression generation code that Linq employes makes some odd decisions on occasion. That can lead to severely slow query performance.</p>
<p>As it stands, Linq is the 800Ib gorilla in the room because it originates with Microsoft. That means developers need to be able to work with it and the third party tool market has to cater to this by potentially adjusting its products to work with Linq.</p>
<p>Linq is extensible via a Provider pattern that implement the IQueryable&lt;T&gt; interface. A quick search of the Internet brought back examples of providers for CSV, OpenMapi and even Twitter. But writing a good Linq provider is no picnic at all. Many providers on the market today only cover a subset of the Linq spectrum. Writing a full-fledged Linq provider has taken one of the best programmers in the business almost a year and it is 1.2MB large. That should be a caveat for anyone contemplating that this is an easy task.</p>
<p>While Linq as a technology wants to be more than just an Object Relational Mapper for databases, both NHibernate and LLBLGen are exactly that and don’t try to be anything else. As a matter of fact, in the big scheme of things both tools are “closer to the metal” than Linq.  So much so that both tools offer a Linq provider that allows a developer to run Linq against NHibernate or Linq against LLBLGen. In that manner both tools broaden their market scope and build on the knowledge that developers have acquired when coming to the ORM space from MS centric projects. I am told by users who have tried the NHibernate Linq provider that it is still a bit immature at the time of this post. This just underscores the difficulty of writing a good one.</p>
<p>What then is the difference between NHibernate and LLBLGen? As far as I am concerned the differences fall into three large areas:   product philosophy, developer productivity and vendor quality / product maturity .<br />
<strong><br />
Product Philosophy: </strong><br />
NHibernate approaches the concept of building entities and mappers from the stand-point of designing business objects first, without any regard for databases or persistence structures at all.</p>
<p>LLBLGen, on the other hand, adheres closely to the work of Dr. Raymond Chen mentioned earlier. It builds entities on the basis of a database schema.</p>
<p>The tool of choice here really depends on how you approach the ORM space. Do you prefer to work with objects first and disregard persistence? For the time being NHibernate makes that easier than LLBLGen. I should point out that the next version of LLBLGen, due in a few months, has one incredible advantage over the competition &#8211; it will support Model-First development.  By encompassing both design philosophies the LLBLGen designer tool &#8211; which by the way is the only fully functional designer tool in the ORM market &#8211; will cater to both camps. Essentially LLBLGen will allow you to work with NHibernate files, its own providers as well as Linq. Its a win win win situation.</p>
<p><img class="alignleft size-medium wp-image-1044" title="LLBLGen" src="http://wagnerblog.com/wp-content/uploads/2009/10/LLBLGen-300x236.jpg" alt="LLBLGen" width="300" height="236" /></p>
<p>Personally I have always worked with the db first approach.  I understand and sympathize with the object first approach. But the majority of my larger projects have existing databases. For instance I can’t very well insist that Chevron change its db structures, just to accommodate my ORM system.</p>
<p>LLBLGen makes work with existing data structures a breeze. Unlike NHibernate it supports multiple databases within one project, foreign key relations, prefetch paths and typed lists</p>
<p>As a side note, if you want to learn more about the object design first approach I recommend Jimmy Nilsson’s book “<a href="http://www.amazon.com/Applying-Domain-Driven-Design-Patterns-Examples/dp/0321268202/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1255642840&amp;sr=8-1" target="_blank">Applying Domain Driven Design Patterns</a>”.  It’s a fantastic work on that subject.</p>
<p><strong>Developer Productivity:</strong><br />
LLBLGen runs within a  separate development IDE (not within Visual Studio) and is by far the more productive tool. Turning a database into entities and using them in a project requires but a few clicks and option selections.</p>
<p>In NHibernate the developer is asked to hand code empty business objects (usually POCO’s) , then  manipulate an XML mapping file. I realize the typical argument here is to point out that this approach offers more control to the developer. Yes it does.  But the fine grained approach impacts productivity whenever changes need to made after the initial design. Especially with larger projects the need to work at a fine grained level can become cumbersome. After all the mapping files in NHibernate do not live in a vacuum.</p>
<p>A couple of years ago I had the pleasure of watching a longtime Hibernate architect become completely addicted to the productivity of LLBLGen. He literally was blown away by how much he could accomplish in very little time. In the end, the formerly dreaded change / update cycle became one of his biggest tools in being productive. My colleague took part in building one of the larger real estate loan processing engines in the US using Hibernate and Java &#8211; he knew those products inside out.<br />
<strong><br />
Vendor quality / Product maturity:</strong><br />
If you are faced with a tricky medical decision, whom would you trust more – a GP who deals with a variety of medical issues or a specialist that eats,  sleeps and breaths the specialty you need?  In other words if you can see the quality of the people whom you trust would that help in your decision process? It does in mine.</p>
<p>How smart are the people behind the tools you choose? In the case of LLBLGen and NHibernate I’d say the development is headed by a couple of programmers who are absolutely the best in the field (Ayende Rahien and Frans Bouma).  Contrast that to another ORM tool on the market – the MS Entity Framework and its problems over the past three years and you can see how essential the capabilities of the core devs in a tool like this really are.</p>
<p>Both LLBLGen and NHibernate are mature within the marketplace. NHibernate builds on its “big brother” Hibernate for Java.  While NHibernate is a failry mature open source project, LLBLGen is the most mature commercial tool of its kind in the .NET market.</p>
<p>Open Source projects are great in many ways – especially after they have settled down a little. But as a personal choice I will frequently pick a good commercial product over an open source one. There are several reasons for that. When your reputation is on the line with the projects you implement, its good to have a person who is directly responsible to you by the fact that you paid for their product. Granted with some vendors that’s a useless measuring stick but in a comparison between NHibernate and LLBLGen, I favor the latter because a very specific person is responsible for the performance of the product.</p>
<p>Overall there is a great sense of design and continuity in the product. I have used it since 2003 and I am here to tell you that in 6 years, through dozens of commercial projects for a raft of important customers – from Chevron to ITT Corp and Chrysler; from Lycos to Gameshow Network – accounting for several thousand man-hours of work it has never let me down.</p>
<p>Since this is not a product review I would urge you to visit the llblgen website and have a look. Features like visual inheritance definition, non-overwrite of custom code, support for all relationship types (1:1 ; 1:M ; M:1 and M:M) and much more can be reviewed there. And of course take a look at the NHibernate site as well. There is much to like in both tools. As it stands when someone asks me &#8220;Linq or NHibernate&#8221; I am very likely to answer &#8220;Neither my friend&#8230; but let me tell you about the tool that you should use ! &#8221;</p>
<p>Update:  10-31-2009 &#8211; I just had to include Mohammed Meligy&#8217;s post because his experience parallels mine. <a href="http://weblogs.asp.net/meligy/archive/2009/10/31/which-orm-linq-to-sql-entity-framework-llblgen-nhibernate.aspx">Here is a link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2009/10/llblgen-linq-nhibernate-an-embarrassment-of-riches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# on the IPhone</title>
		<link>http://wagnerblog.com/2009/06/c-on-the-iphone/</link>
		<comments>http://wagnerblog.com/2009/06/c-on-the-iphone/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 14:06:25 +0000</pubDate>
		<dc:creator>twagner</dc:creator>
				<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=1027</guid>
		<description><![CDATA[This morning I stumbled across some discussion of using C# to build IPhone apps. You may know already that ordinarily IPhone apps are built using Apple&#8217;s Objective-C , which is pretty ancient and lacks some useful features like automatic memory management for example. Objective C came out as part of NextStep which was a company [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I stumbled across some discussion of using C# to build IPhone apps. You may know already that ordinarily IPhone apps are built using Apple&#8217;s Objective-C , which is pretty ancient and lacks some useful features like automatic memory management for example. Objective C came out as part of NextStep which was a company that Steve Jobs had for a little while during the years when John Scully was at the helm of Apple. This was back in the late 80&#8217;s early 90&#8217;s I think.  So basically the code used to write IPhone apps is about 15 -20 years old and at this point its only a version 2 product. Seems odd. From what I have read, dealing with Objective-C is no picnic. Imagine my surprise when I saw <a href="http://www.mono-project.com/Mono:Iphone">this note </a>on the Mono site.I followed the links and found <a href="http://unity3d.com/unity/features/iphone-publishing">Unity </a>- what looks to be a very capable game design IDE that uses C# and compiles to Apple Objective-C. Thats pretty neat. I suspect it probably has some early version hiccups but in time with proper care and  feeding I wonder if this IDE wouldnt grow into something usable for general IPhone dev.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2009/06/c-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decisions Decisions&#8230;..</title>
		<link>http://wagnerblog.com/2009/05/decisions-decisions/</link>
		<comments>http://wagnerblog.com/2009/05/decisions-decisions/#comments</comments>
		<pubDate>Mon, 25 May 2009 20:39:35 +0000</pubDate>
		<dc:creator>twagner</dc:creator>
				<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[sample code]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=997</guid>
		<description><![CDATA[ As a programmer / consultant I always work on improving my skills. Except for the past year or so. I coasted a little bit. Consequently I am faced with two technologies that I need to study up. MS MVC and Silverlight. My personal feeling is that Silverlight will grow into the larger market over [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://wagnerblog.com/wp-content/uploads/2009/05/decisions11-247x300.jpg" alt="decisions11" title="decisions11" width="247" height="300" class="alignleft size-medium wp-image-998" /> As a programmer / consultant I always work on improving my skills. Except for the past year or so. I coasted a little bit. Consequently I am faced with two technologies that I need to study up. MS MVC and Silverlight. My personal feeling is that Silverlight will grow into the larger market over time. But at the moment its still lacking a lot of tools that a normal developer (not a bleeding edge addict) would come to expect in a platform. On the other hand MVC is slated to take off like a rocket. There is sooooo much pent up RoR envy in the .NET developer community its ridiculous. </p>
<p>My main issues with MS MVC is the fact that it tries to be something very similar to RoR. I feel this way because Model View Controller can be done without MS MVC. As a matter of fact as I have mentioned ad-nauseaum Dan and I have built and MVC driven framework a while back. So if I am interested in just the simplest most straightforward way to plug MVC into ASP.NET &#8211; thats the way to go &#8211; just build a small and simple action framework / router. No tag-soup either. I suppose I have to revisit this after ASP.NET 4.0 is out because it will incorporate routing. </p>
<p>Having said all that as a preamble, I would be silly not to study up on MS MVC. There are some aspects I really do like about it. The great enforcement of separation of concerns for starters. </p>
<p>As I looked over the web to find some decent examples of people who have blazed trails in this area I came across <a href="http://codebetter.com/blogs/karlseguin/archive/2009/04/28/presenting-codebetter-canvas.aspx">Karl Seguin&#8217;s</a> <a href="http://code.google.com/p/codebettercanvas/">Canvas MVC sample app</a>. It was written with one specific purpose in mind: as a simple learning application that illustrates a good way to build an MVC app. In my opinion this app is a resounding success. It has enough code to illustrate the majority of work that one has to deal with (i.e. data entry, paged lists etc). And it doesn&#8217;t try to throw every possible scenario in the mix. The result is a well structured easy to follow sample. Believe me I have looked at numerous different ones out there and this is by far one of the better designed samples. Love it !</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2009/05/decisions-decisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Its Labor Day&#8230;. so that means I labor today</title>
		<link>http://wagnerblog.com/2007/09/its-labor-day-so-that-means-i-labor-today/</link>
		<comments>http://wagnerblog.com/2007/09/its-labor-day-so-that-means-i-labor-today/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 21:01:03 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET Code Related]]></category>
		<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=900</guid>
		<description><![CDATA[After returning from a wonderful vacation, its back to business. We are currently working on an interesting WCF project in which I actually get to dogfood our service implementation. At least thats the plan. Working with a distributed team, Jeff one of&#160;my guys, &#160;is located in Northern California. He happens to be responsible for huge [...]]]></description>
			<content:encoded><![CDATA[<p>After returning from a wonderful vacation, its back to business. We are currently working on an interesting WCF project in which I actually get to dogfood our service implementation. At least thats the plan. Working with a distributed team, Jeff one of&nbsp;my guys, &nbsp;is located in Northern California. He happens to be responsible for huge chunks of the services and database. So rather than continually migrating changes we will try to just consume his services in development. Should be interesting. </p>
<p>Speaking of interesting, <a href="http://west-wind.com/weblog/posts/147218.aspx" target="_blank">Rick Strahl</a> came across yet another one of those WTF scenarios with LINQ. Apparently it manages to create circular references when you try to serialize objects. That&#8217;s so lame its unbelievable. What I do not understand in all these issues that LINQ seems to have (and unless I am mistaken that the Entity Framework also has here and there) &#8211; what I really don&#8217;t understand is the fact that ORM has been around for ages. Entity Relations were first defined in the 70&#8217;s by Dr. Peter Chen. How is it that the Architecture Astronauts at MS can&#8217;t get their act together and produce this stuff without numbskull problems like this.&nbsp; I have long since given up on completely problem free releases, but some of the recent technologies that are being evangelized seem to have a higher than normal quotient of WTF errors.&nbsp; Is it any wonder there are a number of dissatisfied voices out there. </p>
<p>Luckily in the case of ORM tools there are a number of viable commercial and Open Source alternatives available. </p>
<p>UPDATE: And if you really want something to make your eyes roll back in your head, check out <a href="http://oakleafblog.blogspot.com/2007/09/linq-and-entity-frameword-updates-for.html">Roger Jennings </a>list. I especially took notice of the part where Roger mentioned that his concerns were pretty much ignored on the forum. Now folks, Roger goes way way back in the database world. If MS simply ignores the comments of a thorough and conscientious developer like him&#8230; imagine what else gets skipped, ignored, shuffled under the carpet and overpowered by marketing and evangelism. I continue to say it again and again this project has a distinct smell. And yes I DO have my own agenda here.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/09/its-labor-day-so-that-means-i-labor-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We aim to please&#8230;</title>
		<link>http://wagnerblog.com/2007/07/we-aim-to-please/</link>
		<comments>http://wagnerblog.com/2007/07/we-aim-to-please/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 03:44:35 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET Code Related]]></category>
		<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=885</guid>
		<description><![CDATA[ 
Have you ever gotten into a situation where your customers development team uses tools that you know full well are not best of breed, but you go along with it and use them for their project because&#8230;. well they are the customer and pay the bills. I have precisely such a case. The customers [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wagnerblog.com/wp-content/uploads/2007/07/pigs.jpg" atomicselection="true"><img style="border-right: 0px; border-top: 0px; margin: 5px 25px 5px 5px; border-left: 0px; border-bottom: 0px" height="174" alt="pigs" src="http://wagnerblog.com/wp-content/uploads/2007/07/pigs-thumb.jpg" width="240" align="left" border="0"/></a> </p>
<p>Have you ever gotten into a situation where your customers development team uses tools that you know full well are not best of breed, but you go along with it and use them for their project because&#8230;. well they are the customer and pay the bills. I have precisely such a case. The customers dev team requested that we use MS Enterprise Blocks for logging and exception handling. Primarily because thats what they have standardized on, and its easier for them to maintain this code if it contains the MS blocks. </p>
<p>Now normally we use Log4Net. Want to know why? </p>
<p>For starters its open source. And secondly its better built and faster.&nbsp; <a href="http://weblogs.asp.net/lorenh/archive/2005/02/18/376191.aspx" target="_blank">Here is</a> actually some empirical evidence how much faster it is. <strong>In this test it took Log4Net about 40ms to log 1000 messages while the Enterprise Library took a whopping 9500ms</strong>. That&#8217;s pretty incredible isn&#8217;t it. </p>
<p>There is an old saying. Don&#8217;t know where it comes from, but it goes something like this : &#8221; Whose bread you eat &#8211; whose song you sing&#8221;. Meaning the customer is paying for it and if they like this tool we will implement it. Even if it is a bit of a pig and slow.  </p>
<p>Of course there is plenty of&nbsp;discussion of the code&nbsp;and design quality&nbsp;presented by the EntLib. &nbsp;<a href="http://ayende.com/Blog/archive/2007/05/18/What-I-dont-like-the-Patterns--Practices-efforts.aspx" target="_blank">Oren Eini</a> set off a huge discussion in March 2007&nbsp;when he called the Patterns and Practices group on the carpet. In spirit and meaning that wasn&#8217;t all too different from <a href="http://www.pluralsight.com/blogs/craig/archive/2003/10/22/1015.aspx" target="_blank">this post by PluralSight</a> all the way back in 2003. </p>
<p>Face it, its very hard to turn a sows ear into a purse. </p>
<p>You know, I haven&#8217;t used any of their stuff since the original DAAB back in 2003 or thereabouts. Once I started to work with ORM&#8217;s and once there were some valid .NET OSS projects out there I never looked back. </p>
<p>Just for reference ( since I will need it in the near future ) here are a couple articles on configuring MS Blocks for Logging. </p>
<p><a href="http://www.devx.com/dotnet/Article/31463">http://www.devx.com/dotnet/Article/31463</a><br /><a href="http://www.cubido.at/Blog/tabid/176/EntryID/33/Default.aspx">http://www.cubido.at/Blog/tabid/176/EntryID/33/Default.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/07/we-aim-to-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Product Review: NDepend 2.0 created by Patrick Smaccia</title>
		<link>http://wagnerblog.com/2007/07/product-review-ndepend-20-created-by-patrick-smaccia/</link>
		<comments>http://wagnerblog.com/2007/07/product-review-ndepend-20-created-by-patrick-smaccia/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 01:03:46 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=860</guid>
		<description><![CDATA[NDepend is a unique code analysis tool. I believe that currently there is not one other&#160;product on the market that can can match its capabilities.&#160; 
If you are anything like me, you hate having to read other peoples code. OK, maybe hate is putting it strongly. In as much as you have to get into [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ndepend.com" target="_blank">NDepend</a> is a unique code analysis tool. I believe that currently there is not one other&nbsp;product on the market that can can match its capabilities.&nbsp; </p>
<p>If you are anything like me, you hate having to read other peoples code. OK, maybe hate is putting it strongly. In as much as you have to get into another persons head and try to understand their design and thought process, becoming thoroughly familiar with someone else&#8217;s assemblies tends to be a bit of a chore. Agreed? </p>
<p>During the past six weeks I was asked to review two different projects done by two very different teams, in order to provide some architectural guidance and feedback. So when I tell you that NDepend is very helpful, I speak from actual practical experience.&nbsp; In both cases NDepend 2.0 clued me in to problem areas that I would not have found on my own without expending considerable effort and time. Don&#8217;t get me wrong, a tool like this should not take the place of your discerning eye. Instead it should -and does so admirably &#8211; act like a sieve that runs through a codebase and provides pointers and feedback. </p>
<p>Typically I&#8217;ve used NDepend in two different ways. First and foremost,&nbsp; I really like the comprehensive summary of findings to get a feel for the &#8220;lay of the land&#8221;. This report is usually my starting point. It highlights a number of interesting statistics, along with <a href="http://www.ndepend.com/Metrics.aspx" target="_blank">links to their explanation</a>. For example uncommented code versus commented code, methods with too many parameters and various types of&nbsp;coupling.&nbsp;</p>
<p>As useful as the summary report is, I found the drill down capabilities of NDepend absolutely staggering in its depth and capability. </p>
<p>Once an analysis run has been completed, you can drill into any assembly and gain useful information at the level of namespace or class or method. I&#8217;m sure I am leaving something out here. Nonetheless, the point being that NDepend can be of invaluable service if you have to consider refactoring code that was written by someone else. </p>
<p>During my two code reviews, it helped me to quickly provide feedback to my customer, that outlined areas of concern and the potential impact of refactoring them. </p>
<p>And just in case one of the many, many built in metrics and analysis points do not cover your needs, Patrick Smaccia (NDepends author), has had the foresight to include a way to query the information accumulated in an analysis. He calls it CQL &#8211; Code Query Language.&nbsp; With CQL you can write statements like this &#8211; very&nbsp;similar to SQL&nbsp;</p>
<p><font face="Courier" size="2">SELECT METHODS FROM ASSEMBLIES &#8220;System&#8221; WHERE IsAbstract </font></p>
<p><font face="Courier" size="2">SELECT TYPES OUT OF NAMESPACES &#8220;System.Windows.Forms&#8221; WHERE IsUsing &#8220;System.Windows.Forms.Control&#8221;</font> </p>
<p><font size="1"></font><font size="2">If needed, NDepend can be integrated into the build process, similar to the way one might run FXCop. If you have to supervise the code production of a team, then having NDepend flag potential problems for you after a build give you the ability to react faster and address the area of concern before it is forgotten or overlooked.</font> </p>
<p><font size="1"><a href="http://wagnerblog.com/wp-content/uploads/2007/07/ndependoutput.jpg" atomicselection="true"><img style="border-right: 0px; border-top: 0px; margin: 5px 20px 20px 5px; border-left: 0px; border-bottom: 0px" height="307" alt="NDependOutput" src="http://wagnerblog.com/wp-content/uploads/2007/07/ndependoutput-thumb.jpg" width="390" align="left" border="0"/></a> </font></p>
<p><font size="1"></font>&nbsp;</p>
<p><font size="2">One of the aspects I especially found useful was NDepends ability to display a nice code diagram in its summary report. This visual aid helped me to quickly find my way around. The sample picture here was taken from an unrelated project. </font></p>
<p><font size="2"></font>&nbsp;</p>
<p><font size="1"></font>&nbsp;</p>
<p><font size="1"></font>&nbsp;</p>
<p><font size="1"></font>&nbsp;</p>
<p><font size="1"></font>&nbsp;</p>
<p><font size="1"></font>&nbsp;</p>
<p><font size="1"></font></p>
<p>There is truly a lot of information coming at you when viewing the results of an analysis in Visual NDepend. It took me some time to make sense of this almost overload, but once I got the idea I was very much like the proverbial kid in the candy store.
<p><a href='http://wagnerblog.com/wp-content/uploads/2007/07/ndependstypeinstancetoobig.jpg' title='Visual NDepends'><img src='http://wagnerblog.com/wp-content/uploads/2007/07/ndependstypeinstancetoobig.jpg' alt='Visual NDepends' /></a><br />
Click to enlarge.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/07/product-review-ndepend-20-created-by-patrick-smaccia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice article on LINQ  to SQL</title>
		<link>http://wagnerblog.com/2007/06/nice-article-on-linq-to-sql/</link>
		<comments>http://wagnerblog.com/2007/06/nice-article-on-linq-to-sql/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 13:34:42 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=844</guid>
		<description><![CDATA[Roger Jennings has a nice summary and various links to a great article by Ian Cooper that looks at LINQ from the point of view of DDD, TDD and PI.
Roger notes another voice in the chorus that reiterates we need support for more db&#8217;s than simply the ones by MS. He says &#8220;&#8230;.He then goes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oakleafblog.blogspot.com/2007/06/ian-cooper-takes-on-ddd-tdd-and-pi-with.html">Roger Jennings</a> has a nice summary and various links to a great article by Ian Cooper that looks at LINQ from the point of view of DDD, TDD and PI.<br />
Roger notes another voice in the chorus that reiterates we need support for more db&#8217;s than simply the ones by MS. He says <em>&#8220;&#8230;.He then goes on with a plea to Microsoft to enable LINQ to SQL for databases other than SQL Server. I agree that EF and EDM are far too heavyweight approaches to ordinary object persistence needs and that a single-file or attribute-based approach is likely to satisfy 90% of developer&#8217;s needs for an object/relational mapping tool. But it won&#8217;t if it&#8217;s locked into SQL Server 200x. It&#8217;s especially surprises me that the ADO.NET team would choose EF and EDM over LINQ to SQL as the O/RM tool for their lightweight SQL Server Compact Edition</em>.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/06/nice-article-on-linq-to-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another reason to be cautious of the MS Entity Framework</title>
		<link>http://wagnerblog.com/2007/06/another-reason-to-be-cautious-of-the-ms-entity-framework/</link>
		<comments>http://wagnerblog.com/2007/06/another-reason-to-be-cautious-of-the-ms-entity-framework/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 15:23:25 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET Tools]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=842</guid>
		<description><![CDATA[I believe that the surge in various open source projects , as well as certain commercial ones, that provide proper ORM tools to the .NET development community may pose a bit of an issue for MS. You see, the data access structure that MS has espoused for the past 10+ years was usually based on [...]]]></description>
			<content:encoded><![CDATA[<p>I believe that the surge in various open source projects , as well as certain commercial ones, that provide proper ORM tools to the .NET development community may pose a bit of an issue for MS. You see, the data access structure that MS has espoused for the past 10+ years was usually based on some resultset that could be bound to the front end. All of MS dev tools, since VB 3 and Access 1.1, have had that ability at its core. Thats why you have datasets and datagrids. By providing a comprehensive story (gratuitous hot keyword alert) , that covered the entire cycle from data retrieval on a server to consumption / usage in a winform or web form, MS provided a specific way to work with its tools. And of course the sweet-spot of usability of these tools was centered on SQL Server.</p>
<p>Along came Object Relational Mappers. Be that NHibernate or commercial ones. At its core, the ORM among many other very useful things, provides a way to quickly and relatively painlessly abstract your code away from its database. Therefore &#8211; and this is important &#8211; you can write an application against one database, then swap out back-ends for another database and with a minimum of changes be up and running in no time. One of the best examples of this was watching my buddy Dan change an ENTIRE learning management system from SQL Server to MySQL in next to no time. I think he said it took less than a week.</p>
<p>So I ask you, if you are MS and you see an upsurge of tools that allow developers to do this. And there is more and more buzz in the various blogs about ORM&#8217;s and the benefits of other technologies, like ActriveRecord, MVC etc etc. What would you do? Based on 15 years of watching MS, I believe the embrace and extend methodology will be applied here with great success. In the end I suspect MS will provide something to the dev community that looks and smells a little bit like an ORM but under the hood it will be just a tad different, making it easy to use with MS Tools and through its very usage making it hard to switch databases, effectively negating one of the core points of an ORM.</p>
<p>With everything you know about MS&#8230; doesn&#8217;t that seem like a reasonable idea? No wonder some people have begun to call the MS Entity Framework a <strong>persistence mapper not an object relational mapper. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/06/another-reason-to-be-cautious-of-the-ms-entity-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tell MS what to do with LINQ</title>
		<link>http://wagnerblog.com/2007/06/tell-ms-what-to-do-with-linq/</link>
		<comments>http://wagnerblog.com/2007/06/tell-ms-what-to-do-with-linq/#comments</comments>
		<pubDate>Thu, 31 May 2007 13:04:42 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET Tools]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=837</guid>
		<description><![CDATA[Roger Jennings has a list of recommendations posted in response to a call by MS for people to participate in a design Q/A session at Tech Ed. I have nothing to say. For once.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://oakleafblog.blogspot.com/2007/05/defining-direction-of-linq-to.html">Roger Jennings</a> has a list of recommendations posted in response to a call by MS for people to participate in a design Q/A session at Tech Ed. I have nothing to say. For once.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/06/tell-ms-what-to-do-with-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeRush Internal Error 2739</title>
		<link>http://wagnerblog.com/2007/05/coderush-internal-error-2739/</link>
		<comments>http://wagnerblog.com/2007/05/coderush-internal-error-2739/#comments</comments>
		<pubDate>Sun, 27 May 2007 17:56:36 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET Tools]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=834</guid>
		<description><![CDATA[Whilst attempting to upgrade CodeRush to the current release (2.2.2) the Installer would hang and display the very useful message &#8220;Internal Error 2739&#8243;. At first I searched the CodeRush knowledge base but was not able find anything. Maybe it was my search technique&#8230;.. Google to the rescue. Simply entering the error number brought me to [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst attempting to upgrade CodeRush to the current release (2.2.2) the Installer would hang and display the very useful message &#8220;Internal Error 2739&#8243;. At first I searched the CodeRush knowledge base but was not able find anything. Maybe it was my search technique&#8230;.. Google to the rescue. Simply entering the error number brought me to <a href="http://davidgardiner.blogspot.com/2007/02/internal-error-2739-on-vista-x64.html">Dave&#8217;s blog </a>who had a similar experience. Registering the jscript.dll did the trick. Thanks Dave ! DeveloperExpress ought to send a freebie of some sort <img src='http://wagnerblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/05/coderush-internal-error-2739/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
