<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mickaël's Weblog &#187; J2EE</title>
	<atom:link href="http://sauvee.wordpress.com/category/j2ee/feed/" rel="self" type="application/rss+xml" />
	<link>http://sauvee.wordpress.com</link>
	<description>Reuse is just a nice side effect</description>
	<lastBuildDate>Sat, 29 Mar 2008 12:34:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='sauvee.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/3cb92ce5ac1204654f27489611b00b0b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Mickaël's Weblog &#187; J2EE</title>
		<link>http://sauvee.wordpress.com</link>
	</image>
			<item>
		<title>GRails 1.0.1 installation fails</title>
		<link>http://sauvee.wordpress.com/2008/02/19/grails-101-installation-fails/</link>
		<comments>http://sauvee.wordpress.com/2008/02/19/grails-101-installation-fails/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 13:29:07 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/j2ee/grails-101-installation-fails/</guid>
		<description><![CDATA[I&#8217;m having at look a GRails 1.0.1. I get a little problem after setup and here is a little trick to help you if you encounter the same kind of problem.
So I installed version 1.0.1 that you can download here. I&#8217;ve set up the environment variables and launched &#8220;grails&#8221; on the command line.
At that point [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=97&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img height="93" alt="images.jpg" hspace="5" src="http://www.sauvee.com/wp02/wp-content/uploads/2008/02/images.jpg" align="left" vspace="5" />I&#8217;m having at look a GRails 1.0.1. I get a little problem after setup and here is a little trick to help you if you encounter the same kind of problem.</p>
<p>So I installed version 1.0.1 that you can download <a href="http://grails.org/Download">here</a>. I&#8217;ve set up the environment variables and launched &#8220;grails&#8221; on the command line.</p>
<p>At that point I get some weird message as &#8220;Xxxx was unexpected at this time&#8221;. This was due to my JAVA_OPTS. To find the problem, just setup the DEBUG environment variable to anything you want.</p>
<p>This way you will see the content of the batch command executed and will be able to find the root cause of your problem.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/97/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/97/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=97&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2008/02/19/grails-101-installation-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>

		<media:content url="http://www.sauvee.com/wp02/wp-content/uploads/2008/02/images.jpg" medium="image">
			<media:title type="html">images.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>GRails 1.0 is out</title>
		<link>http://sauvee.wordpress.com/2008/02/18/grails-10-is-out/</link>
		<comments>http://sauvee.wordpress.com/2008/02/18/grails-10-is-out/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 08:20:48 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/j2ee/grails-10-is-out/</guid>
		<description><![CDATA[You can have a look at it &#8230;but use firefox as the web site has some display problems on IE (or maybe this is due to my IE configuration).
Finaly the famous Rails framework enter in java world, that should provide excellent reasons to no more see this RubyOnRails video:
[youtube:http://www.youtube.com/watch?v=PQbuyKUaKFo]
       [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=95&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You can have a look at <a href="http://grails.org/">it</a> &#8230;but use firefox as the web site has some display problems on IE (or maybe this is due to my IE configuration).</p>
<p>Finaly the famous <strong>Rails</strong> framework enter in java world, that should provide excellent reasons to no more see this RubyOnRails video:</p>
<p>[youtube:http://www.youtube.com/watch?v=PQbuyKUaKFo]</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/95/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/95/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=95&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2008/02/18/grails-10-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Enterprise software programmability capabilities for non-programmer&#8230;stop!</title>
		<link>http://sauvee.wordpress.com/2007/10/16/enterprise-software-programmability-capabilities-for-non-programmerstop/</link>
		<comments>http://sauvee.wordpress.com/2007/10/16/enterprise-software-programmability-capabilities-for-non-programmerstop/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 09:27:56 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/net/enterprise-software-programmability-capabilities-for-non-programmerstop/</guid>
		<description><![CDATA[Robert Cooper talked about why he hates BPM products but love BPM: XML is not a programming language! I fully agree on this assertion and you can read about a post (in French) I&#8217;ve written on this.
This is true for BPM, but also for many enterprise software (see this post from Ayende about what is an enterprise [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=60&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.oreillynet.com/pub/au/2413">Robert Cooper</a><span class="ISI_IGNORE"> talked about why <a href="http://www.oreillynet.com/onjava/blog/2007/10/do_i_hate_bpm_no_i_hate_bpm_pr.html" target="_blank">he hates BPM products but love BPM</a>: XML is not a programming language! I fully agree on this assertion and you can read about a <a href="http://www.sauvee.com/wp02/index.php/j2ee/pourquoi-ne-pas-coder-en-xml/">post</a> (in French) I&#8217;ve written on this.</span></p>
<p>This is true for BPM, but also for many enterprise software (see this <a href="http://www.ayende.com/Blog/archive/2007/10/07/Enterprisey-vs-Enterprise-Software.aspx">post</a> from Ayende about what is an enterprise software): they pretend/tend to be highly customizable to be able to match the enterprise processes without requiring high development skills&#8230;this usually true, but the drawback is the maintenance, upgrade and evolution capabilities which are usually also very poor.</p>
<p>I think Designer Oriented Architecture for non-techy (non-techy does not mean &#8220;no skill&#8221; at all&#8230;see later in this post) is not compatible with maintenance, upgrade and evolution capabilities. For the rest of this post and as I&#8217;m lasy, I will talk only about maintenance but you can replace by &#8220;maintenance, upgrade and evolution&#8221;. The incompatibility is simply due to the fact that a non-programmers have in fact development skills but are Morts (see Jemremy&#8217;s <a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/10/10/alt-net-recap-front-and-center-let-s-talk-constructively-about-mort.aspx" target="_blank">post</a> which I totally agree on), meaning they have to build/customize applications to fulfil some requirements and they learn/use <u>only</u> what they need to do this: &#8220;Mort is a developer who only learns just what he needs to complete his project, on the project&#8221;.</p>
<p>Microsoft Visual Studio and .Net framework are addressing this very well. This is in itself not a bad thing, but it prevent maintenance. <a href="http://evanhoff.com/Default.aspx" target="_blank">Evan Hoff</a> catch it in his <a href="http://evanhoff.com/archive/2007/09/09/51.aspx" target="_blank">post</a>. Clearly: Designer Oriented Architecture goes against maintainability&#8230;and Enterprise Softwares (or BPM products) have not yet understood this. Today, I&#8217;ve seen high level requirements for new Enterprise Software platform for an external company with 3 requirements inside the same slide: &#8220;Easy to build quality application&#8221; (where quality means testability and maintainability), &#8220;High level of extensibility without preventing upgrade&#8221; and &#8220;Ease tayloring, configure and manage applications&#8221;.</p>
<p>I can understand people that are looking for a Ferrari able to do cross over and consuming less than 1liter of fuel per 100 kilometre&#8230;but I&#8217;m doubtful on the success of the search.</p>
<p>Quality, maintenance, ease of upgrade, evolution capabilities are just incompatible with tayloring done by Mort.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/60/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/60/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=60&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/10/16/enterprise-software-programmability-capabilities-for-non-programmerstop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>State for persistent entities</title>
		<link>http://sauvee.wordpress.com/2007/06/14/state-for-persistent-entities/</link>
		<comments>http://sauvee.wordpress.com/2007/06/14/state-for-persistent-entities/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 11:27:34 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/sans-categorie/state-for-persistent-entities/</guid>
		<description><![CDATA[Reading an interesting post from Dwhittaker, I think the problematic is broader. It appears through the question on how should I build my entity from the DAO object. To my opinion, the DAO object should be as much simple as possible&#8230;not smart at all. The best is to generate it using byte code generation for example [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=50&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Reading an interesting <a href="http://devlicio.us/blogs/derik_whittaker/archive/2007/06/06/opinions-wanted-object-pass-through-vs-value-assignment.aspx">post</a> from Dwhittaker, I think the problematic is broader. It appears through the question on how should I build my entity from the DAO object. To my opinion, the DAO object should be as much simple as possible&#8230;not smart at all. The best is to generate it using byte code generation for example using annotation in the real entity object for example, buit this should be addressed into another post <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>If the DAO object is generated, then the entity (or value object) can be build by generic code using reflection for example. Then the &#8220;real&#8221; question raise: what about information lost during the entity creation. Let me explain with a very simple example: waht about the Id of the DAO object? It has absolutely no sense in the entity object, but is required when the application push back the entity object to the persistence layer to store changes. This topic is highlighted in this <a href="http://ayende.com/Blog/archive/2007/06/03/Persistence-Ignorance-in-the-Entity-Framework.aspx">post</a> of Ayende and expose another example: detection of changes.</p>
<p>The problem is about keeping track of information on an object (the entity) without exposing it. more over, this object can be moved from a process to another (or webservice). This sounds very close to the state in ASP net pages, which provide a very good answer. So, I wouold advocate to store a state in the entity object that is crypted and reused by the persistence layer.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=50&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/06/14/state-for-persistent-entities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Pourquoi ne pas coder en XML?</title>
		<link>http://sauvee.wordpress.com/2007/05/04/pourquoi-ne-pas-coder-en-xml/</link>
		<comments>http://sauvee.wordpress.com/2007/05/04/pourquoi-ne-pas-coder-en-xml/#comments</comments>
		<pubDate>Fri, 04 May 2007 09:56:49 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/sans-categorie/pourquoi-ne-pas-coder-en-xml/</guid>
		<description><![CDATA[Avec l&#8217;émergence de l&#8217;AOP (Aspect Oriented Programming) et l&#8217;IoC (Invertion of Control), on voit fleurir de plus en plus de développement reposant sur l&#8217;utilisation d&#8217;XML au plus près du code. L&#8217;inconvénient majeur (d&#8217;où ce billet) que j&#8217;y vois est l&#8217;utilisation abusive de XML (voire HTML&#8230;je vais détaillé un peu plus loin) pour remplacer du code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=48&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Avec l&#8217;émergence de l&#8217;AOP (Aspect Oriented Programming) et l&#8217;IoC (Invertion of Control), on voit fleurir de plus en plus de développement reposant sur l&#8217;utilisation d&#8217;XML au plus près du code. L&#8217;inconvénient majeur (d&#8217;où ce billet) que j&#8217;y vois est l&#8217;utilisation abusive de XML (voire HTML&#8230;je vais détaillé un peu plus loin) pour remplacer du code Java ou d&#8217;un autre langage. Je ne nie absolument pas la valeur que représente l&#8217;IoC, ce qui m&#8217;interroge c&#8217;est: Pourquoi vouloir utiliser un support tel que le XML pour fraire de la programmation alors qu&#8217;il n&#8217;est absolument pas fait pour cela. Cela va au delà du couple XML/IoC, on peut parler de HTML/Fit ou encore XML/<a href="http://ftpna2.bea.com/pub/downloads/ws-bpelj.pdf">BPELJ</a>. Lier des composants ou process de haut niveau entre eux de manière découplée avec une configuration en XML à tout a fait du sens. Cependant, plus l&#8217;intégration entre ces composant devient intriquée, plus la configuration devient complexe, in-maintenable, sensible aux moindres changement. Pour le BPEL, c&#8217;est la même chose, quand l&#8217;interaction entre les process devient complexe au point de devoir faire des boucles, il est temps de se demander si on ne doit pas plutôt utiliser un vrai langage de programmation qui se chargera de masquer cette complexité. Dernier exemple: HTML/Fit, qui est un framework de test permettant a des &#8220;business analyst&#8221; ou &#8220;Ingénieurs Qualité&#8221; d&#8217;écrire des tests en HTML pour valider une fonctionnalité. Cela fonctionne très bien, jusqu&#8217;a moment ou une voit apparaitre quasiment des lignes de code dans les ligne de tableau Fit. Il est alors grand temps d&#8217;écrire une <em><span style="font-family:Verdana;">fiterie</span></em> de plus haut qui va masquer ce pseudo-code, sinon il faudra être développeur pour pouvoir écrire un test&#8230;et c&#8217;est exactement l&#8217;inverse qui est recherché.</p>
<p>D&#8217;une manière générale, laissons aux langages de programmation la responsabilité de cacher la complexité&#8230;ou tout simplement les détails d&#8217;implémentation, et laissons au XML (ou HTML) la configuration de haut niveau compréhensible à tout le monde.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/48/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/48/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=48&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/05/04/pourquoi-ne-pas-coder-en-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Persistence Stack (3)</title>
		<link>http://sauvee.wordpress.com/2007/03/29/persistence-stack-3/</link>
		<comments>http://sauvee.wordpress.com/2007/03/29/persistence-stack-3/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 14:24:16 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/net/persistence-stack-3/</guid>
		<description><![CDATA[This post is the third of a serie of posts on persistance stack.
In the previous posts, I describe my humble opinion of the layering for a persistance stak for an entreprise application (for smaller application, there is no problem to mix or get ride of layers). Most of the folks talking about a persistance layer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=43&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This post is the third of a serie of posts on persistance stack.</p>
<p>In the previous posts, I describe my humble opinion of the layering for a persistance stak for an entreprise application (for smaller application, there is no problem to mix or get ride of layers). Most of the folks talking about a persistance layer are often forgot to talk about the various services that are providing a strong added value to the applications build on top of it. So, this post is dedicated to some of these services. I&#8217;m not saying I will be exhaustive (because I simply do not know all of the potential servics that a persistance stack could provide) but I will try to go beyond what I usually see on this topic.</p>
<p><strong>What is a persistance stack service?</strong></p>
<p>I should;maybe say: why are they so often forgotten? I think this is because we start to deals with business requirements that are not so attractive to technical folks that prefer challenge on the core of the persistance stack. IMHO, a persistance service is an engine that can fulfill extra business requirement from a persistance perspective. That means it&#8217;s not mandatory at all from a persistance stack to provide such services as they can be provided through the applciations themselves. The huge benefit to integrate them in the persistance stack is to allow consistent and rapide application development without derundancy in code.</p>
<p>In this post i will details services as query language, scripting, database creation and upgrade, workflow engine, archiving, versioning and partitioning. Some of this service are <em>low level services</em> &#8230; I mean they require access to the lower layers of the stack (even if their configuration can be localised in the same area than configuration of higher level services).</p>
<p><strong>Query language</strong></p>
<p>Even if lot&#8217;s of persistance stack provide a query language, I do not concider it as a core service of the persistence stack as these persistance framework are usually presenting it as a tuning step or a way to workaround the regular usage of the framework for complexe request. Despite this, this is probably the persistance service having the strongest capabilities and is often a requirement for the other services as partitioning for example. The aim is provide a query pseudo SQL to the framework. I don&#8217;t think the key feature of this service is to provide an RDBMS independante query language&#8230;I&#8217;m sure most of you won&#8217;t agree. To me the key feature is to provide a way to provide to the application administrator a way to go beyond the application limitations&#8230;if it&#8217;s RDBMS independant: great, but we all know that even if SQL is a standard, all implementations are differents and I don&#8217;t talked about opitimization! This service is so powerful that it should be</p>
<p><strong>Partitioning</strong></p>
<p>This service is a low level service, that means it&#8217;s customization requires the user to use the Query Language as it expose more the database schema than business objectes. Partitioning is a way of doing segregation on (read or write) access to entities (I should say main record of entities). This is tipically a <em>where</em> statement.</p>
<p><strong>Workflow Engine</strong></p>
<p>The persistence layer will trigger this engine to handle integrity check and process steps.</p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=43&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/03/29/persistence-stack-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Le language assembleur présente-t-il toujours un intérêt?</title>
		<link>http://sauvee.wordpress.com/2007/03/23/le-language-assembleur-presente-t-il-toujours-un-interet/</link>
		<comments>http://sauvee.wordpress.com/2007/03/23/le-language-assembleur-presente-t-il-toujours-un-interet/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 15:43:47 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/net/le-language-assembleur-presente-t-il-toujours-un-interet/</guid>
		<description><![CDATA[Cette question refait encore surface (cf billet sur slashdot). Il est incroyable de voir tant de guerres de chapelles avec des arguments totalement loin de la vraie problématique. La question classique est &#8220;En quoi l&#8217;assembleur peut apporter quoi que ce soit alors que tout le monde utilise un langage de haut niveau style Java ou C#?&#8221;.
Primo, tout [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=42&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Cette question refait encore surface (cf <a href="http://ask.slashdot.org/askslashdot/07/03/21/2139219.shtml" target="_blank">billet</a> sur slashdot). Il est incroyable de voir tant de guerres de chapelles avec des arguments totalement loin de la vraie problématique. La question classique est &#8220;En quoi l&#8217;assembleur peut apporter quoi que ce soit alors que tout le monde utilise un langage de haut niveau style Java ou C#?&#8221;.</p>
<p>Primo, tout le monde n&#8217;utilise pas ce genre de langages et l&#8217;assembleur est parfois totalement indispensable dans certains domaines (drivers, pixel shader,&#8230;etc). Secundo, même en dehors de ces domaines, l&#8217;assembleur ou plus précisément des connaissances en assembleur sont très utiles. On peut sans problème coder sans avoir la moindre connaissance de l&#8217;assembleur&#8230;c&#8217;est vrai, mais il assez impressionnant de voir comment des Bac+5 se plantent sur des problèmes simples genre listes chainées. Ensuite, quand arrivent les problèmes de performances, consommation mémoire, un développeur qui ne sait absolument pas comment cela se passe en interne, sera complètement démuni. On pourrait re-phraser la question initiale en :&#8221;Quel est l&#8217;intéret de connaitre les pointeurs quand on programme en Java ou C#?&#8221;. La réponse est la même: on peut faire sans, mais on se casse les dents sur des bugs tout bêtes et on tombent sur des problèmes de consommation mémoire.</p>
<p>En conclusion, le langage assembleur n&#8217;est plus vraiment utilisé (saufs domaines spécifiques a ne pas négliger) mais sa connaissance (ou tout du moins la connaissance des méandres internes des langages de haut niveau) permettent d&#8217;éviter beaucoup de problèmes. Les développeurs ayant cette connaissance ont aussi en général un très bon niveau algorithmique et savent optimiser et coder correctement. Ce n&#8217;est donc pas indispensable mais reste la preuve d&#8217;un niveau élevé.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=42&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/03/23/le-language-assembleur-presente-t-il-toujours-un-interet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Persistence Stack (2)</title>
		<link>http://sauvee.wordpress.com/2007/02/21/persistence-stack-2/</link>
		<comments>http://sauvee.wordpress.com/2007/02/21/persistence-stack-2/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 11:09:16 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/net/persistence-stack-2/</guid>
		<description><![CDATA[This post is the second of a set of post on the same topic starting here.
Where do I put business logic?
I&#8217;ve seen this question raised a lot of times by developers who are dealing with management applications using a persistence stack. This question is simple and legitimate but the answer is a little bit trickier.
First [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=40&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span>This post is the second of a set of post on the same topic starting <a href="http://www.sauvee.com/wp02/index.php/net/persistence-stack/">here</a>.</span></p>
<p><span /><strong><span>Where do I put business logic?</span></strong></p>
<p><strong><span /></strong><span>I&#8217;ve seen this question raised a lot of times by developers who are dealing with management applications using a persistence stack. This question is simple and legitimate but the answer is a little bit trickier.</span></p>
<p><span /><span>First statement: there are different kinds of business logic which have to be in different layers. Business logic is itself fuzzy and quit large. To some extreme some could argue that the entities definition is part of the business logic, even the primary keys as a way to uniquely retrieve an entity. To the other end, a business process is considered as a kind of business logic. I personally think the business logic is wide but exclude the example I just mentioned.</span></p>
<p><span /><span>Even if an entity has obviously some business inside its definition, its only data, so no logic at all. For the primary keys, I consider that a exposing primary keys is a mistake that prevent evolution and prevent implementation of high level technical services as archiving for example. The best is to expose 2 attributes per entity for retrieval: one which is human readable (as the ID of an employee) and another one which will be used for application integration. The idea is that these &#8220;IDs&#8221; are not varying from a system to another, or during the life cycle of the entities (except for exclusive business reasons), in the contrary of an internal primary key which could vary over time.</span></p>
<p><span /><span>Bitwise, you can consider that the mandatoryness of an attribute (or validation) are part of the business logic. I agree some could argue it&#8217;s exclusively a data modelling concern. That&#8217;s not totally wrong but I think there is a mismatch between engine location and configuration. The engine location is of course in the data modelling layer but as this is part of the business logic (from my point of view) this should be configured in the same area as the other business logic: in the configuration. I will address the problematic of configuration later on. At the same level you have other business logics as: right management, partitioning and entity validity (broader than attributes validity).</span></p>
<p><span /><span>Back to the initial question: where do I put my business logic? IMHO, the best is to define it in a set of configuration files and let the entities delegate to the appropriate engine. This provides a flexible approach (separation between the configuration and the engine) which is also generic (usage of an engine). This question is not totally addressed by this approach and hides the real problematic: scope of business logic.</span></p>
<p><span /><span>The scope of the business logic is far more meaningful and key for a persistence stack. There are at least 3 different scopes:</span></p>
<ul>
<li><span /><span>entity attributes</span></li>
<li><span /><span>entity</span></li>
<li><span /><span>application</span></li>
<li><span /><span>inter-applications</span></li>
</ul>
<p><span /><span>The entity attribute scope is for example the scope for validation/mandatoryness of the attribute PONumber in a purchase order for example. The entity scope is for example the global amount of a purchase order which is supposed to be the sum of the amount of the purchase order lines. The application scope is supposed to address the internal workflows to the application as the approval workflow of a user request for example. The inter application scope will address business logic between applications as between the requesting application/service and the catalogue application/service.<br />
</span><span>You will notice the &#8220;entity&#8221; word is ambiguous: does a purchase order line is an entity or not? IMHO, from a strict business perspective, I don’t think so, even if it&#8217;s convenient. I think a DAO can be considered as entity as soon as it has it’s own validity in the business: does not make sense to talk about a purchase order line outside of the scope of a purchase order. This distinction is sometimes used for value objects versus DAO. I personally prefer use entity and DAO and have both of them in separate layers: Data Access Layer (or data modelling layer) and Domain Layer.<br />
</span><span><font face="Times New Roman" size="3"> </font></span><span> </span><span /><span> </p>
<p></span> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=40&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/02/21/persistence-stack-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Persistence Stack</title>
		<link>http://sauvee.wordpress.com/2007/01/31/persistence-stack/</link>
		<comments>http://sauvee.wordpress.com/2007/01/31/persistence-stack/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 08:39:42 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/index.php/net/persistence-stack/</guid>
		<description><![CDATA[This post is my 2 cents contribution to the debate on persistance stack architecture. I try to write short post (the shorter it is&#8230;the understanding greater is), but this time &#8212;with such a topic&#8212; I can only fail on this point. So this post will be followed by other posts  .
I will not start [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=37&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This post is my 2 cents contribution to the debate on persistance stack architecture. I try to write short post (the shorter it is&#8230;the understanding greater is), but this time &#8212;with such a topic&#8212; I can only fail on this point. So this post will be followed by other posts <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>I will not start from scratch explanation on the different approachs, the wording and so on&#8230;you will find some links in this post that I find usefull and I do not want to be redundant with them. I would like to enlarge the scope of the persistance stack to higly customizable environement and also the various features required by an Entreprise Management Application (taht I will name <em>EMA</em>) relying on a persistance layer.</p>
<p><strong>What are the different layers (required or not)</strong></p>
<p>You will find <a href="http://www.onjava.com/pub/a/onjava/2004/04/07/wiringwebapps.html" target="_blank">here</a> an excellent article on the different layers of a typical persistence stack and further&#8230;to the UI. The UI is key but I will not address this question in this post. You will notice the author talk about a Persistence Layer which is different from an Persistence Stack. I use the word &#8220;Persistance Stack&#8221; to express all the layers that are requiered to build an application that use a database without the UI. These layers are usually (from the upper level to the RDBMS middleware):</p>
<ul>
<li>Service Layer</li>
<li>Domain Layer</li>
<li>Data modeling</li>
<li>Persistance Layer</li>
<li>RDBMS middleware </li>
</ul>
<p><strong>About the interest to respect layering</strong></p>
<p>It&#8217;s just about commion sense : by layering correctly you will decouple your code and allow easier replacement of components as there are inricated. Most of the time, developers are doing naturally as it give an impression of over complicated the code. The important point they have to though about that an Entreprise Software relying on database will grow and evolve (faster at the begining) and you will write at the end touthands lines of code. If the rules and delimitations are clear from the begining, you will avoid a real mess of large classes.</p>
<p>Now let see in details the aim of each layers. I will go from down to top to express clearly the boundaries of each layer (starting from top tempt to mix the layer and put the code/requirement at a higher level than it should).</p>
<p><strong>Persistance layer</strong></p>
<p>The persistance layer is juste about persistance&#8230;obvious but not always respected. Persisance is only about storing and retreiveing data, nothing else. You can use an ORM (Object Relational Mapping) framework as <a href="http://www.hibernate.org/" target="_blank">Hibernate</a> or <a href="http://www.oracle.com/technology/products/ias/toplink/index.html" target="_blank">TopLink</a> for example. It&#8217;s only bout storing, that means no validation, no business logic at all, and the objects should be limited to structures, no methods. There is no real interest to build it&#8217;s own persistance layer as most of the time your requirement are fulfilled by the most advanced frameworks. That does not means you should not take care in the choice of this framework as this layer is the key for the performances: having a poor framework (even a rich ones depending on how you will use them) will dramaticcaly impact performance by generating useless or not optimized RDBMS queries.</p>
<p>Most of the time these objects are named DAO objects or DAL objects (for Data Access Layer objects).</p>
<p>Tow extensions to EMA that may be include in this layer are rights and partitioning. Rights management is the ability to give read/write access to attributes of the DAL objects. The Partitioning is the ability to segregate the read/write access to DAL objects. These fucntionality have obviously a business aspect,e specially for the partitioning. But for performance reasons (espacially for partitioning which is usually implemented using a where statement), this might be implemented in this layer.</p>
<p><strong>ORM..a myth or not? </strong></p>
<p>The different post, disucssions and articles I&#8217;ve read about persistance stack are highlighting the interest of doing OOP (Object Oriented Programing) especially in the domain layer. Most of the argument yield to the mandatoiness of using an ORM which is the key pivotal framework to step from a relational database to a obejct oriented coding space. This a myth to me and is only relevant for folks that love OOP and particularely love debate about the beauty of it.</p>
<p>ORM use have to be limited to what it is design for: just create DAO objects for upper layer. Some folks abuse of this because they are mixing it with the higher level layers which is strong mistake. I&#8217;ve looked at Hibernate and <a href="http://www.hibernate.org/343.html" target="_blank">NHibernate</a> (to simplify: NHibernate have the same capabilities than Hibernate v2, but in a .Net environment). As a framework it provides lots of different ways to operate with the RDBMS layer, but you usually use on 10% of them as you are doing some assements. IMHO, this is not a mistake to do so, if you take care that this assement will not have a strong impact on the other layers. You will never be able to take some decisions that have absolutely no impact, but you can mitigate this.</p>
<p>An example of assement is to chose the same type for keys: there is a real advantage to do it, but it will have an impact on the Domain Layer and the evolution of your application (if the type is long&#8230;evolve to GUID for example may be tricky if they are exposed and used in the other layers). On this specific point, a good practice is to never <strong>expose</strong> internal keys outside of the layer but to expose business keys in the Service and Domain layers. For each object, exposing 2 kind of business kay is useful: an international one, and a <em>business</em> one. The international one is a key that won&#8217;t varie from a language to another, that is usually a sequence of numbers, which is used by external programs to synchronize data for example. The business one is a key that is usually used by humans over business process as a social key for a employee for example, or a barcode for an asset.</p>
<p><strong>Data Modeling</strong></p>
<p>This layer is most of time mixed with the Domain Layer and Persistence layer, but it can be useful to detail its contract.</p>
<p>In my opinion, part of the contractrthis layer is the dual of the relationship aspect in RDBMS. I deed, you have to define the relationship between various objects in the persistance layer (as a purchase order have order lines for example), but you have to define some low level behaviour. Some of you could say that I start to introduce some business logic here&#8230;no, i don&#8217;t but you are right: we should not introduce business logic here yet. The behaviour I&#8217;m talking about are related to the impact on relationships and complex custom types during CRUD (<a href="http://en.wikipedia.org/wiki/CRUD_(acronym)" target="_blank">Create Retrieve Update Delete</a>) operations made by the persistance layer.</p>
<p>A complex custom type is a type that rely on more than one attribute of a DAO object. Here are 2 examples.</p>
<p><em>Currencies</em>:<em> </em>Handling of currencies is not simple, you have to be able to do arithmetics operations on them, and convert them. Obviously a double type field is not enough, neither a string (when I say string, is a string having only one information, not a string containing an xml description of a currency object with multiple attributes). So in the data modeling you could declare that the currency attribute of the value object will be rely on a set of attributes (amount, currency symbol, reference value in $, date of reference convertion) of a DAL object.</p>
<p><em>Enumeration</em>: Some enumerations fields may have these requirement. First: the user can add new values. Secondly: some values used by the business layers may not be removed. A typical example is the status of a purchase order. The aim is to present some choices to the end-users (all values already entered by other users for a status plus some predefined fixed values). For technical reasons you may store a predefined fixed value in an attribute and other values into another field, but you want your applciation not to be aware of this.</p>
<p>As you see these are low level behaviour. That the same for relationship: if an object of type A is linked to an (or a collection of) object B, B should be deleted if its parent (from a relationship perspective) A is deleted or B should be attached to another object of type A? Does it makes sense to have an object of type B without an association to an object of type A? All this behaviour have a business rational but this have to be implemented in this layer.</p>
<p>Regarding this last sentence, it really make sense to gather together as much as possible the configuration of almost all layers inside one location. In a metadata driven environement, this is absolutely not an issue to mix configuration of different layer inside a unique location (a file or a a folder)&#8230;more over, I would recommend it.</p>
<p><strong>Where do I put business logic?</strong></p>
<p>To continue <a href="http://www.sauvee.com/wp02/index.php/net/persistence-stack-2/">here</a></p>
<p><strong>Other interesting links</strong><br />
<a href="http://www.martinfowler.com/bliki/AnemicDomainModel.html">Segregation/Distinction between Service Layer and Domain Layer </a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=37&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/01/31/persistence-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
		<item>
		<title>Development principals</title>
		<link>http://sauvee.wordpress.com/2007/01/08/development-principals/</link>
		<comments>http://sauvee.wordpress.com/2007/01/08/development-principals/#comments</comments>
		<pubDate>Mon, 08 Jan 2007 12:47:50 +0000</pubDate>
		<dc:creator>Mickael</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.sauvee.com/wp02/?p=27</guid>
		<description><![CDATA[Here is really great post on principals to write maintenable code. More over this can be extended to improve supportability of the products.
Most of the developers are doing development only! It does not sound like a problem for you&#8230;I thing we are at the exact barrier between real development and hobby work. I&#8217;m not that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=27&subd=sauvee&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://codebetter.com/blogs/jeremy.miller/archive/2006/12/06/On-Writing-Maintainable-Code.aspx">Here is really great post</a> on principals to write maintenable code. More over this can be extended to improve supportability of the products.</p>
<p>Most of the developers are doing development only! It does not sound like a problem for you&#8230;I thing we are at the exact barrier between real development and <em>hobby work</em>. I&#8217;m not that fan of Agil development as it does not work well if not apply correctly and with a minimum of knowledge, experience and willing to do it. Nevertheless, Agil methodology as the real advantage to melt the concerns and responsability of QA, dev, CM over the entire team. From what I&#8217;ve seen, usually, development task are only 20 to 40% of to whole process to implement new features (and I don&#8217;t take into account the maintenance, support and bug fixe after release). Do not use the fake argument that it depends on the environment (Language, Framework, QA automation rate&#8230;etc), it&#8217;s just wrong. I prefer by far having a developper that knows less about a language or a framework but concerned by CM, QA, comprehensiveness and maintenability of features/code than a rely strong developer that will force to use the last framework release that he knows and break build process&#8230;even if his coding skills are higher. To make it shorter: don&#8217;t care about improving efficiency about 10% on 20-40% of the process, but I care if it&#8217;s on 60%-80% of the process plus maintenance, evolution&#8230;etc.</p>
<p>A sentence from the article that are fiond terribly true: <em>&#8220;there is an inflection point where a coder mindlessly spewing out code transforms into a thoughtful software craftsman capable of creating maintainable code.  That inflection point happens the day a coder first stops, lifts his/her nose out of the coding window, and says to him/herself &#8220;where should this code go?&#8221;</em>.<br />
I&#8217;ve seen this many times and is named &#8220;Seperation of concerns&#8221;. That does not mean using <strong>Spring</strong> is mandatory do code correctly <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> , but as soon as a developer start to think this way, he will improve maintenability, componentization, and avoid spagetty development with useless interdepedencies. We see new languages as Ruby, Python that are marketed as &#8220;less code to implement the same feature&#8221; than with other languges as Java and C#. I agree that simplicity is fondamental and less code also, but this should not lead to weird code that can&#8217;t be maintained: if seperation of concerns leads to 3 additional lines of code to do a back-and-forth  between 2 layers&#8230;that&#8217;s good.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sauvee.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sauvee.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sauvee.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sauvee.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sauvee.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sauvee.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sauvee.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sauvee.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sauvee.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sauvee.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sauvee.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sauvee.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sauvee.wordpress.com&blog=3312526&post=27&subd=sauvee&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sauvee.wordpress.com/2007/01/08/development-principals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49dd7c0faeae96273771783ee87c7e8f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mickael</media:title>
		</media:content>
	</item>
	</channel>
</rss>