<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx</link><description>It's been a while since I mentioned any new content on the ASP.NET Developer Center , and there's a reason -- I've been remiss, and haven't scratched any out lately. Well, I think the drought is over, I hope (I passed two more articles on to the editors</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#390039</link><pubDate>Wed, 09 Mar 2005 03:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:390039</guid><dc:creator>David Cornelson</dc:creator><description>I've been advocating entity classes all along. I've walked into shops where DataSets are being passed around and suggest rewriting a few interfaces to use entities instead. The OO reasons are good, but it's amazing to see the look on people's faces when their ASP.NET pages return in &amp;lt;10% of the time it took before.&lt;br&gt;&lt;br&gt;I think the part of Karl's article that was good too is that I haven't spent a lot of time with DataSets so I didn't know the other reasons not to use them. Now I do, but really the performance thing was enough.&lt;br&gt;</description></item><item><title>re: Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#390082</link><pubDate>Wed, 09 Mar 2005 04:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:390082</guid><dc:creator>Kent Sharkey</dc:creator><description>That's one of my key reasons as well. (Perf) &lt;br&gt;&lt;br&gt;I'm of course contractually obligated to say, &amp;quot;However, in some situations, the DataSet is far superior to custom entities.&amp;quot; The usual &amp;quot;Who's on first?&amp;quot; discussion I used to have with a lot of early adopters was:&lt;br&gt;&lt;br&gt;&amp;quot;I'd recommend against using a DataSet&amp;quot;&lt;br&gt;&lt;br&gt;&amp;quot;But we want the synchronization it adds.&amp;quot; (the changedRows stuff)&lt;br&gt;&lt;br&gt;&amp;quot;OK, then unless you want to rewrite that, use a DataSet.&amp;quot;&lt;br&gt;&lt;br&gt;&amp;lt;later&amp;gt;&lt;br&gt;&lt;br&gt;&amp;quot;How can we improve the performance of our app?&amp;quot;</description></item><item><title>Article on Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#390333</link><pubDate>Wed, 09 Mar 2005 13:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:390333</guid><dc:creator>David Boschmans' Weblog</dc:creator><description>Article on Custom Entity Classes</description></item><item><title>re: Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#390519</link><pubDate>Wed, 09 Mar 2005 13:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:390519</guid><dc:creator>Karl</dc:creator><description>Hey Kent,&lt;br&gt;Thankx :) was out watching Rent yesterday, this is great news :) &lt;br&gt;&lt;br&gt;Karl</description></item><item><title>re: Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#391151</link><pubDate>Wed, 09 Mar 2005 20:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:391151</guid><dc:creator>Chris</dc:creator><description>Kent, &lt;br&gt;&lt;br&gt;Nice article.  I've been using custom entity classes for a while and (not being a guru) was feeling a little scared when I saw a number of the End to End samples bind directly to SqlDataReaders.&lt;br&gt;&lt;br&gt;Nice to see that I'm not a moron (on cec's anyway).&lt;br&gt;&lt;br&gt;Chris</description></item><item><title>re: Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#402306</link><pubDate>Fri, 25 Mar 2005 20:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:402306</guid><dc:creator>Iqbal</dc:creator><description>Question?&lt;br&gt;&lt;br&gt;If we use custom entity classes, is it not a disadvantage since the instantiated data will reside in heap memory versus being out in the database (being read one at time via a reader), in most cases won't that just be a waste of resources? I am trying to think of a reason why this would be appropriate and necessary even, the only thing to have gained from entity classes seems to be the ease and comfort of use and the idea of abstraction/encapsulation. What more does one gain? Are there any REAL advantages?</description></item><item><title>re: Custom Entity Classes</title><link>http://blogs.msdn.com/ksharkey/archive/2005/03/08/389861.aspx#403051</link><pubDate>Mon, 28 Mar 2005 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403051</guid><dc:creator>Kent Sharkey</dc:creator><description>Iqbal:&lt;br&gt;&lt;br&gt;The benefit is for scenarios where you aren't directly attached to the database server, such as in 3/n-tier applications. This is when you must deside on a transfer format between App server and front end. Usually, with .NET apps, the choice falls down to, &amp;quot;DataSet or Custom Entity Classes&amp;quot;. Here, the benefits are the abstraction and performance benefits of CEC versus the built-in support for DataSet.&lt;br&gt;&lt;br&gt;For 2-tier systems, when your database server is directly attached to the front end (either logically or physically), I would definitely push DataReaders, with one possible proviso in a need to abstract the database structure due to changes/versioning, etc.</description></item></channel></rss>