<?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>Shey's Rebellion &#187; .NET</title>
	<atom:link href="http://www.sheysrebellion.net/blog/category/programming/net-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sheysrebellion.net/blog</link>
	<description>I sleep with pillows on my head.</description>
	<lastBuildDate>Thu, 27 Jan 2011 18:59:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>DataSets are Evil</title>
		<link>http://www.sheysrebellion.net/blog/2008/07/31/datasets-are-evil/</link>
		<comments>http://www.sheysrebellion.net/blog/2008/07/31/datasets-are-evil/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 16:41:18 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=100</guid>
		<description><![CDATA[I&#8217;ve always equated the use of DataSets anywhere outside the data layer with code smell, it&#8217;s a sure sign that a proper domain model doesn&#8217;t exist; it&#8217;s also just as likely that the application isn&#8217;t layered.&#160; Lets look at some of the reasons you should avoid using DataSets. DataSets don&#8217;t properly abstract the database, the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always equated the use of DataSets anywhere outside the data layer with code smell, it&#8217;s a sure sign that a proper domain model doesn&#8217;t exist; it&#8217;s also just as likely that the application isn&#8217;t layered.&#160; Lets look at some of the reasons you should avoid using DataSets.</p>
<p><strong>DataSets don&#8217;t properly abstract the database</strong>, the developer has to be intrinsically<strong> </strong>aware of the database schema, he has to know the name of the columns and the type of the columns you are returning in the DataSet.&#160; Anytime a developer wants to use the DataSet he will have to look at the underlying query which creates the DataSet and pick out the field names used in the query.&#160; Instead of understanding the business process, instead of adding value, your developer will be mucking around with database queries trying to figure out which field name to use.&#160; </p>
<p>Additionally, since <strong>DataSets are weakly typed</strong>, they don&#8217;t tell you the type of the column, the developer must know the type of the field and cast the field to the appropriate type.&#160; Every time you cast your run the risk the cast will fail, the value returned could be null or different type.</p>
<p>Since your application/presentation layer is so tightly coupled to the database your design becomes brittle and difficult to change&#8211; every time your database schema changes, it&#8217;s effects will ripple throughout your system creating a maintenance nightmare.&#160; </p>
<p>What troubles me more though is that <strong>DataSets don&#8217;t give you the opportunity to create a business logic layer</strong>, because DataSets are just <em>data</em> <em>containers</em> you can&#8217;t add functionality to them.&#160; Two DataSets can&#8217;t interact with each other, you can&#8217;t abstract problems. Instead you&#8217;re forced to write procedural code to work with DataSets and you&#8217;ve surrendered all the benefits of object oriented programming.</p>
<p>Most of the problems associated with DataSets can be solved by using classes that represent your domain model within a well-defined business layer, essentially your represent your data tables with classes.&#160; ORM is immensely useful here, and I&#8217;ll discuss it in detail in my next post.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F07%2F31%2Fdatasets-are-evil%2F&amp;title=DataSets%20are%20Evil" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F07%2F31%2Fdatasets-are-evil%2F&amp;title=DataSets%20are%20Evil" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F07%2F31%2Fdatasets-are-evil%2F&amp;t=DataSets%20are%20Evil" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F07%2F31%2Fdatasets-are-evil%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F07%2F31%2Fdatasets-are-evil%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2008/07/31/datasets-are-evil/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Microsoft Parallel Extensions</title>
		<link>http://www.sheysrebellion.net/blog/2008/03/04/microsoft-parallel-extensions/</link>
		<comments>http://www.sheysrebellion.net/blog/2008/03/04/microsoft-parallel-extensions/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 09:30:20 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[concurrency]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2008/03/04/microsoft-parallel-extensions/</guid>
		<description><![CDATA[Holy smokes, I didn&#8217;t know that .NET 3.5 supported parallel programming. Bravo Microsoft. Share and Enjoy:]]></description>
			<content:encoded><![CDATA[<p>Holy smokes, I didn&#8217;t know that .NET 3.5 supported <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e848dc1d-5be3-4941-8705-024bc7f180ba">parallel programming</a>.</p>
<p>Bravo Microsoft.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F03%2F04%2Fmicrosoft-parallel-extensions%2F&amp;title=Microsoft%20Parallel%20Extensions" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F03%2F04%2Fmicrosoft-parallel-extensions%2F&amp;title=Microsoft%20Parallel%20Extensions" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F03%2F04%2Fmicrosoft-parallel-extensions%2F&amp;t=Microsoft%20Parallel%20Extensions" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F03%2F04%2Fmicrosoft-parallel-extensions%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2008%2F03%2F04%2Fmicrosoft-parallel-extensions%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2008/03/04/microsoft-parallel-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

