<?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</title>
	<atom:link href="http://wagnerblog.com/category/net/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>More ASP.NET MVC Puzzlement</title>
		<link>http://wagnerblog.com/2009/05/more-aspnet-mvc-puzzlement/</link>
		<comments>http://wagnerblog.com/2009/05/more-aspnet-mvc-puzzlement/#comments</comments>
		<pubDate>Sun, 31 May 2009 03:50:09 +0000</pubDate>
		<dc:creator>twagner</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET Code Related]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=1004</guid>
		<description><![CDATA[I have been slogging my way through the MS MVC architecture. There are some good parts and some really hard to get used to parts. Some stuff just has me completely puzzled. For example when your used to setting an autopostback property on a drop down control, the need to have to hand code some [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://wagnerblog.com/wp-content/uploads/2009/05/puzzled.jpg" alt="puzzled" title="puzzled" width="240" height="280" class="alignright size-full wp-image-1005" />I have been slogging my way through the MS MVC architecture. There are some good parts and some really hard to get used to parts. Some stuff just has me completely puzzled. For example when your used to setting an autopostback property on a drop down control, the need to have to hand code some js to do the same every time I want an autopostback gets old pretty quick. </p>
<p>I love the way MVC separates out the code that used to get thrown into the same code behind in web forms. It really shines in that regard. Who knows maybe it will have a positive influence on webforms apps in that regard. </p>
<p>For the moment my bottom line is that it takes a lot longer to write the same functionality in MVC than webforms. That&#8217;s partly due to the learning curve and partly due to the fact that there is more code to write. The fact that there is more code will be interesting to watch. Maybe in time people will find some efficient practices that will help to bring down the overall effort required. If thats not the case I wonder how someone would justify the cost of building a system one way versus another. And dont tell me to build it in MVC because webforms are evil. Thats nonesense. We have almost ten years of webform driven sites out there. </p>
<p>Lastly, for all those folks who are jumping on the &#8220;Viewstate is evil&#8221; bandwagon &#8211; which seems to be the same lemmings who jumped on Datasets as a DAO in 2002 &#8211; have a look at the following<a href="http://www.slideshare.net/rudib/aspnet-mvc-performance"> performance test</a>. 6-8 requests per second for an MVC app is laughable. I sure hope that&#8217;s not the case presently. Its worth some internal testing to see. By the way, just on a purely subjective note, for the past year I have frequently spent time on MarketWatch. Since they switched to MVC I have noticed a small performance penalty. Purely subjective. Heck maybe its even a matter of browsers. </p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2009/05/more-aspnet-mvc-puzzlement/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>CodeGen on Steroids</title>
		<link>http://wagnerblog.com/2009/05/codegen-on-steroids/</link>
		<comments>http://wagnerblog.com/2009/05/codegen-on-steroids/#comments</comments>
		<pubDate>Thu, 21 May 2009 21:39:32 +0000</pubDate>
		<dc:creator>twagner</dc:creator>
				<category><![CDATA[.NET Code Related]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code Gen]]></category>
		<category><![CDATA[LLBLGen]]></category>
		<category><![CDATA[MSPec]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=994</guid>
		<description><![CDATA[Wow, I really have been leading a pretty sheltered life as a consultant. There is a toolset I have used for a number of years that has predictably delivered results. When it comes to projects where you deliver or you dont eat its pretty important that your tools work. Along the way I was fortunate [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-993 alignright" title="steroids1" src="http://wagnerblog.com/wp-content/uploads/2009/05/steroids1.jpg" alt="steroids1" width="306" height="399" />Wow, I really have been leading a pretty sheltered life as a consultant. There is a toolset I have used for a number of years that has predictably delivered results. When it comes to projects where you deliver or you dont eat its pretty important that your tools work. Along the way I was fortunate enough &#8211; with the help of one important friend ( Dan ) &#8211; to produce some pretty good tools. We had a version of MVC in 2006 &#8211; 3 years before MS had theirs.</p>
<p>Fast forward to 2009. ASP.NET MVC hits the market. Only its not just routing and actions its a whole big kit and kaboodle. Reminds me a little of RoR.  Along the way all of a sudden a lot of folks are complaining that Viewstate is the big evil and if only they could code without it. Meh. Sounds a little like people flocking to the latest shiniest thing. And there is nothing wrong with that. Its just ironic that many of the personality types that flock to this technology are the same type of folks who argued that datasets would save the world. Geez.</p>
<p>MVC is good stuff and my buddy Phil has poured his heart into this project. So I certainly hope it will thrive and progress. What has me confused at the moment are a plethora of adjacent projects that are growing up around it. I have a hard time discerning which to take serious. What do I make of an open source &#8220;architecture&#8221; that spits out a bunch of scaffolding pages and uses itself two other OSS projects. By the way, am I the only one who sees a trend of OSS projects where someone produces an entire new something that is 50% built on top of someone elses new something. Hope that makes sense. Did the RoR community go through a similar evolution?</p>
<p>As a consultant I need rock solid tools that are not necessarily going to be impacted by a deprecation of some obscure aspect because the manufacturer used some OSS project that is no longer popular. I really should research how the RoR community deals with this.</p>
<p>And while I am on the subject of &#8220;architectures&#8221;&#8230;. seems that there are some ASP.NET MVC &#8220;architectures&#8221; floating around that are primarily fantastic code generators. I would actually call them Form Wizards on Steroids. Hence the pic.</p>
<p>In 1992 I worked on a pretty large MS Access app. Yes we did those and they were good. Dont laugh. MS Access was the MVC of its day. Anyways, the IDE had a Form Wizard. Point it at a query or table and it would generate all the code you need.  I learned an important lesson back then about code gen. Especially UI code gen. Dont use it. Wizard generated code is great &#8230; al the way until you need to change it. And Wizard generated apps tend to contain a lot of unnecessary stuff that you wouldn&#8217;t produce by hand.</p>
<p>Now mind you I am not talking about the utilization of some other view engine. Spark for example looks pretty cool. I am talking about the notion that a utility spitting out a bunch of views and controllers and tests is a measure of productivity. It is not.</p>
<p>Speaking of productivity. Rob Connery had a very cool demo of MSpec on his site. Finally a spec / test system that makes sense. (Besides Fitnesse that is).</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2009/05/codegen-on-steroids/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>WPF Master Pages</title>
		<link>http://wagnerblog.com/2007/07/wpf-master-pages/</link>
		<comments>http://wagnerblog.com/2007/07/wpf-master-pages/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 19:03:26 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET Code Related]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=866</guid>
		<description><![CDATA[Karin Huber describes her Master Pages idea for WPF applications in an article on CodeProject. Why does that remind me so much of ASP.NET 1.1 home made master pages? Good article !
]]></description>
			<content:encoded><![CDATA[<p>Karin Huber describes her Master Pages idea for WPF applications in an <a href="http://www.codeproject.com/useritems/WPFMasterPage.asp">article on CodeProject</a>. Why does that remind me so much of ASP.NET 1.1 home made master pages? Good article !</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/07/wpf-master-pages/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>Entity Framework Redux</title>
		<link>http://wagnerblog.com/2007/06/entity-framework-redux/</link>
		<comments>http://wagnerblog.com/2007/06/entity-framework-redux/#comments</comments>
		<pubDate>Tue, 19 Jun 2007 12:58:38 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[NET 3.0]]></category>

		<guid isPermaLink="false">http://wagnerblog.com/?p=847</guid>
		<description><![CDATA[I just don&#8217;t have the time to blog about all the various bits and pieces of information I come across that deal with the MS Entity Framework &#8211; and how it is potentially a problem. But Roger Jennings does. Roger&#8217;s blog contains a wonderfully broad range of posts that really go into some detail on [...]]]></description>
			<content:encoded><![CDATA[<p>I just don&#8217;t have the time to blog about all the various bits and pieces of information I come across that deal with the MS Entity Framework &#8211; and how it is potentially a problem. But <a href="http://oakleafblog.blogspot.com/2007/06/entity-framework-complex-types-redux-in.html">Roger Jennings</a> does. Roger&#8217;s blog contains a wonderfully broad range of posts that really go into some detail on the issues surrounding the various pieces of new technology coming from MS.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagnerblog.com/2007/06/entity-framework-redux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
