tag:blogger.com,1999:blog-87231966418101221522024-02-19T02:36:03.144-08:00minuteproject blogAnonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.comBlogger52125tag:blogger.com,1999:blog-8723196641810122152.post-963515613593450992015-06-18T07:11:00.000-07:002015-06-29T06:19:29.719-07:00Openxava 5.3 - minuteproject 0.9.3 - ehcache quick fixMinuteproject 0.9.4- is not compatible with Openxava 5.3 regarding hibernate - ehcache integration.<br />
<br />
Openxava hibernate dependency has been upgraded.<br />
Hibernate now requires the property <b>hibernate.cache.region.factory_class</b> instead of <b>hibernate.cache.provider_class</b><br />
In the case of ehcache cache provider then the value is <b>org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory</b><br />
<br />
This situation prevents OX generated App to start.<br />
<br />
<h3>
Patch 1</h3>
Download Minuteproject 0.9.5 to disable minuteproject 4 openxava ehcache wiring.<br />
Add this property<br />
<br />
<pre class="xml" name="code">< property name="openxava-disable-sdd" value="true" /></pre>
<br />
<br />
<h3>
Patch 2</h3>
So the fix to apply in the generated code is to patch the generated persistence.xml with <br />
<br />
<pre class="xml" name="code">< property name="hibernate.cache.region.factory_class"
value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory" /></pre>
<br />
<br />
Meanwhile it is not enough since now hibernate core do not bundle the cache package.<br />
The package is now in the archive hibernate-ehcache.xxx.jar<br />
<br />
<h3>
Alternative</h3>
<br />
Disable the openxava ehcache hibernate config by removing the hibernate properties related to cache in persistence.xml<br />
<br />
<h3>
Follow-up</h3>
In next release minuteproject will come with the property to disable openxava-hibernate-cache.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com3tag:blogger.com,1999:blog-8723196641810122152.post-72654301771635662882014-07-17T14:38:00.001-07:002014-07-17T14:38:11.557-07:00review Building an App UI with PrimeFacesA <a href="http://bit.ly/1pZgap8">packt video</a> on how-to develop Primefaces apps has been released.<br />
<br />
I had the opportunity to make a little review. Here are my main points.<br />
<br />
It is quite an interesting set of video, that guide you step by step through the build of a Primefaces over MongoDB web app, spring gluing the component for smooth integration.<br />
It is worth following, since you can quickly cover and being introduce to couple of market-trendy technologies. <br />
The videos are developers oriented, via the use of NetBeans to fasten your primefaces component development. JSF beginner to intermediate definitely should have a lot at them.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-42825478747099770442014-07-03T10:21:00.001-07:002014-07-03T10:21:24.446-07:00Packt's 10-year anniversary<span style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;"><span style="font-family: Calibri, sans-serif;"><span style="font-size: small;"><i><b><span style="background-color: #f5f8fa; background-position: initial initial; background-repeat: initial initial;">Join in the celebrations of </span></b></i></span></span></span><span style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;"><span style="font-family: Calibri, sans-serif;"><span style="font-size: small;"><i><b><span style="background-color: #f5f8fa; background-position: initial initial; background-repeat: initial initial;">Packt's</span></b></i></span></span></span><span style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;"><span style="font-family: Calibri, sans-serif;"><span style="font-size: small;"><i><b><span style="background-color: #f5f8fa; background-position: initial initial; background-repeat: initial initial;"> 10-year anniversary! All eBooks & videos are available for just $10! Visit </span></b></i></span></span></span><span style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;"><span style="text-decoration: none;"><span style="font-family: Calibri, sans-serif;"><span style="font-size: small;"><i><b><span style="background-color: #f5f8fa; background-position: initial initial; background-repeat: initial initial;"><a href="http://t.co/Ul6KtHgTFw" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;" target="_blank">http://bit.ly/1q8vtgN</a></span></b></i></span></span></span></span><br />
<span style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;"><span style="text-decoration: none;"><span style="font-family: Calibri, sans-serif;"><span style="font-size: small;"><i><b><br /></b></i></span></span></span></span>
<span style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 13px; line-height: 18.141733169555664px;"><span style="text-decoration: none;"><span style="font-family: Calibri, sans-serif;"><span style="font-size: small;"><i><b><br /></b></i></span></span></span></span>Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-65994558596765693962014-05-06T01:37:00.000-07:002014-05-06T01:52:50.160-07:00Packt celebrates International Day Against DRM, May 6th 2014<div style="text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUEOidus3pGCGf9zoqN4k7Ip5Y5JzCwYU_JFBdmm_MkwT5wd3MNisF7jFMEiIjzFCrNLETHoh2R786R35uZim6GFqeCSJjP8dHt6wNKWuE1u-ozVY5e4dG9QfsyoWgBtFs7P4yxpsZdUo/s1600/dayagainstdrm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUEOidus3pGCGf9zoqN4k7Ip5Y5JzCwYU_JFBdmm_MkwT5wd3MNisF7jFMEiIjzFCrNLETHoh2R786R35uZim6GFqeCSJjP8dHt6wNKWuE1u-ozVY5e4dG9QfsyoWgBtFs7P4yxpsZdUo/s1600/dayagainstdrm.png" height="243" width="640" /></a></div>
<br />
<br />
According to the definition of DRM on Wikipedia, Digital Rights Management (DRM) is a class of technologies that are used by hardware manufacturers, publishers, copyright holders, and individuals with the intent to control the use of digital content and devices after sale.<br />
<br />
However, Packt Publishing firmly believes that you should be able to read and interact with your content when you want, where you want, and how you want – to that end they have been advocates of DRM-free content since their very first eBook was published back in 2004.<br />
<br />
To show their continuing support for <a href="https://www.defectivebydesign.org/">Day Against DRM</a>, Packt Publishing is offering all its DRM-free content at $10 for 24 hours only on May 6th – that’s all 2000+ eBooks and Videos. Check it out at: <a href="http://bit.ly/1q6bpha">http://bit.ly/1q6bpha</a>. <br />
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<a href="https://www.blogger.com/null" name="_GoBack"></a></div>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:AllowPNG/>
<o:TargetScreenSize>800x600</o:TargetScreenSize>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-GB</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-bidi-font-family:"Times New Roman";}
</style>
<![endif]--><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUEOidus3pGCGf9zoqN4k7Ip5Y5JzCwYU_JFBdmm_MkwT5wd3MNisF7jFMEiIjzFCrNLETHoh2R786R35uZim6GFqeCSJjP8dHt6wNKWuE1u-ozVY5e4dG9QfsyoWgBtFs7P4yxpsZdUo/s1600/dayagainstdrm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-45627425982091221702014-04-22T13:25:00.000-07:002014-04-22T13:25:24.449-07:00Primefaces extension in minuteproject<a href="http://primefaces-extensions.github.io/">Primefaces extension</a> well-detailed in <a href="http://www.packtpub.com/learning-primefaces-extensions-development/book">packt book</a> offer to primefaces users interesting add-ons over the primefaces framework :<br />
<br />
<ul>
<li>reporting facilities</li>
<li>smart input components</li>
<li>layout and screen blocking components</li>
<li>time-tracking and scheduling components</li>
</ul>
<div>
It complements seamlessly the primefaces ecosystem - the integration with maven can be done alongside primefaces dependency.</div>
<div>
<br /></div>
<div>
Primefaces extension book guides you thru a those component providing both API explanations (JSF and beans) as well as source code examples.</div>
<div>
<br /></div>
<div>
Regarding minuteproject 4 primefaces, integration of reporting elements and validation is a feature to add in next releases.</div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-63280075685163311692014-03-20T13:06:00.001-07:002014-03-20T13:06:11.790-07:00packt 2000 titles<h2>
Packt promo!</h2>
<div>
<b><br /></b></div>
<b>Celebrate 2000 Titles with Packt with the BUY ONE, GET ONE FREE offer! </b><br />
<b><br /></b>
<b>Check it out at <a href="http://bit.ly/1j26nPN!">http://bit.ly/1j26nPN!</a> #Packt2k</b><br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-56636466421575895702014-01-06T13:12:00.001-08:002014-01-06T13:29:11.352-08:00how-to cloudbees minuteproject 4 openxavaMinuteproject releases a demo Openxava application to be hosted on cloudbees at <a href="http://petshopox.minuteproject.cloudbees.net/">http://petshopox.minuteproject.cloudbees.net/</a><br />
<br />
Following those steps, you can recreate an Openxava application with minuteproject and host it on cloudbees.<br />
<b>All those steps are IDE-free</b> (i.e. productivity oriented) all is done by command line!<br />
This is a requirement for automation, since it is very easy to integrate with a CI tool such as Jenkins.<br />
Meanwhile the code is compatible with Eclipse (for java), Mysql Workbench (for DB design + release) and Cloudbees website for manual release.<br />
<h2>
Principles</h2>
Generate an openxava application with minuteproject base on an DB structure.<br />
The database use here is petshop; for the generation the database can be local or already hosted on cloudbees PaaS. At running the database is the one of the cloudbees PaaS.<br />
<br />
The generated Openxava compliant artifacts are built into an Openxava application.<br />
The application is to be deployed on a tomcat server.<br />
The application relies on a JNDI Datasource on the tomcat server.<br />
<br />
After setting the database on cloudbees and the connection pool cloudbees tomcat server, the application can be deployed.<br />
<h2>
Ingredients</h2>
<h3>
Infrastructure</h3>
JDK 1.6+<br />
Minuteproject last version<br />
Openxava 4.9<br />
Mysql DB<br />
Tomcat<br />
Cloudbees<br />
<br />
<ul>
<li>sdk</li>
<li>account</li>
</ul>
<br />
<h2>
Set up Cloudbees</h2>
<h3>
Database</h3>
Create a mysql db schema on cloudbees<br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;">bees db:create petshopDB</pre>
<persistence-unit name="petshop"><br />Retrieve the DB info (connection info: server, port, user...) all you need to create you connection pool</persistence-unit><br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;">bees app:info -db petshopDB </pre>
<persistence-unit name="petshop"><br /></persistence-unit>
<br />
<h3>
<persistence-unit name="petshop">Application</persistence-unit></h3>
<persistence-unit name="petshop">Create application</persistence-unit><br />
<persistence-unit name="petshop"></persistence-unit><br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;">bees app:create -petshopox</pre>
<persistence-unit name="petshop"> </persistence-unit><br />
<h3>
<persistence-unit name="petshop">Datasource</persistence-unit></h3>
<div>
<persistence-unit name="petshop">This is use get the alias use in the persistence.xml datasource (</persistence-unit>java:comp/env/jdbc/<b>petshopDS</b>)</div>
<persistence-unit name="petshop"></persistence-unit><br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;">bees app:bind -db petshopDB -a petshopox -as <b>petshopDS</b> </pre>
<persistence-unit name="petshop"><br /></persistence-unit>
<br />
<h2>
Database setup</h2>
<persistence-unit name="petshop">Run you database script from the information receive via $bees db:info -db petshopDB</persistence-unit><br />
<persistence-unit name="petshop"><br /></persistence-unit>
<persistence-unit name="petshop">Sample</persistence-unit><br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;"><span style="font-family: Times; font-size: small; line-height: normal; white-space: normal;">mysql --host=ec2-50-19-213-178.compute-1.amazonaws.com --user=xxxx --password=xxxx --port=3306 xxx < petshop.sql</span></pre>
petshop-mysql.sql can be found in MP_HOME/sample/schema/<br />
<h2>
Generation</h2>
Full details at <a href="http://minuteproject.wikispaces.com/OpenXava">http://minuteproject.wikispaces.com/OpenXava</a><br />
The generation is done by Minuteproject.<br />
Minuteproject generation by command line comes by passing a configuration file name to model-generation.<br />
<br />
Sample<br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;"><span style="font-family: Times; font-size: small; line-height: normal; white-space: normal;">model-generation petshop.xml</span></pre>
<br />
Sample petshop.xml configuration<br />
<pre class="xml" name="code"><!DOCTYPE root>
<generator-config xmlns="http://minuteproject.sf.net/xsd/mp-config"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="mp-config.xsd">
<!-- adapted for cloudbees petshop model -->
<configuration>
<conventions>
<target-convention type="enable-updatable-code-feature" />
</conventions>
<model name="petshop" version="1.0" package-root="net.sf.mp.demo">
<data-model>
<driver name="mysql" version="5.1.16" groupId="mysql"
artifactId="mysql-connector-java"></driver>
<dataSource>
<driverClassName>org.gjt.mm.mysql.Driver</driverClassName>
<url>jdbc:mysql://localhost:3306/petshop</url>
<username>root</username>
<password>mysql</password>
</dataSource>
<primaryKeyPolicy oneGlobal="false">
<primaryKeyPolicyPattern name="autoincrementPattern"></primaryKeyPolicyPattern>
</primaryKeyPolicy>
</data-model>
<business-model>
<generation-condition>
<condition type="exclude" startsWith="DUAL"></condition>
<condition type="exclude" startsWith="ID_GEN"></condition>
<condition type="exclude" startsWith="SEQUENCE"></condition>
</generation-condition>
<business-package default="pet">
<condition type="package" startsWith="PRODUCT" result="product"></condition>
<condition type="package" startsWith="ITEM" result="product"></condition>
</business-package>
<enrichment>
<conventions>
<entity-naming-convention type="apply-strip-table-name-prefix"
pattern-to-strip="SYS,FIN" />
<reference-naming-convention
type="apply-referenced-alias-when-no-ambiguity" is-to-plurialize="true"></reference-naming-convention>
</conventions>
<package name="product">
<entity-group entities="PRODUCT"></entity-group>
<entity-group entities="ITEM"></entity-group>
</package>
<entity name="PRODUCT" alias="MY_GOOD_PRODUCT">
</entity>
<entity name="ITEM" alias="MY_GOOD_ITEM" comment="my item table">
<field name="PRODUCTID" alias="THIS_IS_MY_PRODUCT" comment="my product field reference"></field>
</entity>
<entity name="CATEGORY" content-type="reference-data">
<field name="DESCRIPTION" ordering="asc" label="my description"
is-searchable="true"></field>
<field name="NAME" ordering="asc"></field>
</entity>
<entity name="TAG" content-type="reference-data">
<field name="TAG" ordering="asc">
<semantic-reference>
<sql-path path="NAME" />
</semantic-reference>
</field>
</entity>
</enrichment>
</business-model>
<statement-model>
<enrichment>
<conventions>
<sdd-dummy-primarykey-convention add="true" />
</conventions>
</enrichment>
<queries>
<query name="get address abstract" id="dashAddress" type="dashboard"
category="pie-chart">
<query-body> <!-- dimensions column first -->
<value>
<![CDATA[select city, count(*) as nb from address group by city order by count(*) desc limit ?]]>
</value>
</query-body>
<query-params>
<query-param name="top city" is-mandatory="false"
type="INT" sample="37" default="10"></query-param>
</query-params>
</query>
<query name="get address summary" id="dashCity" type="dashboard"
category="bar-chart">
<query-body> <!-- dimensions column first -->
<value>
<![CDATA[select city, count(*) as nb, count(*) as nb2 from address group by city order by count(*) desc]]>
</value>
</query-body>
</query>
<query name="get addresses by criteria" id="c">
<query-body>
<value>
<![CDATA[select * from address where lcase(city) like ?]]>
</value>
</query-body>
<query-params>
<query-param name="city" type="STRING" sample="'S'"
convert="lowercase,append%" default="%">
</query-param>
</query-params>
</query>
</queries>
</statement-model>
</model>
<targets catalog-entry="OpenXava" >
<property name="environment" value="remote"></property>
<property name="cloud-platform" value="cloudbees"></property>
<property name="embed-driver" value="true"></property>
</targets>
</configuration>
</generator-config>
</pre>
<br />
Appart from the 'classical' enrichment facilities, the interesting point are the properties under the targets node:<br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;"><span style="background-color: transparent;">name="environment" value="remote"</span> </pre>
Implies to use a connection pool (for persistence.xml)<br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;"><span style="background-color: transparent;">name="cloud-platform" value="cloudbees"</span> </pre>
Performs additional build facilities for Openxava on cloudbees<br />
The OX war has to hold jta.jar, ejb.jar, mysql driver jar.<br />
<ul>
<li>jta.jar and ejb.jar are embedded in tomcat/lib on the OX delivery.</li>
</ul>
<div>
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;"><span style="background-color: transparent;">name="embed-driver" value="true"</span> </pre>
</div>
<br />
<li>mysql driver jar is shipped on MP delivery</li>
<br />
<div>
<b>Remark:</b> the last 2 options are available on Minuteproject 0.8.6</div>
<h2>
Build</h2>
On the generated directory<br />
set/export OX_HOME<br />
set/export MP_HOME<br />
Run<br />
<br />
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;">build-petshop.cmd/sh</pre>
<br />
The application <b>petshop.war</b> goes into OX_HOME/workspace/petshop.dist<br />
<br />
The application is ready to be deployed on Cloudbees.<br />
<h2>
Deploy</h2>
<pre style="background-color: #f3f6f9; border: 1px solid rgb(0, 51, 67); font-size: 13px; line-height: 18.1875px; padding: 10px;"><span style="font-family: Times; font-size: small; line-height: normal; white-space: normal;">bees app:deploy -a petshopox -t tomcat7 -Rjava_version=1.7 <b>petshop.war</b></span></pre>
<br />
petshopox is the name of the application on cloudbees<br />
<br />
<h2>
Enjoy</h2>
<div>
<a href="http://petshopox.minuteproject.cloudbees.net/">http://petshopox.minuteproject.cloudbees.net/</a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com1tag:blogger.com,1999:blog-8723196641810122152.post-9003194323501535072013-11-18T05:41:00.004-08:002014-01-06T13:26:32.049-08:00Minuteproject with Ant HOW-TO<h2>
<description>This is a sample ant integration</description></h2>
This page is a HOW-TO integrate Minuteproject with Ant build tool.<br />
<br />
<h2>
Set up</h2>
<h2>
</h2>
<h3>
Minuteproject distribution </h3>
Download Minuteproject zip and install in MP_HOME directory.<br />
<br />
<h3>
Environment variable</h3>
$set MP_HOME=mp-home.directory<br />
<br />
<h3>
Minuteproject config</h3>
Have you minuteproject configuration in <mp_home>MP_HOME/mywork/config or <mp_home></mp_home></mp_home><mp_home><mp_home>MP_HOME/demo/config.</mp_home></mp_home><br />
<b>Remark:</b><br />
<mp_home>MP_HOME/demo/config is shipped with many configuration working with HSQLDB database located on the file system. </mp_home><br />
For this article we will use mp-config-JPA2.xml<br />
<br />
<br />
<h2>
Ant Script<br />
<!-- ===================================================================== --></h2>
Sample ant script to place in MP_HOME<mp_home>/mywork/config or <mp_home></mp_home></mp_home><mp_home><mp_home>MP_HOME/demo/config.</mp_home></mp_home><br />
The script has an ant macro that calls java command on Minuteproject kernel main class passing the minuteproject config.<br />
<br />
<br />
<pre class="xml" name="code"><?xml version="1.0" encoding="UTF-8"?>
<project default="generation-sample" basedir="." name="MinuteProject - ANT integration">
<description>This is a sample ant integration</description>
<!-- ===================================================================== -->
<!-- properties definitions -->
<!-- ===================================================================== -->
<property environment="env"/>
<property name="minuteproject.home" value="${env.MP_HOME}" />
<!-- ===================================================================== -->
<!-- classpath definitions -->
<!-- ===================================================================== -->
<!--
this is used to get the minuteproject release, dependencies and config
-->
<path id="mp.library.path">
<pathelement location="${env.MP_HOME}/demo/config" />
<fileset dir="${env.MP_HOME}/application">
<include name="**/*.jar" />
</fileset>
</path>
<!-- ===================================================================== -->
<!-- macro definitions -->
<!-- ===================================================================== -->
<macrodef name="macro_generate">
<attribute name="config" />
<sequential>
<echo message="Generate for config @{config}" />
<java fork="true" classname="net.sf.minuteProject.application.ModelViewGenerator">
<classpath>
<path refid="mp.library.path" />
</classpath>
<arg line="@{config}" />
</java>
</sequential>
</macrodef>
<!-- ===================================================================== -->
<!-- ant generation tasks definitions -->
<!-- ===================================================================== -->
<target name="generation-sample">
<!--
check that your configuration file mp-config-xxx are place in
${env.MP_HOME}/demo/config
The ouput of the generation with go to the outputdir specified in the configuration
If none it goes in ${env.MP_HOME}/demo/output
Remark:
this sample works with Minuteproject distribution.
The configuration relies on a hsqldb database located on the file system.
For advanced test check that the database is up and running at the url specified
in the url node of the configuration
-->
<macro_generate config="mp-config-JPA2.xml" />
</target>
</project> </pre>
<br />
The result will go to MP_HOME/demo/output<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-74119240242279463432013-10-16T12:27:00.000-07:002013-10-16T12:40:06.516-07:00Packt Columbus action days<b><br /></b>
<b>For hungry minds that look to satisfy their IT knowledge, there are <a href="http://bit.ly/1bqvB29">Packt Columbus Days </a> </b><br />
<b><br /></b>
<b>The exclusive 50% discount code COL50 will be active on all eBooks and Videos until Thursday October 17th</b><br />
<b><br /></b>
Couple of books that I recommend<br />
<br />
<ul>
<li><a href="http://www.packtpub.com/primefaces-starter/book">Primefaces starter</a></li>
<li><a href="http://www.packtpub.com/angularjs-web-application-development/book">AngularJS</a></li>
<li><a href="http://www.packtpub.com/learning-kendo-ui-web-development/book?tag=vm/learningkendouiweb-abr1/0913">KendoUI</a></li>
</ul>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-67062192713657231212013-10-03T05:14:00.001-07:002013-10-03T05:19:20.931-07:00minuteproject 4 propel motivations<a href="http://propelorm.org/">Propel </a>is based on some forward engineering technics that creates your Php Object Domain and ORM classes for your based on a file describing your model.<br />
<br />
Propel ORM also offers reverse-engineering facilities to generate this input file.<br />
Minuteproject meanwhile creates a track for propel. Why? What are the motivations?<br />
<br />
<a href="http://minuteproject.wikispaces.com/Propel">Minuteproject 4 propel</a> track will be delivered in version 0.8.5.<br />
<br />
<h2>
Polyglot generator</h2>
<div>
<br /></div>
Minuteproject was essentially generating java framework oriented artifact but the php tracks with propel and soon <a href="http://www.doctrine-project.org/projects/orm.html">doctrine </a>offers another perspective.<br />
<b>Whatever your language and your framework, minuteproject can offer you reverse-engineering facilities.</b><br />
<b><br /></b>
<br />
<h3>
Get Php knowledge</h3>
<div>
Testing with php was quite easy and interesting.<br />
<br /></div>
<h2>
Propel specifics</h2>
<div>
As mentionned previously Propel offers reverse-engineering solution.<br />
<br /></div>
<h3>
Interesting points</h3>
<div>
Their solutions is interesting because for each database Propel support the tool issue database query-specific-data-dictionnary lookup. It is the same philosophy that <a href="http://www.jooq.org/">JOOQ </a>framework with JOOQ meta is following.</div>
<div>
<br /></div>
<h3>
Minuteproject 4 propel advantages</h3>
<div>
Propel reverse-engineering solution propose raw reverse-engineering, while minuteproject offers you the possibility to make a reverse-analysis before.</div>
<div>
<br /></div>
<h4>
Enrichment</h4>
<div>
All the enrichment facilities are available for Propel track. Which means that you can have smart reverse-engineering aspects:</div>
<div>
<ul>
<li>Alias for tables (DB table naming convention can differ from you Php classes conventions)</li>
<ul>
<li>In schema.xml 'name' is filled by DB name and phpName by your given name.</li>
</ul>
<li>Alias for columns same principle as above</li>
<li>Apply alias (column or view) globally by conventions or individually</li>
<ul>
<li>Ex tables starting with T_ such as T_USER can get User in php.</li>
<li>Ex field ending with FK (ex PRODUCT_FK) have the variable $product.</li>
</ul>
<li>Granularity select only tables or views you need</li>
<ul>
<li>No need to reverse-engineer all the entities</li>
</ul>
</ul>
<div>
<br /></div>
<h4>
Multiple artifacts</h4>
<div>
Minuteproject 4 propel generate other artifacts such as</div>
<div>
<ul>
<li>runtime-conf.xml</li>
<li>build.properties</li>
<li>command line scripts</li>
<li>setup.php</li>
</ul>
<div>
<br /></div>
</div>
<h4>
Updatable code</h4>
</div>
<div>
Generator tools are often see as generate once and no more...</div>
<div>
<b><u>It is not the case of minuteproject!</u></b></div>
<div>
<b><u><br /></u></b></div>
<div>
<b>The code that you generate is updatable! </b></div>
<div>
<b>If you do not like it change it! </b></div>
<div>
<b>If it misses something add it!</b></div>
<div>
<br /></div>
<div>
Next time you generate <b><u>YOUR ALTERATIONS WILL BE KEPT!</u></b><br />
<b><u><br /></u></b></div>
<div>
<br /></div>
<div>
This is call <a href="http://minuteproject.wikispaces.com/Updatable_Generated_Code">updatable code feature</a>. And all the minuteproject 4 propel templates have this feature!<br />
<br /></div>
<div>
<br /></div>
<div>
Which means that if you do not like what you have in the schema.xml node you can change them. If your model changes add couples of db object (table/view), change cardinality between objects, the next time you generate, new object and relationship will be added BUT your modification (ex table phpName) will be kept!</div>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-37555497117713289702013-09-20T03:02:00.000-07:002013-09-20T03:03:36.283-07:00nested SDDSDD (<a href="http://minuteproject.blogspot.be/2012/05/statement-driven-development.html">Statement driven development</a>) is a powerfull productivity weapon.<br />
<br />
Until now minuteproject SDD configuration was limited to a single statement.<br />
This is enough when you want to query to display a list or graph or even call a store proc.<br />
<br />
But often your business need is make of nested action. The output of some query serves as the input for other actions.<br />
This is this capacity to handle multiple successive actions based on statement that is called <b>nested SDD</b>.<br />
<h2>
</h2>
<h2>
Something concrete</h2>
<b><br /></b>
<b>Imagine the following scenario</b><br />
I have DB connections that are stucked and I want to kill them. How I want to do that is via a web application.<br />
And I want to have this application without writing a single LOC and within 1 minute...<br />
Here is the kind of productivity challenge Minuteproject is bound to solve with nested SDD.<br />
<h3>
</h3>
<h3>
Decomposition of the scenario</h3>
<h4>
</h4>
<h4>
Infrastructure</h4>
<div>
Oracle DB.</div>
<h4>
</h4>
<h4>
Queries</h4>
<div>
I have DB connections that are stucked and I want to kill them.</div>
http://appsdbanew.wordpress.com/2007/11/05/how-to-find-blocking-session-and-kill-the-session-from-database/
<br />
<div>
It can be reduced in writing 2 queries:</div>
<div>
<br /></div>
<div>
Retrieve the connections (and stucked ones)</div>
<div>
<pre class="xml" name="code">select process,sid, serial#, blocking_session from v$session where blocking_session is not null
</pre>
<br /></div>
<div>
Kill collections</div>
<div>
<pre class="xml" name="code">alter system kill session '#SID,#SERIAL' immediate</pre>
<h4>
</h4>
<h4>
Nesting</h4>
The output of the first query (sid and serial#) serves as input of the second.</div>
<h2>
<br /></h2>
<h2>
Minuteproject</h2>
<div>
Those two queries show be enough to get a application in Primefaces for quite handy for the help desked.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-77772615414820655452013-09-05T01:22:00.001-07:002013-10-03T04:29:28.062-07:00piping generators with minuteprojectThere are couple of really interesting generators working based on some input file and execution principles.<br />
It is easy to understand and tooling-oriented. <b>Input 2 Tool gives Result Code</b>.<br />
<br />
<u>Minuteproject principle is the same</u><br />
<u><br /></u>
When working with generators dealing with RDBMS persistence (Rev-Eng or Fwd-Eng), minuteproject can generate initial input for those generators.<br />
<br />
<b>This strategy is called generator piping.</b><br />
<br />
Each generator has its own particularities and kind of DSL.<br />
The goal is then to degrade as less as possible the 'other-generator' input in order to keep the added value as high as possible.<br />
<br />
<br />
<b>Minuteproject is particularily interested by the following OS generators:</b><br />
<ul>
<li>Liferay Service Builder</li>
<li>JOOQ</li>
<li>Benerator</li>
<li>Roo (input script instructions)</li>
<li>RoR (input script instructions)</li>
<li><a href="http://propelorm.org/">Propel</a></li>
</ul>
<div>
<br /></div>
<div>
Tooling to deal with other generators available in minuteproject</div>
<div>
<ul>
<li>Plugin</li>
<ul>
<li>write a mp plugin (java bean match target technology specifics)</li>
<li>this plugin is available at template level to query target-generator-centric info.</li>
</ul>
<li>Parametrization</li>
<ul>
<li>offer track customization</li>
<li>a classical parameter could be the version of the target generator</li>
</ul>
<li>Updatable code feature</li>
<ul>
<li>tune your output without losing your altertions over consecutive generations</li>
</ul>
<li>Enrichment</li>
<ul>
<li>Conventions</li>
<ul>
<li>Some configuration can be tedious because quite verbose, fortunately minuteproject can pin common caracteristics via conventions</li>
</ul>
<li>Aliasing</li>
<ul>
<li>provides indirection level to have DB names look like DB names and Java name matching Java conventions</li>
</ul>
</ul>
</ul>
<div>
The main difficulty is to know what is the input for field type (is it an SQL, UML, Java, own DSL type) that has to be treated at plugin level.</div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-49126988103170692602013-08-28T13:42:00.001-07:002013-08-28T13:49:07.641-07:00performance magnitude ft. sql java xmlThis page is <b>NOT</b> a benchmark but the performance feeling that I experienced working with those 3 technologies.<br />
<br />
<h3>
<div style="text-align: center;">
While processing data </div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
SQL runs 100+ faster than JAVA which runs 100+ faster than XML</div>
</h3>
<br />
Is this impression true?<br />
Do you have some magnitude order?<br />
<br />
Do feed-back your impressions and results!<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com1tag:blogger.com,1999:blog-8723196641810122152.post-45149658518059237862013-08-28T08:34:00.002-07:002013-08-28T23:43:36.166-07:00working with updatable code in mp4oxMinuteproject promotes updatable code as one integration technic.<br />
What it means is that you can change the generated code <b><u>AND</u> your modifications will be kept if you generate again</b> (ex when your model change).<br />
<br />
So this as the interesting effect, that minuteproject is not only for bootstrap time (the early age of your project) <b>BUT throughout the lifecycle of your project</b>.<br />
<br />
Things change: code and model but it's OK you can still keep the power of reverse-engineering without losing your code.<br />
<br />
<h2>
Concretely, what does it mean when working with Minuteproject 4 Openxava?</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzUIodkNrc-oWG3j5cuBZCJCl-hC4Tg6EjpO3wG_kA10sNMViV6u0ChGtOjf09dREE1ogPvT1wJquktn5sBxa7tL_xXq_ONAt9X7zTWLTRnOhxylvRDdpyy0fmrX5C4VO5ZL273xcdEyE/s1600/MP4OX-updatable-code.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="359" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzUIodkNrc-oWG3j5cuBZCJCl-hC4Tg6EjpO3wG_kA10sNMViV6u0ChGtOjf09dREE1ogPvT1wJquktn5sBxa7tL_xXq_ONAt9X7zTWLTRnOhxylvRDdpyy0fmrX5C4VO5ZL273xcdEyE/s640/MP4OX-updatable-code.jpg" width="640" /></a></div>
<br />
<h3>
The early age of your project - bootstrap time</h3>
<h4>
Model</h4>
<div>
You have a idea, model it! the DB way (do not lose the power of your RDBMS)!</div>
<div>
<a href="http://minuteproject.blogspot.be/2013/08/minuteproject-facets-for-analysts.html">You can use the technics</a></div>
<div>
<ul>
<li>smart reverse-engineering (your model value more that just storing information, hunt the hidden concepts, enrich it!)</li>
<li>virtualization (use views as alternate models or graphs of views)</li>
<li>SDD (jdbc statements are sometimes enough)</li>
<li>Transient definition (DTO are welcome back for any purpose UC linked or not or partially to some persisted entities)</li>
</ul>
<h4>
Generation</h4>
</div>
<div>
By default when you pick-up the target with catalog-entry="OpenXava" the resulting code will go to ../output/<yourmodelname>/OpenXava</yourmodelname></div>
<div>
<br /></div>
<h4>
Create your OpenXava project and test your idea</h4>
<div>
If you open a prompt on your generated code directory and set/export your 2 environment variables MP_HOME and OX_HOME then you can call build-<yourmodelname>.</yourmodelname></div>
<div>
This will create an OX project; build it, deploy it and open your browser to a menu to access your model.</div>
<div>
<br /></div>
<div>
This is fine and described to create OX project.</div>
<div>
<br /></div>
<h3>
Maturity age</h3>
<div>
Now your OpenXava project is up and running, you can extend your model, and sometimes you want to alter the generated code</div>
<div>
<br />
<h4>
Enabling updatable code</h4>
Enable your minuteproject to work and merge updated code.<br />
You have to add<br />
<pre class="xml" name="code"><generator-config>
<configuration>
<conventions>
<target-convention type="enable-updatable-code-feature" />
</conventions>
</pre>
<br />
<h4>
Working with updatable code</h4>
</div>
<div>
You can check your OX classes and xml, they contain comments.<br />
Some comments are for extension MP-MANAGED-ADDED-AREA-BEGINNING<br />
Some comments are for modification MP-MANAGED-UPDATABLE-BEGINNING-DISABLE to change to MP-MANAGED-UPDATABLE-BEGINNING-ENABLE when modifying the area.<br />
If your artifact (java class, xml file) is final and you do not want to generate it again add MP-MANAGED-STOP-GENERATING<br />
<br />
3 possibilities to alter your code are discribed <a href="http://minuteproject.wikispaces.com/Updatable_Generated_Code">here</a></div>
<div>
<br />
<br /></div>
<div>
Now you just have point Minuteproject 4 Openxava generation towards you Openxava workspace project.</div>
<div>
<br /></div>
<div>
Add the outputdir-root of the node targets and set the directory of your Openxava workspace project</div>
<div>
<br /></div>
<div>
And that's it!<br />
<br />
<h2>
Conclusion</h2>
</div>
<div>
This feature allows you to goes for continuous generation and continuous modification.<br />
Both approach are not longer exclusive <b>BUT complementary</b>.<br />
You got a development methodology to use the power of both approach:<br />
<br />
<ul>
<li>QA, defaulting, enrichment, <a href="http://minuteproject.blogspot.be/2013/08/minuteproject-facets-for-analysts.html">MP productivity weapons</a></li>
<li>IDE to dev, tune, debug.</li>
</ul>
</div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-72204212087500661982013-08-27T02:36:00.001-07:002013-08-28T01:48:15.801-07:00Transient definition as a productivity weapon 4 Openxava<br />
<br />
<h4>
<span style="color: red;">Under construction (need 0.8.5 for generation) but can be used in the meantime as a OX tutorial to work with DTO</span></h4>
<br />
<h2>
Productivity challenge</h2>
Alongside with (1) smart reverse-engineering, (2) virtualization, (3) Statement-driven-development, <b>Transient definition</b> is a <a href="http://minuteproject.blogspot.be/2013/08/minuteproject-facets-for-analysts.html">productivity tool</a> and technic that fasten your development.<br />
<br />
This article presents you transient definition and how it will help developing ad-hoc UCs in the case of Openxava. Ad-hoc means that there is no direct binding necessary between your screen info and your database entities.<br />
<br />
<br />
<h2>
Transient definition</h2>
Your model persistence is not enough to define all your data or you want to model the data differently than in the current model perspective. In short you have a UC that is not purely data centric?<br />
<br />
<br />
<h2>
Mission statement</h2>
<h3>
UC general statement</h3>
You know the Input of a UC and a function to be performed.<br />
The input does not have to match to field or entities in your DB. It may but it is not a requirement.<br />
You want:<br />
<ul>
<li>Input screen</li>
<li>Validation/affectation UC</li>
<li>Stub to actions</li>
<li>Partial or empty implementation of the function</li>
<li>to be able to change your requirement and your implementation without losing your modifications </li>
</ul>
<br />
<h3>
Concrete UC</h3>
<h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfjWOomkTPLA0iGHMdGBP_CcadNnKYE_OCpErQ19-OdmkGiM2fG2AOAKpduJ6P77uiIUCtc_aoBMcXhRMQ_cTjfN4torDlLbx369xP5WQsHHJKR53z5Ge_E7ort3lPvSoZoecLcsQnH34/s1600/sdd-porphyry-snapshot.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfjWOomkTPLA0iGHMdGBP_CcadNnKYE_OCpErQ19-OdmkGiM2fG2AOAKpduJ6P77uiIUCtc_aoBMcXhRMQ_cTjfN4torDlLbx369xP5WQsHHJKR53z5Ge_E7ort3lPvSoZoecLcsQnH34/s640/sdd-porphyry-snapshot.png" width="640" /></a></h2>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h4>
Model description</h4>
You have a model that store Release information of an application.<br />
The release is linked to an application and environment.<br />
It has a releaser (the person issuing the release) and a validator (validating the release).<br />
Release status can be ACTIVE, DONE, REJECTED.<br />
A creation date is automatically created when inserting a release.<br />
<br />
<h4>
UC description</h4>
<b>Provide releaser user access </b>to create a release<br />
He can:<br />
<br />
<ul>
<li>enter name, notes, time to start, time to end the release.</li>
<li>pick-up application and environment, releaser (a bit redundant it should be granted implicitly but it need a security wrapping to guess the id of the releaser - which is not part of this demo)</li>
<li>enter notification email (<u>that is not persisted</u>)</li>
</ul>
<br />
<br />
By clicking a release button<br />
<br />
<ul>
<li>Status will be set to ACTIVE</li>
<li>Creation date populated by current date</li>
<li>Store persistence data.</li>
</ul>
<div>
Extend</div>
<div>
<ul>
<li>input field notify available for any manipulation the user want (send mail for example) </li>
</ul>
</div>
<br />
<br />
<b>Provide validator user access</b> to view all the releases, select one fill extra info and validate or reject it.<br />
He can view the release<br />
<br />
<br />
<h2>
Openxava Code</h2>
<h3>
Create Release
</h3>
<pre class="java" name="code">@Entity (name="CreateRelease")
@Table (name="bus_release")
@Views({
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @view-base-bus_release@
@View(
name="base",
members=
""
+ "name ; "
+ "notes ; "
+ "timeToStart ; "
+ "timeToEnd ; "
+ "application ; "
+ "environment ; "
+ "releaser ; "
+ "notify ; "
)
)
})
public class CreateRelease {
@Hidden @Id @Column(name="ID" )
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Column(name="NAME", length=45, nullable=false, unique=false)
@Required
private String name;
@Column(name="NOTES", nullable=true, unique=false)
@Stereotype ("HTML_TEXT")
private String notes;
@Column(name="STATUS", length=45, nullable=true, unique=false)
private String status;
@Column(name="CREATION_DATE", nullable=true, unique=false)
@Temporal(TemporalType.TIMESTAMP)
@ReadOnly(forViews="base,Create,Update,DEFAULT,createReleaseDEFAULT_VIEW")
private java.util.Date creationDate;
@Column(name="TIME_TO_START", nullable=true, unique=false)
@Temporal(TemporalType.TIMESTAMP)
private java.util.Date timeToStart;
@Column(name="TIME_TO_END", nullable=true, unique=false)
@Temporal(TemporalType.TIMESTAMP)
private java.util.Date timeToEnd;
@Transient
private String validationReason;
@Transient
@Required
@Stereotype ("EMAIL")
private String notify;
@ManyToOne (fetch=FetchType.LAZY )
@JoinColumn(name="application_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
private Application application;
@ManyToOne (fetch=FetchType.LAZY )
@JoinColumn(name="environment_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
@DescriptionsList(
descriptionProperties=
"name "
,order=
"displayOrder ASC "
// "name asc // "
)
@NoCreate
@NoModify
private Environment environment;
@ManyToOne (fetch=FetchType.LAZY ) //remove optional=false to aggragate but leads to a side effect when going directly to the entity: required check is not performed=> if no set DB check constraint is raised...
@JoinColumn(name="releaser_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
private User releaser;
...
}
</pre>
Standard OX entity - mapping<br />
Contains transient field, stereotype and validation<br />
<br />
<h3>
Release Action
</h3>
<pre class="java" name="code">public class ReleaseAction extends ViewBaseAction {
public void execute() throws Exception {
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @execute-porphyry@
//super.execute();
//TODO
Messages errors =
MapFacade.validate("CreateRelease", getView().getValues());
if (errors.contains()) throw new ValidationException(errors);
EntityManager em = XPersistence.getManager();
try {
CreateRelease e = new CreateRelease();
if (errors.contains()) throw new ValidationException(errors);
// set init condition
// copy field from form
e.setName((String)getView().getValue("name"));
e.setNotes((String)getView().getValue("notes"));
e.setTimeToStart((Date)getView().getValue("timeToStart"));
e.setTimeToEnd((Date)getView().getValue("timeToEnd"));
e.setNotify((String)getView().getValue("notify"));
// parent
Map applicationMap = (Map)getView().getValue("application");
if (applicationMap!=null) {
Integer applicationId = (Integer)applicationMap.get("id");
if (applicationId != null) {
Application application = new Application();
application.setId(applicationId);
e.setApplication(application);
}
}
Map environmentMap = (Map)getView().getValue("environment");
if (environmentMap!=null) {
Integer environmentId = (Integer)environmentMap.get("id");
if (environmentId != null) {
Environment environment = new Environment();
environment.setId(environmentId);
e.setEnvironment(environment);
}
}
Map releaserMap = (Map)getView().getValue("releaser");
if (releaserMap!=null) {
Integer releaserId = (Integer)releaserMap.get("id");
if (releaserId != null) {
User releaser = new User();
releaser.setId(releaserId);
e.setReleaser(releaser);
}
}
// assign field
e.setStatus(new String("ACTIVE"));
XPersistence.getManager().persist(e);
getView().reset();
resetDescriptionsCache();
} catch (Exception e) {
errors = new Messages();
errors.add(e.getMessage());
throw new ValidationException(errors);
}
//TODO return list
addInfo("call ReleaseAction done!");
//MP-MANAGED-UPDATABLE-ENDING
}
}
</pre>
<br />
<ul>
<li>Extends ViewBaseAction</li>
<li>Performs validation</li>
<li>Retrieves fields and object from getView()</li>
<li>Adds status value to ACTIVE</li>
<li>Stores value via XPersistence API</li>
</ul>
<h3>
Validate release
</h3>
<pre class="java" name="code">@Entity (name="ValidateRelease")
@Table (name="bus_release")
@Views({
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @view-base-bus_release@
@View(
name="base",
members=
""
+ "name ; "
+ "notes ; "
+ "status ; "
+ "creationDate ; "
+ "timeToStart ; "
+ "timeToEnd ; "
+ "application ; "
+ "environment ; "
+ "releaser ; "
+ "validator ; "
+ "validationReason ; "
+ "inform ; "
),
...
})
@Tabs({
@Tab(
properties=
" name "
+", notes "
+", status "
+", creationDate "
+", timeToStart "
+", timeToEnd "
+", environment.name "
+", releaser.identifier "
+", validator.identifier "
)
...
})
public class ValidateRelease {
@Hidden @Id @Column(name="ID" )
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Column(name="NAME", length=45, nullable=false, unique=false)
@Required
@ReadOnly
private String name;
@Column(name="NOTES", nullable=true, unique=false)
@Stereotype ("HTML_TEXT")
@ReadOnly
private String notes;
@Column(name="STATUS", length=45, nullable=true, unique=false)
@ReadOnly
private String status;
@Column(name="CREATION_DATE", nullable=true, unique=false)
@Temporal(TemporalType.TIMESTAMP)
@ReadOnly(forViews="base,Create,Update,DEFAULT,validateReleaseDEFAULT_VIEW")
private java.util.Date creationDate;
@Column(name="TIME_TO_START", nullable=true, unique=false)
@Temporal(TemporalType.TIMESTAMP)
@ReadOnly
private java.util.Date timeToStart;
@Column(name="TIME_TO_END", nullable=true, unique=false)
@Temporal(TemporalType.TIMESTAMP)
@ReadOnly
private java.util.Date timeToEnd;
@Transient
private String validationReason;
@Transient
@Required
@Stereotype ("EMAIL")
private String inform;
@ManyToOne (fetch=FetchType.LAZY )
@JoinColumn(name="application_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
@NoCreate
@NoModify
private Application application;
@ManyToOne (fetch=FetchType.LAZY )
@JoinColumn(name="environment_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
@DescriptionsList(
descriptionProperties=
"name "
,order=
"displayOrder ASC "
// "name asc // "
)
@NoCreate
@NoModify
private Environment environment;
@ManyToOne (fetch=FetchType.LAZY )
@JoinColumn(name="releaser_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
@NoCreate
@NoModify
private User releaser;
@ManyToOne (fetch=FetchType.LAZY )
@JoinColumn(name="validator_id", referencedColumnName = "ID", nullable=true, unique=false )
@ReferenceView ("reference")
private User validator;
}
</pre>
<h3>
Validate Action
</h3>
<pre class="java" name="code">public class ValidateAction extends ViewBaseAction {
public void execute() throws Exception {
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @execute-porphyry@
//super.execute();
//TODO
Messages errors =
MapFacade.validate("ValidateRelease", getView().getValues());
if (errors.contains()) throw new ValidationException(errors);
EntityManager em = XPersistence.getManager();
try {
ValidateRelease e = new ValidateRelease();
e.setId(Integer.valueOf(getView().getValueString("id")));
e = XPersistence.getManager().find(ValidateRelease.class, e.getId());
//check display condition
if (!new String("ACTIVE").equals(e.getStatus()))
errors.add ("Condition statusActive not met!");
if (errors.contains()) throw new ValidationException(errors);
// set init condition
// copy field from form
e.setValidationReason((String)getView().getValue("validationReason"));
e.setInform((String)getView().getValue("inform"));
// parent
Map validatorMap = (Map)getView().getValue("validator");
if (validatorMap!=null) {
Integer validatorId = (Integer)validatorMap.get("id");
if (validatorId != null) {
User validator = new User();
validator.setId(validatorId);
e.setValidator(validator);
}
}
// assign field
e.setStatus(new String("DONE"));
XPersistence.getManager().persist(e);
getView().reset();
resetDescriptionsCache();
} catch (Exception e) {
errors = new Messages();
errors.add(e.getMessage());
throw new ValidationException(errors);
}
//TODO return list
addInfo("call ValidateAction done!");
//MP-MANAGED-UPDATABLE-ENDING
}
</pre>
<br />
<br />
<ul>
<li>Implement little business logic</li>
<li>Stores value</li>
<li>Updates view display info</li>
</ul>
<br />
<h3>
Application
</h3>
<pre class="java" name="code"><application name="porphyry">
<!-- transfer entities -->
<module name="CreateRelease" >
<model name="CreateRelease"/>
<view name="base"/>
<controller name="CreateReleaseController"/>
<mode-controller name="DetailOnly"/>
</module>
<module name="ValidateRelease" >
<model name="ValidateRelease"/>
<view name="base"/>
<controller name="ValidateReleaseController"/>
<mode-controller name="SplitOnly"/>
</module>
...
</pre>
CreateRelease is DetailOnly while ValidateRelease is SplitOnly mode (list+detail)<br />
<br />
<h3>
Controllers
</h3>
<pre class="java" name="code"><controllers>
<!-- transfer entities -->
<!-- bus_release -->
<controller name="CreateReleaseController">
<action name="release" mode="detail" class="net.sf.mp.demo.porphyry.action.business.busrelease.ReleaseAction" >
<use-object name="xava_view" />
</action>
</controller>
<!-- bus_release -->
<controller name="ValidateReleaseController">
<action name="validate" mode="detail" class="net.sf.mp.demo.porphyry.action.business.busrelease.ValidateAction" >
<use-object name="xava_view" />
</action>
<action name="reject" mode="detail" class="net.sf.mp.demo.porphyry.action.business.busrelease.RejectAction" >
<use-object name="xava_view" />
</action>
</controller>
</pre>
<br />
CreateReleaseController has one action 'Create' while ValidateReleaseController has 2 validate/reject<br />
<h2>
Minuteproject Configuration</h2>
Minuteproject abstract this effort by providing tooling to the analyst to describe those screens and actions that ultimately and implicitly become a flow.<br />
<br />
<pre class="xml" name="code"><enrichment>
<!-- transient objects -->
<entity name="create release" is-transfer-entity="true" is-searchable="false"
main-entity="bus_release">
<field name="id" hidden="true"></field>
<field name="name"></field>
<field name="notes"></field>
<field name="application_id"></field>
<field name="environment_id"></field>
<field name="releaser_id" ></field>
<field name="status" value="ACTIVE" hidden="true"></field>
<field name="creation_date" hidden="true"></field>
<!-- <field name="validator_id"></field> -->
<field name="time_to_start"></field>
<field name="time_to_end"></field>
<field name="validation_reason" hidden="true"></field>
<!-- other fields -->
<field name="notify" type="string" mandatory="true">
<stereotype stereotype="EMAIL" />
</field>
<actions>
<action name="release" default-implementation="insert" >
<field name="status" value="ACTIVE"></field>
</action>
</actions>
</entity>
<!-- transient objects -->
<entity name="validate release" is-transfer-entity="true"
main-entity="bus_release" is-editable="false" is-searchable="true">
<field name="id" hidden="true"></field>
<field name="name"></field>
<field name="notes"></field>
<field name="application_id"></field>
<field name="environment_id"></field>
<field name="releaser_id"></field>
<field name="status"></field>
<field name="creation_date"></field>
<field name="validator_id" is-editable="true"/><!-- default-value="profile.user.id"></field> -->
<field name="time_to_start"></field>
<field name="time_to_end"></field>
<field name="validation_reason" is-editable="true"></field>
<!-- other fields -->
<field name="inform" type="string" mandatory="true"
is-editable="true">
<stereotype stereotype="EMAIL" />
</field>
<actions>
<action name="validate" default-implementation="update">
<action-condition name="statusActive">
<field name="status" value="ACTIVE"/>
</action-condition>
<field name="status" value="DONE"></field>
</action>
<action name="reject" default-implementation="update">
<action-condition name="statusActive">
<field name="status" value="ACTIVE"/>
</action-condition>
<field name="status" value="REJECT"></field>
</action>
</actions>
</entity>
</enrichment>
</pre>
<h2>
Screens</h2>
<h4>
Create release</h4>
<div>
<br /></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMT1WgrT6tyejbO7uoj6LSL_4bhZxng283ZFlrE-HnT_WM7tIWTG7UUE9qqTQODB1Kl9K54cLAB3BVy1mawhwJPo4NGK3AWqeUEly8AOQ0Kvcm2t4VIYIzWpKKNy7x54BoUVgiYZ17YA/s1600/sdd-create-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMT1WgrT6tyejbO7uoj6LSL_4bhZxng283ZFlrE-HnT_WM7tIWTG7UUE9qqTQODB1Kl9K54cLAB3BVy1mawhwJPo4NGK3AWqeUEly8AOQ0Kvcm2t4VIYIzWpKKNy7x54BoUVgiYZ17YA/s640/sdd-create-release.png" width="588" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMT1WgrT6tyejbO7uoj6LSL_4bhZxng283ZFlrE-HnT_WM7tIWTG7UUE9qqTQODB1Kl9K54cLAB3BVy1mawhwJPo4NGK3AWqeUEly8AOQ0Kvcm2t4VIYIzWpKKNy7x54BoUVgiYZ17YA/s1600/sdd-create-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMT1WgrT6tyejbO7uoj6LSL_4bhZxng283ZFlrE-HnT_WM7tIWTG7UUE9qqTQODB1Kl9K54cLAB3BVy1mawhwJPo4NGK3AWqeUEly8AOQ0Kvcm2t4VIYIzWpKKNy7x54BoUVgiYZ17YA/s1600/sdd-create-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
Validation</h4>
<div>
<br /></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZNMxl-F0FxGY00hKtrpSZGev-pqKFmq4c8464ftd1tOr0y88hE_ft_n-s1dVwwdsAz_tfNdvWuS_FpR86WZaOvO4QX6fHwTm-HcbsHXDazliAvwWqIaq07WaMBbqwQ_gCDsBNyzvQ6g/s1600/sdd-create-release-validation.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZNMxl-F0FxGY00hKtrpSZGev-pqKFmq4c8464ftd1tOr0y88hE_ft_n-s1dVwwdsAz_tfNdvWuS_FpR86WZaOvO4QX6fHwTm-HcbsHXDazliAvwWqIaq07WaMBbqwQ_gCDsBNyzvQ6g/s640/sdd-create-release-validation.png" width="468" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZNMxl-F0FxGY00hKtrpSZGev-pqKFmq4c8464ftd1tOr0y88hE_ft_n-s1dVwwdsAz_tfNdvWuS_FpR86WZaOvO4QX6fHwTm-HcbsHXDazliAvwWqIaq07WaMBbqwQ_gCDsBNyzvQ6g/s1600/sdd-create-release-validation.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZNMxl-F0FxGY00hKtrpSZGev-pqKFmq4c8464ftd1tOr0y88hE_ft_n-s1dVwwdsAz_tfNdvWuS_FpR86WZaOvO4QX6fHwTm-HcbsHXDazliAvwWqIaq07WaMBbqwQ_gCDsBNyzvQ6g/s1600/sdd-create-release-validation.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
Releasing</h4>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4wZbiyLy-daBg88GDNdaZ5JFjbdHuVgild7_jcwvR3H_QAcDlIVYmDZ-pHUIZhUSi5WwxFegBV7vwQZPcKf_k6ZP-1RzK6ZFtCdVH3snA0VDPcSKQpZYLTmC-KQoG8fZXbdJbRGV-XA/s1600/sdd-create-release-done.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4wZbiyLy-daBg88GDNdaZ5JFjbdHuVgild7_jcwvR3H_QAcDlIVYmDZ-pHUIZhUSi5WwxFegBV7vwQZPcKf_k6ZP-1RzK6ZFtCdVH3snA0VDPcSKQpZYLTmC-KQoG8fZXbdJbRGV-XA/s400/sdd-create-release-done.png" width="400" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4wZbiyLy-daBg88GDNdaZ5JFjbdHuVgild7_jcwvR3H_QAcDlIVYmDZ-pHUIZhUSi5WwxFegBV7vwQZPcKf_k6ZP-1RzK6ZFtCdVH3snA0VDPcSKQpZYLTmC-KQoG8fZXbdJbRGV-XA/s1600/sdd-create-release-done.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4wZbiyLy-daBg88GDNdaZ5JFjbdHuVgild7_jcwvR3H_QAcDlIVYmDZ-pHUIZhUSi5WwxFegBV7vwQZPcKf_k6ZP-1RzK6ZFtCdVH3snA0VDPcSKQpZYLTmC-KQoG8fZXbdJbRGV-XA/s1600/sdd-create-release-done.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h4>
<b>Validator view</b></h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89XNhyphenhyphenH0nSev93qX6c_VzQkGUsugEB2ZuA58xtdBIetxP1itNZVX0UVkvI1IfYRL8HUEuHVxzcgJp2qMoS5eIppA4dp2ImiFegLIcWdGmUjqaHMoyoiX3DdQtqAXWS1hH0aE2mfYYcKs/s1600/sdd-create-validate-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89XNhyphenhyphenH0nSev93qX6c_VzQkGUsugEB2ZuA58xtdBIetxP1itNZVX0UVkvI1IfYRL8HUEuHVxzcgJp2qMoS5eIppA4dp2ImiFegLIcWdGmUjqaHMoyoiX3DdQtqAXWS1hH0aE2mfYYcKs/s640/sdd-create-validate-release.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h4>
Select one entry</h4>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmVWnNksA4UdkCek_c2MsLeEAx4djo-LaViaf0CP8m-nrMLmGJBwa60IfvJEG1mtsKWY6Bky8UzpbyE5OV54C1D4O2Zlci79VVR4HwYhpPbFuNWbM0VA7cV73I_OTrUvK5nzTh17BHGuo/s1600/sdd-validate-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmVWnNksA4UdkCek_c2MsLeEAx4djo-LaViaf0CP8m-nrMLmGJBwa60IfvJEG1mtsKWY6Bky8UzpbyE5OV54C1D4O2Zlci79VVR4HwYhpPbFuNWbM0VA7cV73I_OTrUvK5nzTh17BHGuo/s400/sdd-validate-release.png" width="383" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmVWnNksA4UdkCek_c2MsLeEAx4djo-LaViaf0CP8m-nrMLmGJBwa60IfvJEG1mtsKWY6Bky8UzpbyE5OV54C1D4O2Zlci79VVR4HwYhpPbFuNWbM0VA7cV73I_OTrUvK5nzTh17BHGuo/s1600/sdd-validate-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmVWnNksA4UdkCek_c2MsLeEAx4djo-LaViaf0CP8m-nrMLmGJBwa60IfvJEG1mtsKWY6Bky8UzpbyE5OV54C1D4O2Zlci79VVR4HwYhpPbFuNWbM0VA7cV73I_OTrUvK5nzTh17BHGuo/s1600/sdd-validate-release.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
Validate</h4>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0lbbggYFOUZm2hGE-aou8BM9ucHXhkBUi_uT6UceK9w0YsCwzQwX38S-rCGa98ycX5eRn6_uqgH0xnOi8IkG7n1tHR67b0C8XOhNC5yrdp3qiBE6io5vPc3XKSZhZRevj3DKAKcxbVCQ/s1600/sdd-validate-release-done.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0lbbggYFOUZm2hGE-aou8BM9ucHXhkBUi_uT6UceK9w0YsCwzQwX38S-rCGa98ycX5eRn6_uqgH0xnOi8IkG7n1tHR67b0C8XOhNC5yrdp3qiBE6io5vPc3XKSZhZRevj3DKAKcxbVCQ/s640/sdd-validate-release-done.png" width="640" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0lbbggYFOUZm2hGE-aou8BM9ucHXhkBUi_uT6UceK9w0YsCwzQwX38S-rCGa98ycX5eRn6_uqgH0xnOi8IkG7n1tHR67b0C8XOhNC5yrdp3qiBE6io5vPc3XKSZhZRevj3DKAKcxbVCQ/s1600/sdd-validate-release-done.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
Try to reprocess a status-DONE-release</h4>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgv2jL43qollOXvooL1gzmHtdWyi5NjjVQWSGBJGbfsQeEePldZKkMWuSdRHLfdbh4me3rwmh9J31sWmDmA1BIQSiW_fQh63E9U33meEvWspfieVyiycWqDImxoIpb_-hH1H2tRNKWwrM/s1600/sdd-validate-release-error.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgv2jL43qollOXvooL1gzmHtdWyi5NjjVQWSGBJGbfsQeEePldZKkMWuSdRHLfdbh4me3rwmh9J31sWmDmA1BIQSiW_fQh63E9U33meEvWspfieVyiycWqDImxoIpb_-hH1H2tRNKWwrM/s400/sdd-validate-release-error.png" width="311" /></a></div>
<br /></div>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
</h2>
<h2>
Conclusion</h2>
Minuteproject provides transient definition facilities & generation capabilities.<br />
<br />
Although the screens and actions are not very complex, minuteproject can induce a flow, <b>and without a workflow engine!</b><br />
<br />
Minuteproject is also generating portlet.xml in order to deploy 'Transient-definition portlet' on portal such as Liferay.<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-67982886710324647912013-08-26T16:06:00.001-07:002013-08-28T12:37:14.989-07:00reviewing liferfay service builder for minuteproject integration<h3>
<br /></h3>
This article carries a study on Liferay service builder tooling and check the matching in minuteproject ecosystem.<br />
<br />
The input from this article comes from:<br />
<ul>
<li><a href="http://docs.liferay.com/portal/6.1/definitions/liferay-service-builder_6_1_0.dtd.org.html">liferay service builder structure</a> </li>
<li><a href="http://www.liferay.com/fr/documentation/liferay-portal/6.0/development/-/ai/service-build-2">liferay service builder documentation</a> </li>
<li><a href="http://www.manning.com/sezov/">liferay in action</a> </li>
</ul>
<h2>
Service builder principles</h2>
<div>
Service builder relies on forward engineering and a descriptive format of the model that complies with a dtd. So the user needs to create a valid xml file called service.xml.</div>
<div>
Service xml main nodes are 'entity' node.</div>
<div>
Entity node describe a persistence entity (i.e. table) for a RDBMS.</div>
<div>
The entity description covers columns and relationships (parents and children via collection) as well as primary key strategy.</div>
<div>
This file serves as input to an ant task that carries on the generation process. Some 20 different artifacts are generated. All of those artifacts are service-builder 'entity' node centric.</div>
<div>
<br /></div>
<h2>
Service builder from a generation perspective</h2>
<h3>
Forward-engineering</h3>
<div>
Is a approach domain centric as some advantages:</div>
<div>
<ul>
<li>density of the information (a simple file to describe)</li>
</ul>
</div>
<h2>
Service builder from minuteproject perspective</h2>
<div>
Minuteproject is evolving from smart reverse-engineering to a development methodology platform focusing on <b><u><a href="http://minuteproject.blogspot.be/2013/08/minuteproject-facets-for-analysts.html">4 Weapons of Mass Productivity</a></u></b>:</div>
<div>
<ul>
<li>smart reverse-engineering</li>
<li>virtualization</li>
<li>statement driven development (SDD)</li>
<li>transient definition</li>
</ul>
<h2>
Service builder / Minuteproject matching</h2>
</div>
<div>
Although the philosophies (forward-engineering vs. reverse-engineering) are different there is a mapping between the both approach.</div>
<h3>
The question is are all the information in service builder available by minuteproject reverse-engineering?</h3>
<div>
<span style="color: red;"><b>YES!</b></span></div>
<h4>
Let's have a element review of service builder nodes</h4>
<div>
<b>Service builder </b><br />
<b><br /></b></div>
<div>
<pre class="xml" name="code"><
ATTLIST service-builder
package-path CDATA #REQUIRED
auto-namespace-tables CDATA #IMPLIED
>
<!ELEMENT author (#PCDATA)>
<!ELEMENT namespace (#PCDATA)
>
</pre>
<br />
package-path, author, namespace can be deduced by minuteproject model node<br />
<br />
<b>Entity</b><br />
<b><br /></b></div>
<div>
<pre class="xml" name="code"><
ATTLIST entity
name CDATA #REQUIRED
human-name CDATA #IMPLIED
table CDATA #IMPLIED
uuid CDATA #IMPLIED
uuid-accessor CDATA #IMPLIED
local-service CDATA #IMPLIED
remote-service CDATA #IMPLIED
persistence-class CDATA #IMPLIED
data-source CDATA #IMPLIED
session-factory CDATA #IMPLIED
tx-manager CDATA #IMPLIED
cache-enabled CDATA #IMPLIED
json-enabled CDATA #IMPLIED
>
</pre>
<br />
Entity name can be deduced from table name (or view name)<br />
Human name can be deduce by table alias name<br />
All the other boolean field can be deduce by so convention or some parameters to set on the mp4liferay track<br />
Datasource can be deduced by convention (related to the namespace) (and also generated by MP)<br />
<br />
<b>Column</b><br />
<br /></div>
<div>
<pre class="xml" name="code"><!ATTLIST column
name CDATA #REQUIRED
db-name CDATA #IMPLIED
type CDATA #REQUIRED
primary CDATA #IMPLIED
accessor CDATA #IMPLIED
filter-primary CDATA #IMPLIED
entity CDATA #IMPLIED
mapping-key CDATA #IMPLIED
mapping-table CDATA #IMPLIED
id-type CDATA #IMPLIED
id-param CDATA #IMPLIED
convert-null CDATA #IMPLIED
lazy CDATA #IMPLIED
localized CDATA #IMPLIED
json-enabled CDATA #IMPLIED
>
</pre>
Column info can be found by reverse-engineering name (via alias), db-name, type, primary, entity, mapping-key, mapping-table.<br />
Id-type and id-param can be deduced from the PK strategy associated to the database type.<br />
MP covers those described in service.xml (uuid, sequence, autoincrement, identity)<br />
<br />
<b>Finder and finder-column</b><br />
can be deduce from defaulting (pk, fk) or with the semantic reference of the table.<br />
<br />
<b>References</b> correspond to DB relationships.<br />
<br />
<h3>
</h3>
<h3>
Review conclusion</h3>
This means that the main information can be deduced from the smart reverse-engineering.<br />
What is missing can be added by convention a liferay configuration for defaulting (such as companyId, groupId, finder extra info) and parametrization of the liferay track.<br />
In all the case the configuration of service.xml (generated by MP) can be manually changed and at the next generation from the DB <b>your alterations are kept!! Thank to updatable code feature of MP.</b></div>
<h3>
</h3>
<h3>
</h3>
<h3>
Can minuteproject even extend service-builder facility?</h3>
<div>
<b><span style="color: red;">YES AGAIN!</span></b></div>
<h4>
</h4>
<h4>
Virtualization</h4>
<div>
This is the strong point of reverse-engineering: you can work with Views. In forward-engineering it is impossible since you cannot guess the implementation whereas in reverse-engineering, you take it as is!</div>
<div>
So your view can be set as entity in service.xml (with readonly access)</div>
<div>
But what is the identity field of this view. Minuteproject enrichment or convention enable to grant one to a field acting as a unique key.</div>
<div>
Even better, minuteproject provides you the ability to grant relationships between view like parent-child foreign key and this can also be used in service.xml</div>
<h4>
</h4>
<h4>
Enrichment</h4>
<div>
Example: detect relationship between entity when no foreign key present.</div>
<h3>
</h3>
<h3>
</h3>
<h3>
Can minuteproject do more for service builder?</h3>
<div>
<span style="color: red;"><b>YES!</b></span></div>
<h4>
</h4>
<h4>
Validation - mandatory and type are not enough</h4>
<div>
You should have stereotype such as email, url, password. A stereotype is an abstraction between presentation and validation aspects.<br />
<br /></div>
<h4>
Constraints</h4>
<div>
Limit the column value to a enumeration.<br />
<br /></div>
<h4>
Updatable code</h4>
<div>
The code you generate can be updated via some extension points. The next time you generate your modification are kept!<br />
<br /></div>
<h4>
Datasource</h4>
<div>
Minuteproject can generate the datasource code<br />
<br /></div>
<h4>
Semantic reference</h4>
<div>
Sometimes you do not want to display the entire entity fields but just the more important. This is the semantic reference.<br />
<br /></div>
<h4>
Work with Statement only</h4>
<div>
Sometimes you can go back to the fundamentals of your UCs (I/O + function).</div>
<div>
Ex a jdbc call to a stored procedure.<br />
<br /></div>
<h4>
DTO oriented service</h4>
<div>
The input is not mapped to a persistence entity.</div>
<div>
<br /></div>
<div>
<br />
<h2>
Conclusion</h2>
<br /></div>
<div>
After this feasability review, minuteproject can have the capabilities to generate service.xml of liferay from the DB. But also to extend it.<br />
A sample generation is foreseen for MP release 0.8.5.<br />
<br />
The first approach is to generate the SB input configuration. But nearly all generated artifacts SB generate can also be generated by MP.<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-18062357483921773992013-08-23T06:03:00.001-07:002013-08-28T01:48:37.943-07:00SDD as a productivity weapon 4 openxava<h4>
<span style="color: red;">Under construction (need 0.8.5 for generation) but can be used in the meantime as a OX tutorial to work with any jdbc sql statement (here stored-procedure)</span></h4>
<h2>
Productivity challenge</h2>
With SDD (Statement driven development) what is important is I/O and functionality.<br />
The model is secondary.<br />
To experience it, let's have a store procedure that perform a required operation and get a web application out of it with Minuteproject 4 Openxava. <br />
<h2>
Mission statement </h2>
<h3>
UC general statement</h3>
You have information to pass to a DB via a web application to perform a function.<br />
You would like the input to be validated base on type, presence, stereotype, membership.<br />
<h3>
UC specific</h3>
You need a functionality to ask for role in the application.<br />
As input you pass 3 params:<br />
<ul>
<li>username</li>
<li>email</li>
<li>requested role</li>
</ul>
UserName is:<br />
<ul>
<li>mandatory</li>
<li>string</li>
</ul>
Email is:<br />
<ul>
<li>mandatory</li>
<li>stereotype (format)</li>
</ul>
Request role is:<br />
<ul>
<li>mandatory</li>
<li>should be one of the application specific role</li>
</ul>
<br />
The function shall also:<br />
<ul>
<li>register the time of creation</li>
<li>status=TO_TREAT</li>
</ul>
<b>The function is provided in format of a stored procedure.</b><br />
<br />
<h3>
Dev environment constraints</h3>
A schema containing<br />
<ul>
<li>a table SEC_ROLE containing roles</li>
<li>a table BUS_USER_ROLE_REQUEST</li>
<li>a store procedure ASK_FOR_ROLE</li>
<pre class="xml" name="code">CREATE PROCEDURE ask_for_role(
IN username VARCHAR(255),
IN email VARCHAR(255),
IN role VARCHAR(255)
)
BEGIN
Insert into BUS_USER_ROLE_REQUEST (USERNAME, EMAIL, ROLE_REQUESTED, STATUS, REQUEST_DATE)
values (username, email, role, 'TO_TREAT', NOW());
END
</pre>
<li>SEC_ROLE and BUS_USER_ROLE_REQUEST <b>are not linked by any relationships</b> (no FK nor m2m).</li>
</ul>
<br />
<h2>
Configuration</h2>
This configuration focus on the SDD part<br />
<pre class="xml" name="code"><!DOCTYPE root>
<generator-config>
<configuration>
<conventions>
<target-convention type="enable-updatable-code-feature" />
</conventions>
<!-- other configuration, data-model where sec_role and bus_user_role_request are present... -->
<model name="porphyry" version="1.0" package-root="net.sf.mp.demo">
<statement-model>
<queries>
<query name="ask_for_role" id="ask_for_role" >
<query-body>
<value>
<![CDATA[call ask_for_role (?,?,?)]]>
</value>
</query-body>
<query-params>
<query-param name="username" is-mandatory="true" type="string" sample="'a'" is-id="true"></query-param>
<query-param name="email" is-mandatory="true" type="string" sample="'b'">
<stereotype stereotype="EMAIL" />
</query-param>
<query-param name="role" is-mandatory="true" type="string" sample="'c'">
<query-param-link entity-name="sec_role" field-name="role"/>
</query-param>
</query-params>
</query>
</queries>
</statement-model>
</model>
<targets catalog-entry="OpenXava" >
</targets>
</configuration>
</generator-config> </pre>
The main points are:<br />
<ul>
<li>call ask_for_role with 3 parameters</li>
<li>description of the parameters (name, type, presence, stereotype)</li>
<li>restrict to a set of value coming from a table and field (query-param-link)</li>
</ul>
<h2>
Openxava design flow</h2>
The input is in format of an Openxava/JPA2 entity to enable binding and link to other entity.<br />
But this entity will never be persisted and never lookup.<br />
The input screen will be accessed directly, and button match the action. After the action is performed a message is display.<br />
To enable this flow OX controllers.xml and application.xml nodes are generated.<br />
The action binding the input data from the form; validating and calling the store procedure call are also generated.<br />
<h2>
Generated code</h2>
<h3>
Input/Output bean generated</h3>
<br />
<pre class="java" name="code">import javax.persistence.*;
import org.openxava.annotations.*;
import net.sf.mp.demo.porphyry.domain.security.Role;
@Entity (name="AskForRoleIn")
@Table (name="ask_for_role")
@Views({
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @view-base-ask_for_role@
@View(
name="base",
members=
""
+ "username ; "
+ "email ; "
+ "role ; "
),
//MP-MANAGED-UPDATABLE-ENDING
@View(
name="Create",
extendsView="base"
),
@View(
name="Update",
extendsView="base",
members=
""
),
@View(extendsView="base",
members=
""
),
@View(name="askForRoleDEFAULT_VIEW",
members=
" username ;"
+ "email ; "
+ "roleTransient ; "
),
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @view-reference-ask_for_role@
@View(name="reference",
extendsView="askForRoleDEFAULT_VIEW"
//MP-MANAGED-UPDATABLE-ENDING
)
})
//MP-MANAGED-ADDED-AREA-BEGINNING @class-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @class-annotation@
public class AskForRoleIn {
@Id @Column(name="username" ,length=255)
private String username;
//MP-MANAGED-ADDED-AREA-BEGINNING @email-field-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @email-field-annotation@
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @ATTRIBUTE-email@
@Column(name="email", length=255, nullable=false, unique=false)
@Required
@Stereotype ("EMAIL")
private String email;
//MP-MANAGED-UPDATABLE-ENDING
//MP-MANAGED-ADDED-AREA-BEGINNING @role_TRANSIENT-field-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @role_TRANSIENT-field-annotation@
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @ATTRIBUTE-role_TRANSIENT@
@Transient
@ReadOnly
private String roleTransient;
//MP-MANAGED-UPDATABLE-ENDING
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @parent-Role-ask_for_role@
@ManyToOne (fetch=FetchType.LAZY ,optional=false)
@JoinColumn(name="role", referencedColumnName = "ID", nullable=false, unique=false )
@ReferenceView ("reference")
private Role role;
...
} </pre>
Although not persisted and never looked up AskForRole<b>In</b> can be used by Openxava:<br />
<ul>
<li> to pass by information as a DTO</li>
<li>perform validation</li>
<li>perform assignment (it is linked to table Role)</li>
<li>it contains a transient field roleTransient that will be used by the Openxava action to copy the 'role' field of the 'role' table (not the pk) </li>
<li>offers a view with</li>
<ul>
<li>simple input field</li>
<li>associated entities</li>
</ul>
<li>@Id is associated to one field (otherwise JPA/Hibernate complains) </li>
<ul>
</ul>
</ul>
<h3>
Action</h3>
<br />
<pre class="java" name="code">/**
* template reference :
* - name : ActionOX.SDD.query
* - file name : ActionOX.SDD.query.vm
* - time : 2013/08/22 AD at 12:29:41 CEST
*/
package net.sf.mp.demo.porphyry.sdd.action.statement;
//MP-MANAGED-ADDED-AREA-BEGINNING @import@
//MP-MANAGED-ADDED-AREA-ENDING @import@
import org.openxava.jpa.*;
import org.openxava.model.*;
import org.openxava.util.*;
import org.openxava.validators.*;
import org.openxava.actions.*;
import java.util.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import net.sf.mp.demo.porphyry.sdd.out.statement.AskForRoleOutList;
import net.sf.mp.demo.porphyry.sdd.out.statement.AskForRoleOut;
import net.sf.mp.demo.porphyry.sdd.in.statement.AskForRoleIn;
public class AskForRoleAction extends ViewBaseAction {
public static final String QUERY_NATIVE = "call ask_for_role (?,?,?)";
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @SDD_EXECUTE_GET-ask_for_role@
public AskForRoleOutList execute (AskForRoleIn askForRoleIn) {
AskForRoleOutList askForRoleOutList = new AskForRoleOutList();
List<askforroleout> list = executeJDBC (askForRoleIn);
askForRoleOutList.setAskForRoleOuts (list);
return askForRoleOutList;
}
//MP-MANAGED-UPDATABLE-ENDING
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @SDD_EXECUTE_JDBC-ask_for_role@
public List<askforroleout> executeJDBC(AskForRoleIn askForRoleIn) {
if (askForRoleIn==null)
askForRoleIn = new AskForRoleIn();
List<askforroleout> list = new ArrayList<askforroleout>();
PreparedStatement pstmt = null;
ResultSet rs = null;
Connection conn = null;
try {
conn = getConnection();
pstmt = conn.prepareStatement(QUERY_NATIVE);
if (askForRoleIn.getUsername()==null) {
pstmt.setNull(1, java.sql.Types.VARCHAR);
} else {
pstmt.setString(1, askForRoleIn.getUsername());
}
if (askForRoleIn.getEmail()==null) {
pstmt.setNull(2, java.sql.Types.VARCHAR);
} else {
pstmt.setString(2, askForRoleIn.getEmail());
}
if (askForRoleIn.getRoleTransient()==null) {
pstmt.setNull(3, java.sql.Types.VARCHAR);
} else {
pstmt.setString(3, askForRoleIn.getRoleTransient());
}
rs = pstmt.executeQuery();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
rs.close();
pstmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return list;
}
//MP-MANAGED-UPDATABLE-ENDING
//if JPA2 implementation is hibernate
@SuppressWarnings("deprecation")
public Connection getConnection() throws HibernateException {
Session session = getSession();
Connection connection = session.connection();
return connection;
}
private Session getSession() {
Session session = (Session) XPersistence.getManager().getDelegate();
return session;
}
public void execute() throws Exception {
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @execute-porphyry@
//super.execute();
//TODO
Messages errors =
MapFacade.validate("AskForRoleIn", getView().getValues());
if (errors.contains()) throw new ValidationException(errors);
AskForRoleIn e = new AskForRoleIn();
e.setUsername((String)getView().getValue("username"));
e.setEmail((String)getView().getValue("email"));
// parent to copy to transient field
Map roleMap = (Map)getView().getValue("role");
if (roleMap!=null) {
e.setRoleTransient ((String)roleMap.get("role"));
}
try {
execute(e);
} catch (Exception ex) {
errors = new Messages();
errors.add(ex.getMessage());
throw new ValidationException(errors);
}
//TODO return list
addInfo("call AskForRoleAction done!");
//MP-MANAGED-UPDATABLE-ENDING
}
//MP-MANAGED-ADDED-AREA-BEGINNING @implementation@
//MP-MANAGED-ADDED-AREA-ENDING @implementation@
} </askforroleout></pre>
<ul>
<li>perform validation</li>
<li>retrieve simple type as well as complex (Role object type)</li>
<li>copy values a input of the store proc call</li>
<ul>
<li>here the store proc does not return anything so there is no parsing of the resultset.</li>
</ul>
</ul>
Here one can argue that we do not need the transient field 'roleTransient' in AskForRoleIn.<br />
This is true. It is present because it was easier from a generation point of view to keep the parameter order of the stored procedure call.<br />
<ul><ul>
</ul>
</ul>
<h3>
Controller.xml</h3>
<br />
<pre class="xml" name="code"><controllers>
<!-- statement driven development SDD -->
<!-- $table.name -->
<controller name="AskForRoleController">
<action name="askForRole" mode="detail" class="net.sf.mp.demo.porphyry.sdd.action.statement.AskForRoleAction" >
<use-object name="xava_view" />
</action>
</controller>
</controllers>
</pre>
Provides controller and action<br />
<h3>
Application.xml</h3>
<br />
<pre class="xml" name="code"><application name="porphyry">
<!-- statement driven development SDD -->
<module name="AskForRoleIn" >
<model name="AskForRoleIn"/>
<view name="base"/>
<controller name="AskForRoleController"/>
<mode-controller name="DetailOnly"/>
</module>
</application>
</pre>
Wiring between Model/View/Controller and mode<br />
Detail mode selected (ie no lookup) <br />
<h2>
Screens</h2>
<h3>
Input screen </h3>
Available at ${yourcontext}/xava/home.jsp?application=porphyry&module=AskForRole<b>In </b><br />
Is also available as a menu entry under statement<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWE91Y8ZkTIHcp7PtkO-ormO20MvxsKtYNYCB_JnNEC4eUjU_WrDerQ_x5vBWo3Q8r85sXjHgJmg75B8Ur7WCKBL4bqKO8adMCcCbGWcUHytcPVb1JtxcnZt1eNts3oHLaqBSiRbRo5AY/s1600/ask4role.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWE91Y8ZkTIHcp7PtkO-ormO20MvxsKtYNYCB_JnNEC4eUjU_WrDerQ_x5vBWo3Q8r85sXjHgJmg75B8Ur7WCKBL4bqKO8adMCcCbGWcUHytcPVb1JtxcnZt1eNts3oHLaqBSiRbRo5AY/s640/ask4role.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3>
Sub select Use case</h3>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSvpElO9jAk4PGDK-WhybPh_ohyphenhyphenmpXkZ5Q8uolMSAANWE8ub_4cxXvEjiVbUl0Jk_oMAs6kKW9s_TGsb6M1oGoerwfsDJnmLWrm6RJvC-PnnaD-tMLclN_4lOYcsZfiNaEq-pg-0OuLPk/s1600/ask4role-searchRole.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSvpElO9jAk4PGDK-WhybPh_ohyphenhyphenmpXkZ5Q8uolMSAANWE8ub_4cxXvEjiVbUl0Jk_oMAs6kKW9s_TGsb6M1oGoerwfsDJnmLWrm6RJvC-PnnaD-tMLclN_4lOYcsZfiNaEq-pg-0OuLPk/s640/ask4role-searchRole.png" width="640" /></a><br />
<h3>
</h3>
<h3>
</h3>
<h3>
Performing the action </h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlhgsHbCRsBYJKecGoRpOEqRAwY0c127EFxrYhsyPR6-Na32b73mfhu1AVWUQUh-uPLTBY55IoiM2hk9a1LbpjX_h96rvp9Z08TTtOoVP8QU44YfRct82AX-iLzuemHfJOA2cu3h9uwrA/s1600/ask4role-done.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlhgsHbCRsBYJKecGoRpOEqRAwY0c127EFxrYhsyPR6-Na32b73mfhu1AVWUQUh-uPLTBY55IoiM2hk9a1LbpjX_h96rvp9Z08TTtOoVP8QU44YfRct82AX-iLzuemHfJOA2cu3h9uwrA/s400/ask4role-done.png" width="400" /></a></div>
<h3>
</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSvpElO9jAk4PGDK-WhybPh_ohyphenhyphenmpXkZ5Q8uolMSAANWE8ub_4cxXvEjiVbUl0Jk_oMAs6kKW9s_TGsb6M1oGoerwfsDJnmLWrm6RJvC-PnnaD-tMLclN_4lOYcsZfiNaEq-pg-0OuLPk/s1600/ask4role-searchRole.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3>
Viewing the result</h3>
<br />
Since it is store in table USER_ROLE_REQUEST<br />
Minuteproject generates also a CRUD access on this table.<br />
By filtering we check that the input of the store proc+ additional business field are stored correctly.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1FL4LkIjjpMWTXYgqSgNUNaWt-c_TAAbzJ9VBP3romQ-7REg2Aq4XPKv_434YuQacXaxE17ZwDxoVnj9gXvNkFgYZntU6VDpztoogwM-fENx9tbNAF8v0xrTuPtly9TSoqOr1snUrvEg/s1600/ask4role-check.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1FL4LkIjjpMWTXYgqSgNUNaWt-c_TAAbzJ9VBP3romQ-7REg2Aq4XPKv_434YuQacXaxE17ZwDxoVnj9gXvNkFgYZntU6VDpztoogwM-fENx9tbNAF8v0xrTuPtly9TSoqOr1snUrvEg/s640/ask4role-check.png" width="640" /></a></div>
<br />
<h2>
</h2>
<h2>
<b>Conclusion </b></h2>
<b>Statement Driven Development - SDD</b><br />
<ul>
<li>provides tooling for analyst</li>
<li>RAD for developer </li>
<ul>
<li>any sql statement could now be an advance business UC (sub affection, validation)</li>
<li>necessary OX gearing is generated.</li>
</ul>
<li>is a pillar of development productivity</li>
</ul>
Minuteproject is also generating portlet.xml in order to deploy 'Transient-definition portlet' on portal such as Liferay.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-81945629334800137932013-08-19T08:03:00.002-07:002013-08-24T12:29:21.726-07:00Northwind DB revisited with MP 4 OXMinuteproject (0.8.4) now supports ms-sqlserver.<br />
It has been tested with MS Northwind DB on sqlserver 2014.<br />
Here are the steps to follow to get an OpenXava application from the northwind DB.<br />
<br />
<b>Goal:</b><br />
Get a working Northwind Openxava application in couple of seconds.<br />
For hungry minds please find the resulting code on <a href="https://code.google.com/p/minuteproject/downloads/detail?name=northwind-mp4ox.zip">googlecode</a>.<br />
<h2>
Northwind DB</h2>
Northwind database is a sample DB provided by Microsoft.<br />
It can be found at <a href="http://northwinddatabase.codeplex.com/releases/view/71634" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 13px;" target="_blank">http://northwinddatabase.<wbr></wbr>codeplex.com/releases/view/<wbr></wbr>71634</a><br />
<br />
The sql provided to create the schema has DB objects (tables/views) containing space.<br />
This sql has been revisited to remove those spaces a version can be found <a href="http://svn.code.sf.net/p/minuteproject/code/trunk/minutePresentation/model/northwind/northwind.sql">here</a>.<br />
<br />
<ul>
<li>Install SQLServer</li>
<li>Create an account</li>
<li>Run the script.</li>
</ul>
<br />
<h2>
MinuteProject with SQLSERVER</h2>
Minuteproject<br />
<ul>
<li>uses com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc driver</li>
<li>associates 'identity' as a primary key strategy by default on the console</li>
<li>associates org.hibernate.dialect.SQLServer2008Dialect for hibernate dialect</li>
<li>proposes maven artifact-id=sqljdbc4; group-id=com.microsoft.sqlserver; version=4.0 for pom configuration</li>
</ul>
<div>
Furthermore when retrieving the metadata of your model, set '<b>dbo</b>' of the schema node.</div>
<div>
<br /></div>
<h2>
Minuteproject configuration</h2>
<div>
<br /></div>
<div>
<br /></div>
<pre class="xml" name="code"><!DOCTYPE root>
<generator-config>
<configuration>
<model name="nortewind" version="1.0" package-root="net.sf.mp.demo">
<data-model>
<driver name="sqlserver" version="4.0" groupId="com.microsoft.sqlserver"
artifactId="sqljdbc4"></driver>
<dataSource>
<driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName>
<url>jdbc:sqlserver://localhost:1433;databaseName=northwind</url>
<username>sqlserver</username>
<password>xxxxxxxx</password>
</dataSource>
<!-- for Oracle and DB2 please set the schema <schema> </schema> -->
<schema>dbo</schema>
<primaryKeyPolicy oneGlobal="true">
<primaryKeyPolicyPattern name="identityPattern"></primaryKeyPolicyPattern>
</primaryKeyPolicy>
</data-model>
<business-model>
<business-package default="business">
<condition type="package" database-object-type="VIEW" result="review"></condition>
</business-package>
<enrichment>
<conventions>
<view-primary-key-convention
type="apply-default-primary-key-otherwise-first-one"
default-primary-key-names="ID" />
<column-naming-convention
type="apply-fix-primary-key-column-name-when-no-ambiguity-and-not-natural"
default-value="ID" />
<entity-naming-convention type="apply-field-alias-based-on-camelcase"/>
<column-naming-convention type="apply-field-alias-based-on-camelcase"/>
<reference-naming-convention
type="apply-referenced-alias-when-no-ambiguity" is-to-plurialize="false" />
<reference-naming-convention type="apply-many-to-many-aliasing" is-to-plurialize="false"/>
</conventions>
</enrichment>
</business-model>
</model>
<!-- --> <targets catalog-entry="OpenXava">
</targets>
<!-- <targets catalog-entry="JPA2" >
</targets> -->
</configuration>
</generator-config>
</pre>
<br />
<br />
This configuration will allow you to<br />
<br />
<ul>
<li>retrieve sqlserver information for the model northwind (do not forget to specify 'dbo' in schema)</li>
<li>assign identity as primary key strategy</li>
<li>separate table package from view package. (tables go in package business, views in package review)</li>
<li>apply convention</li>
<ul>
<li>use camel case for field and entity (table/view)</li>
<li>associate a primary key if not present. The primary key would then be attribute to the field ID if present otherwise the first found.</li>
<li>have clean name (here not plurialized because northwind already use plural in DB object name) when possible (i.e. there is no variable name collisition - this occurs when you have more than one relationship between two objects).</li>
</ul>
<li>use the track OpenXava from the catalog.</li>
</ul>
<h3>
Steps</h3>
<div>
Copy this configuration to /mywork/config as northwind-OX.xml </div>
<div>
From a command line run model-generation.cmd/sh northwind-OX.xml </div>
<div>
The result will go in /mywork/output/nortewind/OpenXava</div>
<div>
<br /></div>
<div>
Open a prompt in /mywork/output/nortewind/OpenXava</div>
<div>
set OX_HOME and MP_HOME (where you install Openxava and Minuteproject)<br />
<ul>
<li>set OX_HOME= path-to-Openxava // export OX_HOME in linux</li>
<li>set MP_HOME= path-to-Minuteproject // export MP_HOME in linux </li>
</ul>
</div>
<div>
<br /></div>
<div>
Run build-nortewind.cmd/sh<br />
<br />
This should be enough to get a<br />
<ul>
<li>Openxava project</li>
<li>build/package/deploy</li>
<li>start tomcat with a connection pool on the server</li>
<li>open a browser at <a href="http://localhost:8080/nortewind/xava/homeMenu.jsp">http://localhost:8080/nortewind/xava/homeMenu.jsp</a></li>
</ul>
</div>
<div>
<br /></div>
<div>
Enjoy!</div>
<div>
<br />
<h3>
Screenshots</h3>
<div>
You have Openxava CRUD on all tables and selection on views</div>
<div>
<br /></div>
<h4>
Menu entries</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBuc9gVx91WYBc6JXxpKlFQzDU7Qa20JCGgfKP2_7GFs0fmRtfN4igUoJGjHqkE61vlJNcCopE_ld-pEq-Bqorhl8G4b2BLZdHKcrmPorI5ayv9ZmIy_dSFH58dX4zxfQf-EjvzOV3PCk/s1600/northwind-menu-table.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBuc9gVx91WYBc6JXxpKlFQzDU7Qa20JCGgfKP2_7GFs0fmRtfN4igUoJGjHqkE61vlJNcCopE_ld-pEq-Bqorhl8G4b2BLZdHKcrmPorI5ayv9ZmIy_dSFH58dX4zxfQf-EjvzOV3PCk/s320/northwind-menu-table.png" width="233" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh9eNPaxZVL280uURiFbj6qss8PrxICKVfj9c-sE8PqVV4diOIHOoWQhV55qW1TAAIF9H74Xo2djitJUYo6x5texBTGjvm0VBgDymSf9cX-AmknNeLg7ueiZOmZMIYYMSYwhe0oKQj4_s/s1600/northwind-view-menu.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh9eNPaxZVL280uURiFbj6qss8PrxICKVfj9c-sE8PqVV4diOIHOoWQhV55qW1TAAIF9H74Xo2djitJUYo6x5texBTGjvm0VBgDymSf9cX-AmknNeLg7ueiZOmZMIYYMSYwhe0oKQj4_s/s320/northwind-view-menu.png" width="286" /></a><br />
<div class="separator" style="clear: both; text-align: left;">
<b>Select Order</b></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf2A6KpIS4BJBvbc5qqbPQiLKMW9Sixcmn37mwdARZbEkIFkQCiVkiYAhrluMZLIz6y3a910xz93lDad6XX_Uk1Vmnwp7BA14Oxxuzbj3dvK4QKAG2fwWf5QH56tNnALOwvUEUGQYSVdI/s1600/northwind-orders-list.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="377" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf2A6KpIS4BJBvbc5qqbPQiLKMW9Sixcmn37mwdARZbEkIFkQCiVkiYAhrluMZLIz6y3a910xz93lDad6XX_Uk1Vmnwp7BA14Oxxuzbj3dvK4QKAG2fwWf5QH56tNnALOwvUEUGQYSVdI/s640/northwind-orders-list.png" width="640" /></a></div>
<b> Region details</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xdd-__hEeyySlLs08KSZqnpzMlaD0J0XPzSC7wDUflTxVH4EbZsT1-vHb_qO-N9f34mNjGxmr8z-Quw6gWHti44rH7d4Rxltf3lp2-J0o_LWHyDIUS5fmh-hKfCbjx-szmhWyrrKepM/s1600/northwind-region-territories-detail.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xdd-__hEeyySlLs08KSZqnpzMlaD0J0XPzSC7wDUflTxVH4EbZsT1-vHb_qO-N9f34mNjGxmr8z-Quw6gWHti44rH7d4Rxltf3lp2-J0o_LWHyDIUS5fmh-hKfCbjx-szmhWyrrKepM/s640/northwind-region-territories-detail.png" width="534" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>List of products (view)</b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCqlue3fC5cTH6HFRHvqneYWbJSHINUcjJfp8NuLenSg_kbzzIg-xaKYKajbsdfOUAfGoJuiyBd1fnrUxdtGG8ltMDTH2NIht-kjF1B3sflS3rp9Hqa80hXwelRpNitw0A3N5xo35gKXk/s1600/northwind-view-list-of-product-pagination.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="334" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCqlue3fC5cTH6HFRHvqneYWbJSHINUcjJfp8NuLenSg_kbzzIg-xaKYKajbsdfOUAfGoJuiyBd1fnrUxdtGG8ltMDTH2NIht-kjF1B3sflS3rp9Hqa80hXwelRpNitw0A3N5xo35gKXk/s640/northwind-view-list-of-product-pagination.png" width="640" /></a></div>
<br />
<h2>
MinuteProject with console</h2>
<div>
The code can also be generated with Minuteproject console, it is faster since you do not have to write any configuration. Meanwhile it is more limited since not all the convention are available on the console.</div>
<div>
<br /></div>
<div>
click <mp_home>/bin/start-console.sh/cmd</mp_home></div>
<div>
apply the following parameters</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRDhTvhYZ2HsDccpyXzdZGCWUpT33R4BWXJ1LDaGV-L9tmMxxLtUk8JfMEmsg5EDrz1T0vhPeOm19HedAWmiQIVe-lxz85kX9KMl39JQcOLLOAElv59FgC_nv3ARKe3eqavYnZJOHQq7c/s1600/northwind-with-console.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRDhTvhYZ2HsDccpyXzdZGCWUpT33R4BWXJ1LDaGV-L9tmMxxLtUk8JfMEmsg5EDrz1T0vhPeOm19HedAWmiQIVe-lxz85kX9KMl39JQcOLLOAElv59FgC_nv3ARKe3eqavYnZJOHQq7c/s640/northwind-with-console.png" width="624" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<br /></div>
Click on generate and the output will go to <mp_home>/output/northwind/Openxava</mp_home><br />
<br />
You can them process with the same steps as with the configuration.<br />
<br />
<br /></div>
<div>
<h2>
Conclusion</h2>
</div>
<div>
Minuteproject 0.8.4 offers sqlserver generation and simplifies the configuration of the tracks.</div>
<div>
Feel free to pick up others by picking them from the drop down list or by changing the attribute catalog-entry of the node targets by one of the following value:<br />
<br />
JPA2<br />
JPA2-ABL<br />
BSLA-JPA2<br />
REST-JEE<br />
REST-SpringMVC<br />
REST-CXF-Spring<br />
REST-CXF-JEE<br />
WS-JEE<br />
JOOQ<br />
Primefaces-Spring<br />
Primefaces-JEE<br />
FitNesse<br />
Solr<br />
OpenXava<br />
Grails<br />
Play<br />
Vaadin<br />
Roo<br />
Maven Spring Hibernate<br />
Maven Spring JPA/Hibernate<br />
SpringService<br />
<br />
Remark some tracks are under construction.</div>
<div>
<br /></div>
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-75033807381007286202013-08-09T01:14:00.002-07:002013-08-09T01:19:46.550-07:00Reviewing primefaces starterI have been contacted to review <a href="http://www.packtpub.com/primefaces-starter/book">Primefaces starter book</a>, and here are my impressions as a Primefaces user and with a 'minuteproject' perspective.<br />
<br />
<br />
This book is a starter targeting developers with JSF knowledge, and it is very rewarding. <br />
It covers Primefaces (PF) core features as well cool ones that make your application look great! such as Calendar, Google map, interactive chat, reporting diagram.<br />
It is based on concrete data model with a github source code ready to clone and package seamlessly. All the installation procedure and tooling is described making your environment setup easy. This starter spurs up you curiosity to dive in to the code while the chapter provides you the substantial insights of PF JSF components. The result is a comprehensive advanced application based on non-trivial model spanning from CRUD, JEE (JPA/CDI) to advanced PF component.<br />
Another aspect that I liked was the density of information: it sticks to the essential, no fuss, no dozens-of-API-page syndrome.<br />
<br />
<br />
From a minuteproject perspective, and seeing Primefaces as a major actor in the presentation framework, I am always interested to grab extra bits of info on the subject.<br />
I was particularly interested in the cool features (Calendar, Maps) since I think that with SDD (<a href="http://minuteproject.blogspot.be/2012/05/statement-driven-development.html">Statement Driven Development</a> ) some of those could be generated. SDD can be already used in PF to produce <a href="http://petshopapp.minuteproject.cloudbees.net/petshop/sdd/statement/GetAddressAbstractChart.xhtml">graphs</a> <br />
<br />
So it was quite an enjoyable review.<br />
<br />
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-62608288485321804212013-08-08T03:07:00.004-07:002013-08-28T00:36:17.735-07:00Minuteproject facets for analystsThis article resumes the features Minuteproject offers to the analyst to perform a reverse-analysis of the application model.<br />
<br />
<h2>
Core </h2>
Minuteproject core functionality is smart reverse-engineering from a database.<br />
<ul>
<li>Reverse-engineering means that you can deduce lots of artifacts based on the database schema structure.</li>
<li>Smart means that you can enrich the database elements individually or globally by convention to get the resulting artifacts finer (with added-value) instead of a default bulk solution. Examples:</li>
<ul>
<li> Your database objects can be:</li>
<ul>
<li>packaged</li>
<li>secured</li>
<li>aliased (the name of your development object (in java) can follow different convention than those of your DB</li>
</ul>
</ul>
</ul>
<b>Sample</b><br />
<a href="http://minuteproject.blogspot.be/2012/05/rigajug-demo-2-jpa2.html">http://minuteproject.blogspot.be/2012/05/rigajug-demo-2-jpa2.html</a><br />
<ul><ul><ul>
</ul>
</ul>
</ul>
<u><b>But Minuteproject is even more.</b></u><br />
<br />
<h2>
Views and alternative models</h2>
You can work with views conveniently by enriching them with primary key (a unique field will do) and foreign key (pointing to another table or view). This feature enables you to get quickly alternative model with a graph (parent-child relationship) that you can query.<br />
An illustration is when you want to get a report grouping information per country/dept on one side and on the other side you have some report details.<br />
<br />
<h2>
SDD - Statement driven development</h2>
Why just reverse-engineer the structure? We can also reverse-engineer the statement (queries, store-proc calls etc...)<br />
Statement-driven-development focuses on I/O: it goes back to the fundamentals and follow the philosophy WYSIWYG (What You <b>State </b>Is What You Get) <br />
If you know how-to write sql, you are not far from having a REST application or any application in the track that support this feature (at the moment of writing Primefaces, ADF).<br />
<br />
<b>Sample</b><br />
<a href="http://minuteproject.blogspot.be/2013/08/sdd-as-productivity-weapon-4-openxava.html">http://minuteproject.blogspot.be/2013/08/sdd-as-productivity-weapon-4-openxava.html</a><br />
<h2>
Transfer Objects</h2>
Sometimes, you need to have object that may not be persisted or completely persisted.<br />
Example you want ad-hoc forms and actions where some info comes from the database some not.<br />
Minuteproject offers you the possibility to describe and generate for those objects.<br />
<br />
<b>Sample</b><br />
<a href="http://minuteproject.blogspot.be/2013/08/transient-definition-as-productivity.html">http://minuteproject.blogspot.be/2013/08/transient-definition-as-productivity.html</a><br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-23609236196996860592013-04-29T13:45:00.000-07:002013-11-26T14:23:52.477-08:00How-to cloudbees minuteproject 4 primefaces<h2>
Introduction</h2>
Cloudbees offers JEE app and Mysql DB storage. <br />
Minuteproject generates CRUD and reporting application for Primefaces based on a database model.<br />
<br />
This article is based on upon the petshop mysql database.<br />
The result can be show on cloudbees at <a href="http://petshopapp.minuteproject.cloudbees.net/">http://petshopapp.minuteproject.cloudbees.net</a><br />
<br />
The application, minuteproject configuration and DB model can be found on google code at <a href="https://code.google.com/p/minuteproject/downloads/detail?name=petshop-mp4primeface-cloudbees.zip">https://code.google.com/p/minuteproject/downloads/detail?name=petshop-mp4primeface-cloudbees.zip</a><br />
<h2>
Prerequisits</h2>
Download and install Minuteproject set MP_HOME<br />
Download and install <a href="http://wiki.cloudbees.com/bin/view/RUN/BeesSDK">Cloudbees SDK</a> set BEES_HOME<br />
Create a cloudbees account <br />
Mysql local DB running with a schema.<br />
<h2>
Steps</h2>
In order to get Cloudbees Primefaces application quickly follow the next steps.<br />
<br />
<h3>
Cloudbees setups </h3>
<div>
Cloudbees setup can be done on the website, but also by the following command lines</div>
<h4>
Cloudbees app</h4>
<pre class="xml" name="code">$bees app:create petshopapp</pre>
<br />
<h4>
Cloudbees DB</h4>
<pre class="xml" name="code">$bees db:create petshopappDB -u username -p password</pre>
<br />
<h4>
Cloudbees binding</h4>
<pre class="xml" name="code">$bees app:bind -db petshopappDB -a petshopapp -as petshopAppDS</pre>
<br />
<h4>
Deployment on Cloudbees </h4>
<div>
<pre class="xml" name="code">$bees app:deploy -a account/petshopapp -t tomcat7 path-to-your-app.war</pre>
</div>
This step is performed after you have build your app.<br />
<br />
<h4>
Install you DB schema</h4>
Get the server connection information:<br />
<ul>
<li>server</li>
<li>port</li>
<li>user_name</li>
<li>pass_word</li>
</ul>
<br />
<pre class="xml" name="code">$mysql --user=user_name --password=pass_word --host=server --port=port < schema.sql</pre>
<br />
<h3>
Minuteproject 4 Primefaces app</h3>
<div>
To create a primefaces application, minuteproject can generate one based on a database structure.<br />
Minuteproject runs with a command line.</div>
<div>
The configuration file used is <b>petshop-mp4primeface-cloudbees.zip</b> </div>
<h4>
Configuration</h4>
The configuration file can be found in the zip under mp-config-JSF-Spring.xml<br />
The main points of the file are<br />
<pre class="xml" name="code"><!DOCTYPE root>
<generator-config xmlns="http://minuteproject.sf.net/xsd/mp-config"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="mp-config.xsd">
<configuration>
<conventions>
<target-convention type="enable-updatable-code-feature" />
</conventions>
<model name="petshop" version="1.0" package-root="net.sf.mp.demo">
<data-model>
<driver name="mysql" version="5.1.16" groupId="mysql"
artifactId="mysql-connector-java"></driver>
<dataSource>
<driverClassName>org.gjt.mm.mysql.Driver</driverClassName>
<url>jdbc:mysql://127.0.0.1:3306/petshop</url>
<username>root</username>
<password>mysql</password>
</dataSource>
<primaryKeyPolicy oneGlobal="false">
<primaryKeyPolicyPattern name="autoincrementPattern"></primaryKeyPolicyPattern>
</primaryKeyPolicy>
</data-model>
<business-model>
<generation-condition>
<condition type="exclude" startsWith="DUAL"></condition>
<condition type="exclude" startsWith="ID_GEN"></condition>
<condition type="exclude" startsWith="SEQUENCE"></condition>
</generation-condition>
<business-package default="pet">
<condition type="package" startsWith="PRODUCT" result="product"></condition>
<condition type="package" startsWith="ITEM" result="product"></condition>
</business-package>
<enrichment>
<conventions>
<entity-naming-convention type="apply-strip-table-name-prefix" pattern-to-strip="SYS,FIN"/>
<reference-naming-convention type="apply-referenced-alias-when-no-ambiguity" is-to-plurialize="true"></reference-naming-convention>
</conventions>
<package name="product">
<entity-group entities="PRODUCT"></entity-group>
<entity-group entities="ITEM"></entity-group>
</package>
<entity name="PRODUCT" alias="MY_GOOD_PRODUCT">
</entity>
<entity name="ITEM" alias="MY_GOOD_ITEM" comment="my item table">
<field name="PRODUCTID" alias="THIS_IS_MY_PRODUCT" comment="my product field reference"></field>
</entity>
<entity name="CATEGORY" content-type="reference-data" >
<field name="DESCRIPTION" ordering="asc" label="my description" is-searchable="true"></field>
<field name="NAME" ordering="asc" ></field>
<semantic-reference>
<sql-path path="NAME"/>
</semantic-reference>
</entity>
</enrichment>
</business-model>
<statement-model>
<queries>
<query name="get address abstract" id="dashAddress" type="dashboard" category="pie-chart">
<query-body> <!-- dimensions column first -->
<value>
<![CDATA[select city, count(*) as nb from address group by city order by count(*) desc limit ? ]]>
</value>
</query-body>
<query-params>
<query-param name="top city" is-mandatory="false" type="INT" sample="37" default="10"></query-param>
</query-params>
</query>
<query name="get address summary" id="dashCity" type="dashboard" category="bar-chart">
<query-body> <!-- dimensions column first -->
<value>
<![CDATA[select city, count(*) as nb, count(*) as nb2 from address group by city order by count(*) desc]]>
</value>
</query-body>
</query>
<query name="get addresses by criteria" id="c">
<query-body><value>
<![CDATA[select * from address where lcase(city) like ?]]>
</value>
</query-body>
<query-params>
<query-param name="city" type="STRING" sample="'S'" convert="lowercase,append%" default="%">
</query-param>
</query-params>
</query>
</queries>
</statement-model>
</model>
</pre>
The database driver is mysql and the primary key strategy is autoincrement for not natural primary key<br />
Product and Item tables have been aliased<br />
Product and Item tables goes in product package, which means graphically a distinct menu access.<br />
Category is a reference-data table, which means caching and access via drop down list<br />
<br />
<b>Statement:</b><br />
Misc statement queries can be used to produce report in forms of list, pie-chart, bar-chart.<br />
<h4>
Generate</h4>
Copy the file in $MP_HOME/mywork/config
From a prompt run
<br />
<pre class="xml" name="code">$model-generation mp-config-JSF-Spring.xml
</pre>
<h4>
Build </h4>
The generation result is in $MP_HOME/dev/JSF/petshop
From a prompt run
<br />
<pre class="xml" name="code">$mvn clean package
</pre>
<h3>
Customise package for cloudbees</h3>
<mp_home><mp_home></mp_home></mp_home><br />
<h4>
Cloudbees context</h4>
<i><u>Optional step to perform if your not creating the binding between the Application and DB.</u></i><br />
<br />
Add a Cloudbees file context.xml<br />
<br />
<generated-war>In /WEB-INF/lib a</generated-war>dd context.xml in war/META-INF<br />
<pre class="xml" name="code"><Context>
<Resource name="jdbc/petshopAppDS"
auth="Container"
type="javax.sql.DataSource"
url="jdbc:${DATABASE_URL}"
username="${USER_NAME}"
password="${PASS_WORD}"
driverClassName="com.mysql.jdbc.Driver"
maxActive="20"
maxIdle="1"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
validationQuery="SELECT 1"
testOnBorrow="true"
/>
</Context>
</pre>
<h4>
<div style="font-weight: normal;">
The ${DATABASE_URL} is retrieved from </div>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
<pre class="xml" name="code">$bees db:info petshopapp</pre>
</div>
</h4>
<h4>
Persistence.xml</h4>
adapt persistence.xml with Cloudbees binding alias<br />
change <b>non-jta-data-source</b> node with java:comp/env/jdbc/petshopAppDS<br />
remove properties hibernate connection info<br />
<br />
The persistence.xml is located in petshopBackEnd-1.0-SNAPSHOT.jar!/META-INF<br />
<br />
<pre class="xml" name="code"><?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!--MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @PERSISTENCE-UNIT-petshop@-->
<persistence-unit name="petshop">
<!--MP-MANAGED-UPDATABLE-ENDING-->
<non-jta-data-source>java:comp/env/jdbc/petshopAppDS</non-jta-data-source>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- pet -->
<class>net.sf.mp.demo.petshop.domain.pet.Address</class>
<class>net.sf.mp.demo.petshop.domain.pet.Category</class>
<class>net.sf.mp.demo.petshop.domain.pet.Sellercontactinfo</class>
<class>net.sf.mp.demo.petshop.domain.pet.Tag</class>
<class>net.sf.mp.demo.petshop.domain.pet.Ziplocation</class>
<!-- product -->
<class>net.sf.mp.demo.petshop.domain.product.MyGoodItem</class>
<class>net.sf.mp.demo.petshop.domain.product.MyGoodProduct</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider" />
<property name="net.sf.ehcache.configurationResourceName" value="/ehcache.xml" />
<property name="hibernate.cache.use_query_cache" value="true" />
<property name="hibernate.cache.use_second_level_cache" value="true" />
<!--MP-MANAGED-ADDED-AREA-BEGINNING @properties@-->
<!--MP-MANAGED-ADDED-AREA-ENDING @properties@-->
</properties>
<!--MP-MANAGED-ADDED-AREA-BEGINNING @persistence-unit@-->
<!--MP-MANAGED-ADDED-AREA-ENDING @persistence-unit@-->
</persistence-unit>
<!--MP-MANAGED-ADDED-AREA-BEGINNING @persistence@-->
<!--MP-MANAGED-ADDED-AREA-ENDING @persistence@-->
</persistence>
</pre>
<br />
<h2>
Deploy</h2>
<div>
<pre class="xml" name="code">$bees app:deploy -a account/petshopapp -t tomcat7 JSF/target/petshopApp.war</pre>
</div>
<div>
where <b>account </b>is the account you created<br />
<br />
Tomcat7 target ensure the EL libraries are present. </div>
<h2>
Result</h2>
<div>
The result can be viewed at <a href="http://petshopapp.minuteproject.cloudbees.net/">http://petshopapp.minuteproject.cloudbees.net/</a></div>
<div>
<br />
<h2>
Improvements</h2>
For those who think it's a bit long, <b>they are right!</b><br />
Most of the step could be simplified since most of it could be generated!<br />
<br />
Minuteproject will add a <b>cloud</b> track with cloudbees for that in the next release.<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com1tag:blogger.com,1999:blog-8723196641810122152.post-66053226100248675142013-04-29T03:00:00.001-07:002013-04-29T04:44:38.215-07:00call for web designersMinuteproject generates admin webapps for couple of technologies:<br />
<ul>
<li><a href="http://primefaces.org/">primefaces</a></li>
<li><a href="http://www.openxava.org/">openxava</a></li>
<li><a href="http://www.grails.org/">grails</a></li>
<li><a href="http://www.playframework.com/">playframework</a></li>
</ul>
Minuteproject core concern is to quickly generate application based on your model. Those application can be rapidly deployed on your own infrastructure or on a cloud platform.<br />
<br />
Sample minuteproject generated apps on Cloudbees can be found at<br />
<a href="http://petshopapp.minuteproject.cloudbees.net/">http://petshopapp.minuteproject.cloudbees.net</a> for primefaces<br />
<a href="http://petshopox.minuteproject.cloudbees.net/xava/homeMenu.jsp">http://petshopox.minuteproject.cloudbees.net/xava/homeMenu.jsp</a> for OX<br />
<br />
<br />
The result front-end is a default one and web design needs to be improved.<br />
<br />
So for web designers that want to:<br />
<ul>
<li>gain publicity (have their contribution reference on the distributed web app)</li>
<li>contribute to OS project</li>
<li>get out of the box a working backend to start their job</li>
</ul>
Feel free to contact <a href="mailto:minuteproject@gmail.com">minuteproject@gmail.com</a><br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com1tag:blogger.com,1999:blog-8723196641810122152.post-47111415849967612472013-02-28T13:01:00.001-08:002013-02-28T13:01:58.128-08:00Minuteproject as a workspace<br />
<h2>
HOW-TO EXTEND MINUTEPROJECT</h2>
If you want to create your own generation based on the database, this article will guide you step by step. Here are the main elements to create a workspace in order to extends minuteproject with your own templates, libraries, and plug-in.<br />
<h2>
Minuteproject as a workspace</h2>
<ul>
<li><span style="background-color: white;">unzip MP into <mp-as-a-workspace><br /></mp-as-a-workspace></span></li>
<li><span style="background-color: white;">create an eclipse java project on <mp_home>/mywork</mp_home></span></li>
<ul>
<li><span style="background-color: white;">add the libraries</span></li>
<ul>
<li><span style="background-color: white;">In eclipse go: Project>Properties>Java build Path </span><span style="background-color: white;"><span style="background-color: white;">under Libraries tab </span>and add the jar from</span><span style="background-color: white;"><span style="background-color: white;"> <mp-as-a-workspace></mp-as-a-workspace></span>/application/lib and the jdbc driver under </span><br /><span style="background-color: white;"><span style="background-color: white;"><mp-as-a-workspace></mp-as-a-workspace></span>/application/lib/extra</span></li>
</ul>
<li><span style="background-color: white;"> add sources </span></li>
<ul>
<li><span style="background-color: white;">by default eclipse create a source (src) directory. You can keep it if you want to write your own plugin for your template</span></li>
<li><span style="background-color: white;">add the template metadata folder in </span><span style="background-color: white;">Project>Properties>Java build Path under the Source tab point to </span><span style="background-color: white;"><mp-as-a-workspace>/mywork/config</mp-as-a-workspace></span></li>
</ul>
</ul>
</ul>
<h3>
Explanation</h3>
Where goes your development:<br />
<ul>
<li><span style="background-color: white;">java/groovy plugin (a plugin is just a java bean class) goes in your source directory /src (to create)</span></li>
<li><span style="background-color: white;">velocity templates goes in /template (directory already present)</span></li>
<li><span style="background-color: white;">template metadata xml goes in mywork/config directory.</span></li>
</ul>
<span style="background-color: white;">Now you can run a minuteproject configuration from you eclipse workspace. </span><br />
<h2>
<span style="background-color: white;">Test</span></h2>
<span style="background-color: white;">Create a configuration (if you do not know you can copy one from /demo/config) into mywork/config. Example mp-config-fitnesse.xml</span><br />
<br />
In eclipse<br />
<ul>
<li><span style="background-color: white;">Add a configuration in eclipse </span></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLbhc6gv0kjc4yXNKClcLhqEzLkIu2nLdHR13YV84jjfRjfIvTcUHq4Ieh4EKCAUW2AzM08PPe9s-Snodb2g5Ud8lvP3WIwGQZbtgT8VbHsQI6-X9iVyODjQL1RSzaJXyZWydWwJhsQl0/s1600/mpaaw-run.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLbhc6gv0kjc4yXNKClcLhqEzLkIu2nLdHR13YV84jjfRjfIvTcUHq4Ieh4EKCAUW2AzM08PPe9s-Snodb2g5Ud8lvP3WIwGQZbtgT8VbHsQI6-X9iVyODjQL1RSzaJXyZWydWwJhsQl0/s320/mpaaw-run.png" width="320" /></a></div>
<ul>
<li>Add in the argument tab mp-config-fitnesse.xml</li>
</ul>
<ul>
<li>Click run</li>
</ul>
<br />
<ul>
</ul>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-48482467033984726522012-09-06T06:34:00.000-07:002012-09-10T04:53:14.375-07:00Adding MP 4 ADF-BC-SDO track<h2>
Intro</h2>
In order to add a new track on minuteproject we have to understand the target architecture, the target architecture artifacts and the link between them.<br />
This article focuses on what contains ADF Faces project for manipulating (CRUD) RDBMS contains, and how are ADF Faces artifacts reference each other.<br />
The goal is to provide a MP 4 ADF roadmap: to have an ADF application very quickly based on reverse-engineering facilities of minuteproject using some navigation defaulting.<br />
On top of this a <a href="http://wiki.eclipse.org/EclipseLink/FAQ/WhatIsSDO">SDO</a> stack can also be generated.<br />
<u><b>This is a lean process so, comments are welcomed!</b></u><br />
<h2>
</h2>
<h2>
Context</h2>
I am a ADF newbie so point discussed here might changed.<br />
I start from what is generated by JDeveloper and follow the <a href="http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm">tutorials</a> to create an ADF web app.<br />
<h2>
</h2>
<h2>
ADF Model Artifact Overview</h2>
When create a webapp 2 ADF projects are created: Model and ViewControler.<br />
This part focuses on the model artifacts.<br />
The following artifacts are placed under the technical package 'model'.<br />
The overview help defining the minuteproject artifact metadata. <br />
<h3>
AppModule.xml</h3>
It catalogs the views and view links usage.<br />
One Artifact per model, and has a fix name. <br />
<h3>
<entity>Entity.xml</entity></h3>
Holds the description of the database entity, mapping information, keys with validation, accessorAttributes. Can be considered to some extends as Domain Objects.<br />
It is per DB entity, it does not depend of other xml artifacts.<br />
Can sometimes reference <entity>Impl.java that gives custom implementation.</entity><br />
<h3>
<view>View-name.xml</view></h3>
Correspond to a access (select) of some Domain Object, contains view attributes.<br />
It depends on <entity>.xml, it is referenced by AppModule.xml</entity><br />
Multiple view can exist for an entity. So the question is how to deduce the name of the view.<br />
The view can be deduced:<br />
<ul>
<li>a default one: with all selection</li>
<li>a reference one: based on the semantic reference of the entity</li>
<li>search ones: based on the fact that a field is searchable (entity enrichment in MP).</li>
</ul>
<h3>
<relationship>Assoc.xml</relationship></h3>
Define a relationship between entity, master part, cardinality...<br />
Is dependent on the <entity>.xml</entity><br />
One per relationship <br />
<h3>
<viewlink>View-link.xml</viewlink></h3>
Define the view of the <relationship>Assoc.xml. </relationship><br />
One per <relationship>Assoc.xml file.</relationship><br />
Referenced in AppModule.xml<br />
<h3>
Bundles artifacts for views </h3>
View can have bundles for internationalisation <br />
<h3>
Other artifacts</h3>
Model.jpx<br />
ModelBundle.properties<br />
<br />
<br />
<h2>
ViewController artifacts overview</h2>
<span style="background-color: red;"></span><br />
<span style="color: red;">Todo</span><br />
<h2>
SDO artifacts overview</h2>
<h3>
<span style="color: red;"><span style="color: black;">At the view Level</span></span></h3>
<h4>
View-nameSDOImpl.java</h4>
Linked to the view-name.xml<br />
<h4>
View-nameSDO.java</h4>
Linked to the view-name.xml<br />
<h4>
View-nameSDO.xsd</h4>
Linked to the view-name.xml<br />
<br />
<br />
<h3>
Service interface</h3>
At the application level<br />
<h4>
AppModuleServiceImpl.java</h4>
Java class <br />
Stateless webservice done with EJB and Oracle annotations <br />
<h4>
AppModuleService.java</h4>
Java interface<br />
JAX-WS annotation<br />
Defines methods of WS <br />
<h4>
AppModuleService.wsdl</h4>
Wsdl containing messages, portType, binding, services <br />
Importing static schema as well as AppModuleService.xsd<br />
<h4>
AppModuleService.xsd</h4>
xsd that import static oracle xsd as well as view-nameSDO.xsd<br />
defines types used in AppModuleService.wsdl<br />
<br />
<h2>
ADF artifacts</h2>
<span style="color: red;">Todo</span><br />
<h4>
</h4>
<h2>
References </h2>
<a href="http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm">http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm</a><br />
<br />
<a href="http://www.oracle.com/technetwork/developer-tools/adf/documentation/adf-faces-rc-demo-083799.html">http://www.oracle.com/technetwork/developer-tools/adf/documentation/adf-faces-rc-demo-083799.html</a><br />
<br />
<a href="http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html">http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html</a><br />
<a href="http://www.blogger.com/goog_1065978523"><br /></a>
<a href="http://go2kavinkumar.wordpress.com/2011/08/28/using-viewcriteria-in-find-operation-of-adf-bc-service/">http://go2kavinkumar.wordpress.com/2011/08/28/using-viewcriteria-in-find-operation-of-adf-bc-service/</a><br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com0tag:blogger.com,1999:blog-8723196641810122152.post-24311179889507836872012-08-17T05:55:00.000-07:002012-08-27T04:13:47.269-07:00sql query to primefaces app with sdd<h2>
Intro</h2>
<a href="http://primefaces.org/">Primefaces </a>provides cool rendering facilities on one hand.<br />
<a href="http://minuteproject.sf.net/">Minuteproject</a> provides reverse-engineering facilities base on relational database but also on <a href="http://minuteproject.blogspot.be/2012/05/statement-driven-development.html">sql statement</a>, on the other hand.<br />
<br />
<b>Now you have a query and you want to have a primefaces app!... without writing any (ANY) line of code.</b><br />
<b>This article is for YOU.</b><br />
<br />
If you download Minuteproject 0.8.2+ you can have an example on how-to do it (delivered as a demo).<br />
This article tracks the steps to follow as well as explaining the demo.<br />
<br />
<h2>
Enrichment</h2>
You can consult the entire configuration in <mp_home>/demo/config/mp-config-JSF-Spring.xml</mp_home><br />
<h3>
statement-driven-development </h3>
Minuteproject provides a enrichment area where you can set up your sql queries.<br />
Here is the snippet part correspondinng to the query enrichment inside the statement-model node. <br />
<br />
<pre class="xml" name="code"> ....
<statement-model>
<queries>
<query name="get addresses by criteria" id="c">
<query-body><value>
<![CDATA[select * from address where latitude between ? and ? and longitude between ? and ? and lcase(city) like ?]]>
</value></query-body>
<query-params>
<query-param name="latitude_lower_limit" is-mandatory="false" type="DOUBLE" sample="37"></query-param>
<query-param name="latitude_upper_limit" type="DOUBLE" sample="38"></query-param>
<query-param name="longitude_lower_limit" type="DOUBLE" sample="-122"></query-param>
<query-param name="longitude_upper_limit" type="DOUBLE" sample="-123"></query-param>
<query-param name="city" type="STRING" sample="'S'" convert="lowercase,append%" default="%"/>
</query-params>
</query>
</queries>
</statement-model>
</model>
</pre>
<br />
You specify the name of the query which will be used to create<br />
<ul>
<li>DTO class</li>
<li>JSF menu entry</li>
<li>JSF URL</li>
<li>JSF form name </li>
</ul>
You specify in question marks the input parameters you want and in query-param what is the name to give them. Those name with be used to create<br />
<ul>
<li>DTO variable</li>
<li>JSF form entries with validation</li>
</ul>
<h3>
Empower primefaces with minuteproject sdd templates </h3>
Primefaces needs to have new templates about what to generate coming from SDD.<br />
This is given in the track <br />
<pre class="xml" name="code"> <target refname="SDD-beans"
outputdir-root="../output/JSF-Spring/JPA2"
fileName="mp-template-config-SDD-beans.xml"
templatedir-root="../../template/framework/bean">
</target>
</pre>
<h2>
</h2>
<h2>
Steps</h2>
<h3>
Set-up</h3>
<ul>
<li>Download last version of Minuteproject.</li>
<li>Unzip in <mp_home> directory</mp_home></li>
<li>Start sample petshop DB: <mp_home>/sample/start-petshop-database.cmd/sh</mp_home></li>
<li>Go to <mp_home>/config/demo</mp_home></li>
<ul>
<li>Run demo-JSF-Spring-primefaces.cmd/sh</li>
</ul>
<li>Go to <mp_home>/target/mp-bsla</mp_home></li>
<ul>
<li>Run install-maven.cmd (it installs a MVN dependency for spring DAO that is not yet (sic) in mvn-central)</li>
</ul>
<li>Go to <mp_home>/demo/output/JSF-Spring</mp_home></li>
<ul>
<li>Run 'mvn clean package'</li>
</ul>
</ul>
Alternative run all demos<br />
<ul>
<li>Run all <a href="http://minuteproject.wikispaces.com/Demos">demos and package</a>.</li>
</ul>
<h3>
</h3>
<h3>
Generated code</h3>
You have a JSF primeface 3.3 app with cupertino theme offering Create, List, Delete on entities and with I/O screen of each query here (GetAddressesByCriteriaInput).<br />
<br />
The generated code is decomposed into 3 maven project:<br />
<ul>
<li>You have JPA2 backend+ DTOs for each SDD query I/O</li>
<li>You have Spring 3 integration with CRUD DAO on top of entity and DAO for SDD query DTOs. </li>
<li>You have a JSF front-end integrated with spring</li>
</ul>
This way you can easily work with minuteproject <a href="http://minuteproject.wikispaces.com/Updatable_Generated_Code">Updatable Code feature</a> to get what you customize your artifact without losing the power of consecutive generations. <br />
<h3>
Deployment</h3>
<h4>
Setup </h4>
The resulting application is <b>petshopApp.war</b> in <mp_home>/demo/output/JSF-Spring/JSF/target </mp_home><br />
It is ready to be dropped on tomcat or other JEE container.<br />
<br />
But before take care that your EL (expression language jar spec and impl) are 2.2.<br />
On tomcat (check that <tomcat_home>/lib contains </tomcat_home><br />
<ul>
<li>el-api-2.2.jar</li>
<li>el-impl-2.2.jar</li>
</ul>
Check the stackoverflow entries<br />
<ul>
<li><a href="http://stackoverflow.com/questions/7565431/unable-to-start-with-primefaces">http://stackoverflow.com/questions/7565431/unable-to-start-with-primefaces</a></li>
<li><a href="http://stackoverflow.com/questions/11680141/maven-jsf-primefaces-el-nullpointerexception-relating-to-the-primefaces-balises">http://stackoverflow.com/questions/11680141/maven-jsf-primefaces-el-nullpointerexception-relating-to-the-primefaces-balises</a></li>
</ul>
Note: that there is no connection pool dependency on the container. By default in nothing is specified in the JPA2 target 'environment' property. The environment is considered has local so no reference to a JNDI CP.<br />
<h4>
Deploy</h4>
Start tomcat (<tomcat_home>/bin/startup.cmd/sh)</tomcat_home><br />
Drop <b>petshopApp.war </b>in <tomcat_home>/webapps</tomcat_home><br />
<h2>
</h2>
<h2>
Result</h2>
Here is a little UC where we create an address and we retrieve it base on the ad-hoc sdd query.<br />
<h3>
Create address</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYVlaU9qfOzZh5HT2Rh2RYax-XZX6DV1W56np_5Ohbk_TqUjECYUiscUzfc5Z_l56GH30HLbyvHh3JBLJsT_KWd_IigIUCNKBHtbdle418cnrn6U1y2hUV_VVOAk-6OH1lPTbKTAhONck/s1600/sdd-primefaces-create-new-address.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="632" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYVlaU9qfOzZh5HT2Rh2RYax-XZX6DV1W56np_5Ohbk_TqUjECYUiscUzfc5Z_l56GH30HLbyvHh3JBLJsT_KWd_IigIUCNKBHtbdle418cnrn6U1y2hUV_VVOAk-6OH1lPTbKTAhONck/s640/sdd-primefaces-create-new-address.png" width="640" /></a></div>
<h3>
List addresses</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrcyZNb1gZByCSHyAjmC8bD-i4-OtFTe36tgiv8zOcpumH7SoqtEjh4YoBH0IMZ3xOB_t2lqidWcJ-n0T9XKWXHi5-H3hIHlHyWoN7DJeFIIyXxeeGo_iQK3uebehuHWejUIyjGdO54pY/s1600/sdd-primeface-add-entry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="564" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrcyZNb1gZByCSHyAjmC8bD-i4-OtFTe36tgiv8zOcpumH7SoqtEjh4YoBH0IMZ3xOB_t2lqidWcJ-n0T9XKWXHi5-H3hIHlHyWoN7DJeFIIyXxeeGo_iQK3uebehuHWejUIyjGdO54pY/s640/sdd-primeface-add-entry.png" width="640" /></a></div>
<h3>
SDD in action: Use specific criteria to address</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwTNrmN1zvbPaeRf0ZiOLsOJ8tjCpW7663Tgt86z5uD3gs46bNY6rdsghgzcaceik6AOEdTbzGTqbGgHrOImg2jG5j5YO-kxt8W_ljpuZcvYcPSjFnd3zVcJ32uB6epJe-iNQ4pSawri4/s1600/sdd-primefaces-IO.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwTNrmN1zvbPaeRf0ZiOLsOJ8tjCpW7663Tgt86z5uD3gs46bNY6rdsghgzcaceik6AOEdTbzGTqbGgHrOImg2jG5j5YO-kxt8W_ljpuZcvYcPSjFnd3zVcJ32uB6epJe-iNQ4pSawri4/s640/sdd-primefaces-IO.png" width="640" /></a></div>
<h3>
Check validation</h3>
<h3>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiueb7k2lPW9bWilf6Bo9-XU_CmYcqthFkFhf5MSqNGHrCJGRzoPTl4JqRhsfgfai0bwgzwxtEfJIleSpkIQnB6olx_jt9JL0rM3DHbgvJ4ymf7ImIgDWfW5QIMNFMCyPme2oCnFuRRLmY/s1600/sdd-primefaces-IO-validation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiueb7k2lPW9bWilf6Bo9-XU_CmYcqthFkFhf5MSqNGHrCJGRzoPTl4JqRhsfgfai0bwgzwxtEfJIleSpkIQnB6olx_jt9JL0rM3DHbgvJ4ymf7ImIgDWfW5QIMNFMCyPme2oCnFuRRLmY/s640/sdd-primefaces-IO-validation.png" width="640" /></a></h3>
<h3>
</h3>
<h2>
</h2>
<h2>
Future</h2>
This is not enough...<br />
Why not having multiple statement that works together to produce for example a master-detail or dashboard-master-detail?... primefaces provides nice toolset for that.<br />
<br />
Break current limitations<br />
<ul>
<li>SDD in the current form is sql oriented, but nothing prevent from having it REST URL resource oriented.</li>
<li>Add validations, mapping, convertions on I/O params.</li>
<li>Provide presentation defaulting</li>
<li>Provide navigation between SDD components </li>
<li>Add filtering and improved query builder</li>
</ul>
Anonymoushttp://www.blogger.com/profile/04083442568354390924noreply@blogger.com1