<div dir="ltr">Hi <span class="" style>Vineet</span>,<div><br></div><div>I&#39;ve published the blog : <a href="http://antoniogoncalves.org/2013/10/29/several-architectural-styles-with-java-ee-7/" target="_blank">http://<span class="" style>antoniogoncalves</span>.org/2013/10/29/several-architectural-styles-with-java-<span class="" style>ee</span>-7/</a></div>

<div><br></div><div>I&#39;ve implemented the three different architectural styles and you can have a look at : <a href="https://github.com/agoncal/agoncal-sample-javaee/tree/master/03-TierArchitecture" target="_blank">https://<span class="" style>github</span>.com/<span class="" style>agoncal</span>/<span class="" style>agoncal</span>-sample-<span class="" style>javaee</span>/tree/master/03-<span class="" style>TierArchitecture</span></a></div>

<div><br></div><div><span class="" style>Unfortunately</span> I still have an issue with the <span class="" style>RESTendpoint</span> doing a paginate (I&#39;ve asked some help in the jersey mailing list, but still no news, you can have a look at : <a href="https://java.net/projects/jersey/lists/users/archive/2013-10/message/64">https://java.net/projects/jersey/lists/users/archive/2013-10/message/64</a></div>
<div><br></div><div>If you look at the code for the three styles, there are not many changes. I would hope that Forge could help developers to generate different architectural styles. As I said, we could do something like this (depending on the future syntax : <a href="https://issues">https://issues</a>.<span class="" style>jboss</span>.org/browse/FORGE-944)</div>
<div><br></div><div><div><b>
Horizontal :</b></div><div><ul><li><span class="" style>jpa</span>-scaffold-from-database<br></li><li><span class="" style>jsf</span>-scaffold-from-entity<br></li><li>rest-scaffold-from-entity<br></li></ul></div><div><br>
</div><div><b><span class="" style>EJB</span> Centric :</b></div><div><ul><li><span class="" style>jpa</span>-scaffold-from-database<br></li><li><span class="" style>ejb</span>-scaffold-from-entity <br></li><li><span class="" style>jsf</span>-scaffold-from-<span class="" style>ejb</span><br>
</li><li>rest-scaffold-from-<span class="" style>ejb</span><br></li></ul></div>
<div><br></div><div><b>REST centric :</b></div><div><ul><li><span class="" style>jpa</span>-scaffold-from-database<br></li><li>rest-scaffold-from-entity<br></li><li><span class="" style>jsf</span>-scaffold-from-rest<br></li>
</ul></div></div><div>If that interests you, I would be more than happy to contribute to something like that.</div><div><br></div><div>Antonio</div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/10/21 <span class="" style>Vineet</span> Reynolds <span class="" style>Pereira</span> <span dir="ltr">&lt;<a href="mailto:vpereira@redhat.com" target="_blank"><span class="" style>vpereira</span>@<span class="" style>redhat</span>.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Antonio Goncalves&quot; &lt;<a href="mailto:antonio.mailing@gmail.com" target="_blank">antonio.mailing@gmail.com</a>&gt;<br>
&gt; To: &quot;forge-dev List&quot; &lt;<a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a>&gt;<br>
&gt; Sent: Monday, October 21, 2013 2:09:41 PM<br>
&gt; Subject: [forge-dev] Several architectural styles in Forge (was Wondering about coding convention)<br>
&gt;<br>
&gt; 2013/10/21 Vineet Reynolds Pereira &lt; <a href="mailto:vpereira@redhat.com" target="_blank">vpereira@redhat.com</a> &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; IMHO we should not be putting persistence concerns in either the JSF beans or<br>
&gt; the REST resources.<br>
&gt; They should go into a service or a repository or whatever data access pattern<br>
&gt; is suitable for the context.<br>
&gt; This is where we lack any standardization at the moment, and it would be<br>
&gt; better to not limit this exercise to improving the conventions alone, but<br>
&gt; also the architecture.<br>
&gt;<br>
&gt;<br>
&gt; Vineet, this is the topic I&#39;m writing about at the moment. To be honest, I<br>
&gt; quite like to have persistent concerns in JSF beans and REST for certain<br>
&gt; projects... but not all, and that&#39;s where I thing Forge should give some<br>
&gt; choices. What I&#39;m writing is about having 3 different architectural styles<br>
&gt; that could be resume like this (using CLI) :<br>
&gt;<br>
&gt; Current (generates JSF/REST from entities) :<br>
&gt; jsf-scaffold-from-entity<br>
&gt; rest-scaffold-from-entity<br>
&gt;<br>
&gt; EJB Centric (add a service layer to deal with persistence) :<br>
&gt; ejb-scaffold-from-entity<br>
&gt; jsf-scaffold-from-ejb<br>
&gt; rest-scaffold-from-ejb<br>
&gt;<br>
&gt; REST centric (the JSF backing beans use the REST endpoint, using JAX-RS 2.0<br>
&gt; Client API) :<br>
&gt; rest-scaffold-from-entity<br>
&gt; jsf-scaffold-from-rest<br>
&gt;<br>
<br>
</div></div>Very interesting. I was about to suggest linking any work in this space with FORGE-944.<br>
Overall, I get the impression that we should structure commands based on<br>
developer workflows given common architectural styles.<br>
<br>
I&#39;ll await your post.<br>
<div><br>
&gt;<br>
&gt; I will let you know when the post is written, it will be clearer<br>
&gt;<br>
&gt; --<br>
&gt; Antonio Goncalves<br>
&gt; Software architect and Java Champion<br>
&gt;<br>
&gt; Web site | Twitter | LinkedIn | Paris JUG | Devoxx France<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; forge-dev mailing list<br>
&gt; <a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Antonio <span class="" style>Goncalves</span> <br>Software architect and Java Champion<br><br><a href="http://www.antoniogoncalves.org/" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank"><span class="" style>LinkedIn</span></a> | <a href="http://www.parisjug.org/" target="_blank">Pa<span class="" style>ris</span> JUG</a> | <a href="http://www.devoxx.fr/" target="_blank"><span class="" style>Devoxx</span> France</a>
</div></div>