<?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: ORM can lead to inflexibility; Terracotta can help</title>
	<atom:link href="http://puredanger.com/kablooie/index.php/2008/10/06/hibernate-orm-can-lead-to-inflexibility-terracotta-can-help/feed/" rel="self" type="application/rss+xml" />
	<link>http://puredanger.com/kablooie/2008/10/06/hibernate-orm-can-lead-to-inflexibility-terracotta-can-help/</link>
	<description>Scott Bale's technical blog</description>
	<lastBuildDate>Tue, 26 Jul 2011 08:42:38 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott</title>
		<link>http://puredanger.com/kablooie/2008/10/06/hibernate-orm-can-lead-to-inflexibility-terracotta-can-help/comment-page-1/#comment-4372</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Wed, 08 Oct 2008 21:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://puredanger.com/kablooie/2008/10/06/hibernate-orm-can-lead-to-inflexibility-terracotta-can-help/#comment-4372</guid>
		<description>@Brady - thanks for the comment.  I don&#039;t think that example you linked to is quite what I would need.   The author didn&#039;t write the non-leaf subclass (Division) so it&#039;s hard to tell, and also the base class (OrganizationUnit) doesn&#039;t have a parameterized type.  I may be missing something - his formatting is hard on the eyes!  In general, the Composite Pattern doesn&#039;t restrict an instance of the non-leaf (compositing) entity to containing only a certain type of leaf entity, which is what I require with my Section above: ideally I want to enforce that an instance of Section can contain EITHER child sections OR questions, but not both.

His example has gotten me thinking that there may be a way to achieve this with a modified version of what he wrote, but really the bigger point I was trying to make is that many POJO&#039;s shouldn&#039;t be persisted to the db, but only represent some intermediate state and only require some intermediate storage, and Terracotta is a good fit there because Terracotta does not impose any constraints on the API of those POJO&#039;s.  Just look at how cluttered the code is in the example you linked to, with all those annotations.  That may be acceptable if those classes represent entities that *belong* in the SOR, which they probably do.  But it may be worthwhile to free other code from ORM library constraints, if you can just transparently plug Terracotta in at the jvm level and let it handle intermediate persistence for you (not to mention transparent clustering as well).</description>
		<content:encoded><![CDATA[<p>@Brady &#8211; thanks for the comment.  I don&#8217;t think that example you linked to is quite what I would need.   The author didn&#8217;t write the non-leaf subclass (Division) so it&#8217;s hard to tell, and also the base class (OrganizationUnit) doesn&#8217;t have a parameterized type.  I may be missing something &#8211; his formatting is hard on the eyes!  In general, the Composite Pattern doesn&#8217;t restrict an instance of the non-leaf (compositing) entity to containing only a certain type of leaf entity, which is what I require with my Section above: ideally I want to enforce that an instance of Section can contain EITHER child sections OR questions, but not both.</p>
<p>His example has gotten me thinking that there may be a way to achieve this with a modified version of what he wrote, but really the bigger point I was trying to make is that many POJO&#8217;s shouldn&#8217;t be persisted to the db, but only represent some intermediate state and only require some intermediate storage, and Terracotta is a good fit there because Terracotta does not impose any constraints on the API of those POJO&#8217;s.  Just look at how cluttered the code is in the example you linked to, with all those annotations.  That may be acceptable if those classes represent entities that *belong* in the SOR, which they probably do.  But it may be worthwhile to free other code from ORM library constraints, if you can just transparently plug Terracotta in at the jvm level and let it handle intermediate persistence for you (not to mention transparent clustering as well).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brady Hegberg</title>
		<link>http://puredanger.com/kablooie/2008/10/06/hibernate-orm-can-lead-to-inflexibility-terracotta-can-help/comment-page-1/#comment-4371</link>
		<dc:creator>Brady Hegberg</dc:creator>
		<pubDate>Wed, 08 Oct 2008 21:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://puredanger.com/kablooie/2008/10/06/hibernate-orm-can-lead-to-inflexibility-terracotta-can-help/#comment-4371</guid>
		<description>Out of curiosity - is there a reason you wouldn&#039;t use something like this Hibernate composite pattern for #1?

http://www.theresearchkitchen.com/blog/archives/57

I&#039;m intrigued by your description of Terracotta though and will check it out.</description>
		<content:encoded><![CDATA[<p>Out of curiosity &#8211; is there a reason you wouldn&#8217;t use something like this Hibernate composite pattern for #1?</p>
<p><a href="http://www.theresearchkitchen.com/blog/archives/57" rel="nofollow">http://www.theresearchkitchen.com/blog/archives/57</a></p>
<p>I&#8217;m intrigued by your description of Terracotta though and will check it out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.196 seconds -->

