<?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>willcodeforcoffee.com &#187; Architecture</title>
	<atom:link href="http://willcodeforcoffee.com/category/architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://willcodeforcoffee.com</link>
	<description>The personal programming blog of Eric Hoff.</description>
	<lastBuildDate>Tue, 02 Mar 2010 17:06:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>NoSQL and the End of Object Relational Models</title>
		<link>http://willcodeforcoffee.com/2010/03/02/nosql-and-the-end-of-object-relational-models/</link>
		<comments>http://willcodeforcoffee.com/2010/03/02/nosql-and-the-end-of-object-relational-models/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:06:24 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[My Two Cents]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[The Cloud]]></category>

		<guid isPermaLink="false">http://willcodeforcoffee.com/?p=121</guid>
		<description><![CDATA[I think the biggest driver in changing from relational to non-relational databases will be The Cloud. Once enterprises start moving into the Cloud and onto Cloud services I think we will see more architects evaluating and pushing for NoSQL.]]></description>
			<content:encoded><![CDATA[<p>There is a lot of buzz on the <a href="http://en.wikipedia.org/wiki/NoSQL" target="_blank">NoSQL</a> track these days, and it is gaining a lot of traction in the blogger world. But in the old school world of big business and big government there isn&#8217;t much movement, at least not that I&#8217;ve seen. In these industries there is still a lot of entrenchment with database companies like Oracle and Microsoft. These companies have invested a lot of money into their relational database infrastructure.</p>
<p>Its hard to see the &#8220;death&#8221; of the relational database right now. I don&#8217;t think a switch-over from relational databases to non-relational databases is coming &#8211; but there <em>is </em>a game changer coming; another new technology getting a lot of buzz and traction in the blog world: Cloud Computing. I think the biggest driver in changing from relational to non-relational databases will be The Cloud.</p>
<p><span id="more-121"></span>Microsoft, Oracle, Google, Amazon, RedHat, JBoss, Ubuntu, Rackspace and many others are starting to provide cloud computing hardware, operating systems and hosting services. Cloud computing provides cost effective scalability and resource sharing for web applications. Looking at three of the main cloud contenders out there, Amazon Web Services, Google AppEngine and Microsoft Azure you see three common components:</p>
<ol>
<li>Scalable Computing / Web Hosting computing</li>
<li>Scalable File Storage</li>
<li>Scalable Database Storage</li>
</ol>
<p>The first two are pretty obvious and typically similar to traditional architectures, or not that different &#8211; however the Database storage is where things change: all three (Amazon, Google, Microsoft) have non-relational engines! While Amazon and Microsoft <em>also</em> have a cloud relational database, each comes at a different cost.</p>
<p>I see Amazon SimpleDB, Google&#8217;s BigTable, Windows Azure Storage Tables and others being a big NoSQL driver because of their price and scalability features. Once enterprises start moving into the Cloud and onto Cloud services I think we will see more architects evaluating and pushing for NoSQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://willcodeforcoffee.com/2010/03/02/nosql-and-the-end-of-object-relational-models/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oh Unit Tests? Wherefore Art Thou, Unit Tests?</title>
		<link>http://willcodeforcoffee.com/2010/02/26/oh-unit-tests-wherefore-art-thou-unit-tests/</link>
		<comments>http://willcodeforcoffee.com/2010/02/26/oh-unit-tests-wherefore-art-thou-unit-tests/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:07:05 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[My Two Cents]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://willcodeforcoffee.com/?p=119</guid>
		<description><![CDATA[The first red flag was that this was a Visual Studio 2005 project and I was using Visual Studio 2008; the second was the five projects that couldn't be found in VSS - each one ending with .Test...]]></description>
			<content:encoded><![CDATA[<p>There are few things that help a developer maintain an application better than Unit Tests. There are a few things that make me nervous when I open a solution from VSS, but nothing makes me more nervous than a lack of unit tests projects.</p>
<p>I know the Unit Testing drum has been beaten for years, so instead of getting on a soap box and berating the Internet for not Unit Testing, I&#8217;m going to give you a story about a recent project I worked on, and how unit testing helped me succeed.</p>
<p><span id="more-119"></span>It all started last fall when I started work at a new client&#8217;s office. I opened the project from VSS and red flags started popping up. The first red flag was that this was a Visual Studio 2005 project and I was using Visual Studio 2008 (they did not install VS2005 on my computer), but this wasn&#8217;t really a problem &#8211; I was <em>assured </em>that they had standardized on Visual Studio 2008 now and the .NET Framework 3.5. The second red flag was the five projects in the Solution that couldn&#8217;t be found in VSS &#8211; each one ending with .Tests. I still don&#8217;t know why they were removed &#8211; but my guess is that they were removed because they didn&#8217;t pass.</p>
<p>The first thing I did was create a new Unit Test project. After examining source code thoroughly I created a test harness of unit tests of the existing functionality of the project. This is a very difficult and risky task since these tests are built under the assumption the current code works correctly! This is <strong>not</strong> a safe assumption when projects are missing from the solution. However, the fewer behavior changes I introduced to a program already in production use the better.</p>
<p>During this period (probably one week) I uncovered and fixed many bugs. I re-factored a lot of code. I did more testing.</p>
<p>Then I added my new functionality, retested and it worked.</p>
<p>I added more tests. They went from red to green.</p>
<p>My confidence grew with each little green light.</p>
<p>I added integration tests to the unit tests. These all passed.</p>
<p>Eventually the program was ready for deployment to the testing server (UAT &#8211; User Acceptance Testing) &#8211; a model of the production environment. And I was confident! My tests were passing!</p>
<p>This is when everything went wrong.</p>
<p>The Problem? Updating to the .NET Framework 3.5. Of course I had been misled when they assured me that they standardized on 3.5 &#8211; the production environment was still very much in 2.0 (and I was <em>strongly</em> assured they would not upgrade &#8211; even though I hadn&#8217;t asked).</p>
<p>The Solution? Unit Testing! I had extensively used the new productivity features of 3.5 like LINQ and Extension Methods. It took some rewriting and work but I was able to revert and rewrite everything back to 2.0 compatibility in one afternoon! The <strong>only </strong>reason I could do it so quickly was the unit tests I wrote that told me the functionality was still there and working in the old Framework. It took more time to find another computer with Visual Studio 2005 and the .NET Framework 2.0 installed (and not the 3.5 installed at all) than it took to rewrite the app to the older framework version.</p>
<p>There were more problems that were solved with more testing, but Unit Tests saved me a lot of time and guessing. There were some other things that could have made the project more successful such as better communication with other developers and the production team. Those issues were beyond my control. But I was so glad I had those unit tests, they saved my bacon. They gave me confidence in the completed software. The Unit Tests were also something I could show my client, the maintenance teams, and the testing teams in terms of functionality assurance for them.</p>
<p>Ah success! A new project! Another Solution! &#8230;and guess what? No unit tests. *sigh* Here we go again! <img src='http://willcodeforcoffee.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://willcodeforcoffee.com/2010/02/26/oh-unit-tests-wherefore-art-thou-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Makes A Good ORM?</title>
		<link>http://willcodeforcoffee.com/2009/09/21/what-makes-a-good-orm/</link>
		<comments>http://willcodeforcoffee.com/2009/09/21/what-makes-a-good-orm/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 20:31:27 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://willcodeforcoffee.com/?p=106</guid>
		<description><![CDATA[I&#8217;ve been using a few ORMs with a few projects, including NHibernate, SubSonic, Linq-to-SQL (L2S) and Entity Framework (EF) and even Strongly-Typed DataSets. Each provides an abstraction from the database, a few have Visual Studio integration, and they all simplify data storage for you, but I&#8217;ve found some are definitely better than others. XML Files [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using a few ORMs with a few projects, including NHibernate, SubSonic, Linq-to-SQL (L2S) and Entity Framework (EF) and even Strongly-Typed DataSets. Each provides an abstraction from the database, a few have Visual Studio integration, and they all simplify data storage for you, but I&#8217;ve found some are definitely better than others.</p>
<p><span id="more-106"></span><strong>XML Files</strong></p>
<p>Most of the ORMs I&#8217;ve used required a lot of configuration in XML files. Probably the worst offender in this sense is NHibernate. L2S, EF and DataSets are bad too, but at least they have tooling in Visual Studio to make it easier to use and hide the XML from you. In this respect, the Fluent NHibernate project is a life-saver for anyone using NHibernate.</p>
<p><strong>POCOs and the Repository Design Pattern<br />
</strong></p>
<p>Another thing most ORMs provide you with is an ability to use simple POCOs or <span style="text-decoration: underline;">P</span>lain <span style="text-decoration: underline;">O</span>ld <span style="text-decoration: underline;">C</span>LR (or <span style="text-decoration: underline;">C</span>#) <span style="text-decoration: underline;">O</span>bjects. Ordinary DataTables and Strongly-Typed DataSets come with a lot of extra &#8220;clutter&#8221; to them, this is especially visible when you&#8217;re interacting with them using IntelliSense inside Visual Studio. The clutter appears as all the baggage that comes along with DataTables, as well as the fact you have to use DataAdapters, and fetch row objects (i.e. UserTableRow).</p>
<p>It is really nice to just have a simple class that can do what you need it to within the &#8220;domain&#8221; (following the Domain Driven Design ideas). It simplifies your data layer model significantly, and of course reduces a lot of clutter.</p>
<p>NHibernate and SubSonic are the clear leaders here, NHibernate even more so, but SubSonic can regenerate mappings after you&#8217;ve made changes to your database.</p>
<p><strong>Simple Database Schema Creation</strong></p>
<p>Another thing I like to see in an ORM tool is the ability to take your data-layer mappings and generate a database schema from that. The primary reason is that database versioning during development is <em>hard</em>. Keeping everyone on the same page with databases is difficult and making each developer use the <em>same</em> database is hard to impossible. If your ORM can just create and/or update your database schema for you off the bat, keeping each developer up-to-date is a breeze. No more &#8220;why is my app crashing?&#8221;, &#8220;where is that SQL script?&#8221;, &#8220;who did this?&#8221; shouting over the cubicle walls, instead you just run the update scripts and you&#8217;re all set.</p>
<p>As far as I know there is only one <em>clear </em>winner here and that is NHibernate; L2S, EF and Strongly-Typed DataSets don&#8217;t have this functionality at all. I believe that the 3.x version of SubSonic does have this now, and version 2.x had a version of migrations (that may be obsolete in version 3).</p>
<p><strong>My Pick for Best ORM</strong></p>
<p>I&#8217;ve personally switched from the SubSonic camp to the NHibernate camp in the last year. With Fluent NHibernate and guidance from the <a href="http://sharparchitecture.net/" target="_blank">S#arpArchitecture</a> projects all real difficult barriers into NHibernate have fallen. SubSonic is an awesome ORM and does help you get up to speed quickly, but it does feel like it isn&#8217;t developer or maintained quite as much as NHibernate is, and the differences between 2.x and 3.x versions was so great as to almost be intimidating to me (almost)!</p>
<p>Entity Framework is good, but I&#8217;ve had problems with the tooling and updating the mapping schema in the projects I&#8217;ve used it in. To me, there is very little programmatic difference with Linq-to-SQL, in fact EF seems to have more functionality. According to what I&#8217;ve read, it <em>will</em> have Database Schema Generation in the .NET 4.0 version, but NHibernate 2.1 already has LINQ support (via another library) so EF is really still just playing catch-up.</p>
<p>Strongly-Typed DataSets are pretty much an obsolete technology as far as I&#8217;m concerned &#8211; from the .NET 1.0/1.1 days. They do provide some simplification over bare metal ADO.NET, but I don&#8217;t find them as easy to use as NHibernate or any of the other ORMs I&#8217;ve discussed so I&#8217;ve seen little benefit in modern projects.</p>
<p><strong>Summary</strong></p>
<p>While I know there are more options out there than just the ones I&#8217;ve pointed out, NHibernate is the tool that <em>best</em> represents what I&#8217;m looking for in an ORM.</p>
]]></content:encoded>
			<wfw:commentRss>http://willcodeforcoffee.com/2009/09/21/what-makes-a-good-orm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Services, Overhead and Performance</title>
		<link>http://willcodeforcoffee.com/2009/05/30/web-services-overhead-and-performance/</link>
		<comments>http://willcodeforcoffee.com/2009/05/30/web-services-overhead-and-performance/#comments</comments>
		<pubDate>Sat, 30 May 2009 14:28:42 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://willcodeforcoffee.com/?p=89</guid>
		<description><![CDATA[A Webservice denotes a logical boundary within your software between applications and computers.]]></description>
			<content:encoded><![CDATA[<p>Earlier this week a friend of mine asked me for some advice over an argument that some developers at his company were having.  They are collecting data from a device, and one developer wanted to have the device send the data to a web service to receive the data.  The other developer thought a web service would be to much &#8220;overhead&#8221; and wanted a different solution using direct writes or XML to the database and a UDP socket notifier for the server to parse the data.</p>
<p><span id="more-89"></span>I didn&#8217;t actually speak to the developers myself, but my friend sent me an MSN transcript of their &#8220;discussion&#8221;.  Apparently tempers grew quite hot!  I did read most of the discussion and spoke with my friend to learn more about the system.</p>
<p>It turns out there would be many transactions with the database and web service coming from these devices with a fair bit of geographic data that had to be processed at the server.  One developer felt that using a web service would  involve too much XML/SOAP overhead and wanted to write his data as XML to the database directly.</p>
<p>I was not in favor of this suggestion.  A web service makes perfect sense in a .NET situation.  It denotes a logical boundary between applications and computers, and would be pretty obvious to any supporting developer what is going on.  Usually two applications do not share the same database (maybe the same server, but not the same database).   This increases complexity.</p>
<p>I was also not convinced that the &#8220;overhead&#8221; of the SOAP would actually limit the application.  Microsoft has done a lot to optimize web services.  They&#8217;re easy to develop now, easy to consume, and as I said: a logical boundary between systems.</p>
<p>In the end I strongly recommended that they do some benchmarking.  This early in the game is the perfect time to test assumptions.  I also recommended using one of the new Service Bus APIs out there that use technologies like Microsoft Message Queues if the web services are too slow.</p>
<p>Also, as Jeff Atwood recommended in his Coding Horror blog, sometimes it is cheaper to throw another $5000 server at the solution (even TWO servers) instead of paying two $70,000 / year developers to spend three-to-six months doing performance enhancements.</p>
]]></content:encoded>
			<wfw:commentRss>http://willcodeforcoffee.com/2009/05/30/web-services-overhead-and-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
