<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: DNR, generics, and O/R mapping</title>
	<atom:link href="http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/feed/" rel="self" type="application/rss+xml" />
	<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/</link>
	<description></description>
	<lastBuildDate>Tue, 18 Aug 2009 22:20:45 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anonymous</title>
		<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/comment-page-1/#comment-134</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 06 Dec 2004 13:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://s194721765.onlinehome.us/blog/2004/12/04/dnr-generics-and-or-mapping/#comment-134</guid>
		<description>I agree that choosing not to load a few int or varchar fields is pointless.  I just thought that the the idea of using attributes was interesting, whenever I hear about people using attributes it usually relates to logging or security, so to hear about another application of attributes caught my attention.  I&#039;m by no means an expert on o/r mapping, I didn&#039;t even know it was called that until hearing the show!  Thanks for the comments!</description>
		<content:encoded><![CDATA[<p>I agree that choosing not to load a few int or varchar fields is pointless.  I just thought that the the idea of using attributes was interesting, whenever I hear about people using attributes it usually relates to logging or security, so to hear about another application of attributes caught my attention.  I&#8217;m by no means an expert on o/r mapping, I didn&#8217;t even know it was called that until hearing the show!  Thanks for the comments!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/comment-page-1/#comment-133</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 06 Dec 2004 06:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://s194721765.onlinehome.us/blog/2004/12/04/dnr-generics-and-or-mapping/#comment-133</guid>
		<description>I am very sorry to say, but the proposal is utterly stupid in 99% of the occasions. Basically the transfertime for object retrieval is much lower than the round trip to the database, and a smart in memory caching scheme may allow only to retrieve the pk and the lock fields, then reuse the object if it is unchanged. MUCH better.&lt;br&gt;&lt;br&gt;The one time when this is not the case is basically when the table is getting larger than let&#039;s say 8k (page size in SQL Server). Once you store large documents or eve nbinary data (images), lazy loading does start to really make a show out of this.&lt;br&gt;&lt;br&gt;And this coming from the maintaine of one of the most powerfull O/R mappers for .NET on the market. I am totally in agreement with Frans here. Simply makes no difference, makes the object slower. It also kills caching layers and produces way more database round trips.</description>
		<content:encoded><![CDATA[<p>I am very sorry to say, but the proposal is utterly stupid in 99% of the occasions. Basically the transfertime for object retrieval is much lower than the round trip to the database, and a smart in memory caching scheme may allow only to retrieve the pk and the lock fields, then reuse the object if it is unchanged. MUCH better.</p>
<p>The one time when this is not the case is basically when the table is getting larger than let&#8217;s say 8k (page size in SQL Server). Once you store large documents or eve nbinary data (images), lazy loading does start to really make a show out of this.</p>
<p>And this coming from the maintaine of one of the most powerfull O/R mappers for .NET on the market. I am totally in agreement with Frans here. Simply makes no difference, makes the object slower. It also kills caching layers and produces way more database round trips.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/comment-page-1/#comment-132</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 05 Dec 2004 07:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://s194721765.onlinehome.us/blog/2004/12/04/dnr-generics-and-or-mapping/#comment-132</guid>
		<description>I checked out your LLBLGen Pro demo, I think its really cool, I like the how you attach an event to every field.  Judging from your previous comment I would expect that your product does not use lazy loading, is this correct?</description>
		<content:encoded><![CDATA[<p>I checked out your LLBLGen Pro demo, I think its really cool, I like the how you attach an event to every field.  Judging from your previous comment I would expect that your product does not use lazy loading, is this correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/comment-page-1/#comment-131</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 05 Dec 2004 05:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://s194721765.onlinehome.us/blog/2004/12/04/dnr-generics-and-or-mapping/#comment-131</guid>
		<description>The only way I can think of is that you specify a set of fields for a given type T you&#039;re fetching objects of, which have to be excluded for this particular fetch. The engine then has to offer a way to fetch these fields &#039;when necessary&#039;, later on, either by a lazy loading mechanism or by a manual fetch.</description>
		<content:encoded><![CDATA[<p>The only way I can think of is that you specify a set of fields for a given type T you&#8217;re fetching objects of, which have to be excluded for this particular fetch. The engine then has to offer a way to fetch these fields &#8216;when necessary&#8217;, later on, either by a lazy loading mechanism or by a manual fetch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/comment-page-1/#comment-130</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 05 Dec 2004 04:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://s194721765.onlinehome.us/blog/2004/12/04/dnr-generics-and-or-mapping/#comment-130</guid>
		<description>You make an excellent point about the static nature of the attributes, and the inability to change them to fit different scenarios, I hadn&#039;t considered that. You are right about needing to pass information in order to load the proper fields, I&#039;m just wondering if there is an elegant way to accomplish this without having to write anything that is similar to SQL code, I would rather do it in an OO fashion.</description>
		<content:encoded><![CDATA[<p>You make an excellent point about the static nature of the attributes, and the inability to change them to fit different scenarios, I hadn&#8217;t considered that. You are right about needing to pass information in order to load the proper fields, I&#8217;m just wondering if there is an elegant way to accomplish this without having to write anything that is similar to SQL code, I would rather do it in an OO fashion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://benreichelt.net/blog/2004/12/04/dnr-generics-and-or-mapping/comment-page-1/#comment-129</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 04 Dec 2004 20:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://s194721765.onlinehome.us/blog/2004/12/04/dnr-generics-and-or-mapping/#comment-129</guid>
		<description>ANY static defined lazy loading scheme is stupid.  The reason for that is that it can&#039;t scale to situations in which you want to change the statically defined settings. &lt;br&gt;&lt;br&gt;So instead of using statically defined lazy loading (with attributes, which is also cumbersome to implement, i.e. what if your system has 500 entities?), implement a lazy loading scheme which allows the developer (i.e. the user of the data at that point in time) to define what scheme to use as only that developer can tell what&#039;s best for that particular situation. &lt;br&gt;&lt;br&gt;So the obvious choice is passing a construct to the fetch logic which describes which fields to load. Obviously, the system has to keep track of which fields are already loaded. (but perhaps the developer wants to re-load the field at every access, also a reason not to use statically defined lazy loading). &lt;br&gt;&lt;br&gt;Lazy loading of blobs is the only real world scenario which will increase performance. However, in general, these scenario&#039;s are pretty rare. Lazy loading has a disadvantage: your tier in which the lazy loading is triggered has to have a context which is connected to a database. Especially with the larger applications, this is not what you want in for example a GUI tier. &lt;br&gt;&lt;br&gt;I can only conclude that the show you&#039;ve listened to contained people who heared about O/R mapping but clearly don&#039;t understand what it really is nor what it means for enterprise applications to use O/R mapping.</description>
		<content:encoded><![CDATA[<p>ANY static defined lazy loading scheme is stupid.  The reason for that is that it can&#8217;t scale to situations in which you want to change the statically defined settings. </p>
<p>So instead of using statically defined lazy loading (with attributes, which is also cumbersome to implement, i.e. what if your system has 500 entities?), implement a lazy loading scheme which allows the developer (i.e. the user of the data at that point in time) to define what scheme to use as only that developer can tell what&#8217;s best for that particular situation. </p>
<p>So the obvious choice is passing a construct to the fetch logic which describes which fields to load. Obviously, the system has to keep track of which fields are already loaded. (but perhaps the developer wants to re-load the field at every access, also a reason not to use statically defined lazy loading). </p>
<p>Lazy loading of blobs is the only real world scenario which will increase performance. However, in general, these scenario&#8217;s are pretty rare. Lazy loading has a disadvantage: your tier in which the lazy loading is triggered has to have a context which is connected to a database. Especially with the larger applications, this is not what you want in for example a GUI tier. </p>
<p>I can only conclude that the show you&#8217;ve listened to contained people who heared about O/R mapping but clearly don&#8217;t understand what it really is nor what it means for enterprise applications to use O/R mapping.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

