<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.23057-</id>
  <updated>2009-11-16T15:51:03Z</updated>
  <title>Comments for Anatomy of an Enterprise Flex RIA Part 8: Development Cycle (http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.23057</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=23057" title="Anatomy of an Enterprise Flex RIA Part 8: Development Cycle" />
    <published>2008-03-10T16:27:25Z</published>
    <updated>2008-10-01T01:29:01Z</updated>
    <title>Anatomy of an Enterprise Flex RIA Part 8: Development Cycle</title>
    <summary>In the last installment of Anatomy of an Enterprise Flex RIA, we looked at building Flex with Maven and Ant, and now we&apos;ll look at the development lifecycle so far. Then, in preparation for next installment, we&apos;ll look at the dependencies for the persistence layer of the application.  Every Monday brings another stage of development at InsideRIA.com.</summary>
    <author>
      <name>Tony Hillerson</name>
      
    </author>
    
    <category term="Features" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<div class="ap_r" style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/03/anatomy_of_an_enterprise_flex/riaseries_part8.jpg" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/03/anatomy_of_an_enterprise_flex/riaseries_part8.jpg" alt="riaseries_part8.jpg" title="Click to enlarge" width="148"/></a></div>

<p><a href="http://www.insideria.com/2008/03/the-ui-project-maven-build.html">Last installment</a> we looked at building Flex with Maven and Ant, and now we'll look at the development lifecycle so far. Then, in preparation for next installment, we'll look at the dependencies for the persistence layer.</p>

<p>Now that we have tasks to help us and we&#8217;ve hooked into a few points in the Maven build process, let&#8217;s discuss making changes and reviewing those changes through the web browser in our development environment.</p>

<p>Let&#8217;s look at it from this point of view (see Table 4). What type of resource changed, and what needs to happen for us to see the changes? The &#8220;Build&#8221; column in the table tells what command to run and from what project to run it to compile, build, or otherwise make the changes &#8220;stick.&#8221;<br />
 <br />
The &#8220;Deploy&#8221; column tells which command from which project will push the changes to the local development environment so that we can see the changes.</p>

<table width="430"><tr><th scope="col" colspan="4" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px;text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;">Table 4. Maven build Resource Changes</th></tr><tr><th scope="col" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px; text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;">Type of change</th><th scope="col" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px;text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;">Changed resource</th><th scope="col" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px;text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;"> Build </th><th scope="col" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px;text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;"> Deploy </th></tr><tr><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">Database <br />change</td><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;"><span class="yellowinlinecode">bookie-data/<br />src/data/<br />schema.xml</span></td><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;"><span class="redinlinecode">`ant load-schema`</span> in <span class="redlinlinecode">bookie-data</span></td><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">None needed</td></tr><tr><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">Entity or session bean change</td><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">Any Java in <br /><span class="redinlinecode">bookie-data</span></td><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;"><span class="redinlinecode">`mvn package`</span> in <span class="redinlinecode">bookie-data</span></td><td valign="top" style="width: 25%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;"><span class="redinlinecode">`ant dev-deploy`</span> in root of project</td></tr></table>

<p><br />
For example, Figure 9 shows the output of <span class="redinlinecode">load-schema</span> in the <span class="redinlinecode">bookie-data</span> project.</p>

<div class="ap_c" style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/03/anatomy_of_an_enterprise_flex/anatomy8_fig9.jpg" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/03/anatomy_of_an_enterprise_flex/anatomy8_fig9.jpg" alt="anatomy8_fig9.jpg" title="Click to enlarge" width="400"/></a>
<div class="acaption">Figure 9. Output of load-schema in bookie-data project</div></div>

<p></p>

<p><br />
<strong>Building the Persistence Layer: Maven Configuration</strong></p>

<p>We&#8217;ve already gone over the bulk of the POM file and its interaction with Ant. All that&#8217;s left is to look at the dependencies:</p>

<div class="acode"><pre><br />&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;</span><span class="green">dependencies</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;</span><span class="green">dependency</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;</span><span class="green">groupId</span><span class="blue">&gt;</span><span class="green">microcontainer.jboss.ejb3</span><span class="blue">&lt;/</span><span class="green">groupId</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;</span><span class="green">artifactId</span><span class="blue">&gt;</span><span class="green">hibernate-all</span><span class="blue">&lt;/</span><span class="green">artifactId</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;</span><span class="green">version</span><span class="blue">&gt;</span><span class="green">rc9</span><span class="blue">&lt;/</span><span class="green">version</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;</span><span class="green">scope</span><span class="blue">&gt;</span><span class="green">provided</span><span class="blue">&lt;/</span><span class="green">scope</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;/</span><span class="green">dependency</span><span class="blue">&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;<span class="green">...</span><br />&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">&lt;/</span><span class="green">dependencies</span><span class="blue">&gt;</span></pre></div>

<p><br />
I&#8217;m not going to put the whole dependency list in here, but there are a few points to hit. Notice how a dependency uses the same &#8220;big three&#8221; identifiers that all projects need to define: <span class="redinlinecode">groupId, artifactId</span>, and <span class="redinlinecode">version</span>. This is enough information for Maven to uniquely pick out a dependency.<span class="redinlinecode">&lt;scope&gt;</span>, the next tag under the big three, tells Maven when the project needs the dependency. Table 5 lists the full explanation of scope from <a href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html" target="_blank">Maven&#8217;s web site</a>.</p>

<p><br />
<table width="430"><tr><th scope="col" colspan="2" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px;text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;">Table 5. Scope in Maven</th></tr><tr><th scope="col" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px; text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;">Scope</th><th scope="col" style="font-size: 11px; font-weight: bold; color: #525252; border: 1px solid #d7d7d7; letter-spacing: 2px;text-transform: uppercase; text-align: left; padding: 6px 6px 6px 12px; background-color: #f2f2f2;">Description</th></tr><tr><td valign="top" style="width: 40%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">compile</td><td valign="top" style="width: 60%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">This is the default scope, and it is used if none is specified. Compile dependencies are available in all classpaths.</td></tr><tr><td valign="top" style="width: 40%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">provided</td><td valign="top" style="width: 60%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">This is much like <span class="redinlinecode">compile</span>, but it indicates that you expect the JDK or a container to provide it. It is available only on the compilation classpath, and it is not transitive.</td></tr><tr><td valign="top" style="width: 40%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">runtime</td><td valign="top" style="width: 60%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">This scope indicates that the dependency is not required for compilation, but it is required for execution. It is in the runtime and test classpaths, but not in the compile classpath.</td></tr><tr><td valign="top" style="width: 40%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">test</td><td valign="top" style="width: 60%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">This scope indicates that the dependency is not required for normal use of the application, and it is available only for the test compilation and execution phases.</td></tr><tr><td valign="top" style="width: 40%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">system</td><td valign="top" style="width: 60%; border: 1px solid #d7d7d7; background: #fff; padding: 6px 6px 6px 12px; color: #525252;">This scope is similar to <span class="redinlinecode">provided</span>, except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.</td></tr></table></p>

<p><br />
<div class="ap_r" style="width:180px;"><a href="http://www.oreilly.com/catalog/9780596514402/?CMP=ILC-dm_nav_related-books" target="_blank"><img border="0" src="http://www.oreilly.com/catalog/covers/9780596514402_cat.gif" width="180" height="233" /></a><br />
<div class="apcaption"><a href="http://www.oreilly.com/catalog/9780596514402/?CMP=ILC-dm_nav_related-books" target="_blank">Get your copy of Tony Hillerson's Enterprise Application Development with Flex.</a></div></div>Inside <span class="yellowinlinecode"><em>src</em></span> is a directory for the main source of the project, called <span class="yellowinlinecode"><em>main</em></span>. At the same level is a folder for test code, called <span class="yellowinlinecode"><em>test</em></span>. The code goes in the <span class="yellowinlinecode"><em>main</em></span> and <span class="yellowinlinecode"><em>test</em></span> directories and is organized by the type of language&#8212;in this case, a <span class="yellowinlinecode"><em>java</em></span> directory holds the Java code in the data project directory, and a <span class="yellowinlinecode"><em>java</em></span> and <span class="yellowinlinecode"><em>flex</em></span> directory in the web project.  </p>

<p></p>

<p>You can also mark a dependency <optional>true</optional> if there isn&#8217;t a hard requirement for it. For instance, some logging packages will make use of some dependencies if they&#8217;re found, but won&#8217;t use them if they&#8217;re not found.</p>

<p>Remember that you can build the bookie-data&#8217;s persistence unit JAR by typing `mvn package` on the command line inside the root of the bookie-data project.</p>

<p>Next installment we're going to look at the code that makes up the persistence layer of our sample application, both the Java and ActionScript code. You can always find the entire series <a href="http://www.insideria.com/series-anatomy-flex.html">here</a>.<br />
</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23057-comment:2017433</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23057" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html#comment-2017433" />
    <title>Comment from Greg on 2008-05-29</title>
    <author>
        <name>Greg</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Thanks for Maven’s web site link. I found the link very useful<br />
-------------------------------------<br />
Greg <a href="http://www.massiveonlinegames.org">MyPage</a></p>]]>
    </content>
    <published>2008-05-29T18:39:48Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23057-comment:2017625</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23057" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html#comment-2017625" />
    <title>Comment from lazer epilasyon on 2008-06-08</title>
    <author>
        <name>lazer epilasyon</name>
        <uri>http://www.lazerepilasyon-merkezi.org</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.lazerepilasyon-merkezi.org">
        <![CDATA[<p>Hi all<br />
I tried a few weeks ago and it crashed very often. i dnt know why but i had to uninstall and now i use ie7 again. i will wait for a later release.<br />
<a href="http://www.lazerepilasyon-merkezi.org  ">lazer epilasyon</a><br />
</p>]]>
    </content>
    <published>2008-06-08T19:07:37Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23057-comment:2017861</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23057" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html#comment-2017861" />
    <title>Comment from ankara evden eve nakliyat on 2008-06-14</title>
    <author>
        <name>ankara evden eve nakliyat</name>
        <uri>http://www.evdenevenakliyatnakliye.info</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.evdenevenakliyatnakliye.info">
        <![CDATA[<p>Next installment we're going to look at the code that makes up the persistence layer of our sample application, both the Java and ActionScript code. You can always find the entire series <a href="http://www.cateringsirketi.name.tr ">catering</a> </p>]]>
    </content>
    <published>2008-06-14T08:39:53Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23057-comment:2017864</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23057" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html#comment-2017864" />
    <title>Comment from ankara evden eve nakliyat on 2008-06-14</title>
    <author>
        <name>ankara evden eve nakliyat</name>
        <uri>http://www.evdenevenakliyatnakliye.info</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.evdenevenakliyatnakliye.info">
        <![CDATA[<p>You can also mark a dependency true if there isn’t a hard requirement for it. For instance, some logging packages will make use of some dependencies if they’re found, but won’t use them if they’re not found. <a href="http://www.yemeksirketi.name.tr ">yemek şirketi</a> very nice article.</p>]]>
    </content>
    <published>2008-06-14T08:45:27Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23057-comment:2017865</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23057" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/03/anatomy-of-an-enterprise-flex-2.html#comment-2017865" />
    <title>Comment from Anonymous on 2008-06-14</title>
    <author>
        <name>Anonymous</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>This scope indicates that the dependency is not required for compilation, but it is required for execution. It is in the runtime and test classpaths, but not in the compile classpath.  <a href="http://www.evdenevenakliyatnakliye.info ">nakliyat</a> heer very nice.Good article.</p>]]>
    </content>
    <published>2008-06-14T08:46:32Z</published>
  </entry>

</feed
