<div dir="ltr">2013/10/21 Vineet Reynolds Pereira <span dir="ltr">&lt;<a href="mailto:vpereira@redhat.com" target="_blank">vpereira@redhat.com</a>&gt;</span><br><div class="gmail_extra"><div class="gmail_quote"><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 class="im"><br>
<br></div>
IMHO we should not be putting persistence concerns in either the JSF beans or the REST resources.<br>
They should go into a service or a repository or whatever data access pattern is suitable for the context.<br>
This is where we lack any standardization at the moment, and it would be better to not limit this exercise to improving the conventions alone, but also the architecture.<br></blockquote><div><br></div><div><br></div><div>
Vineet, this is the topic I&#39;m writing about at the moment. To be honest, I quite like to have persistent concerns in JSF beans and REST for certain projects... but not all, and that&#39;s where I thing Forge should give some choices. What I&#39;m writing is about having 3 different architectural styles that could be resume like this (using CLI) : </div>
<div><br></div><div><b>Current</b> (generates JSF/REST from entities) :</div><div><div>jsf-scaffold-from-entity</div></div><div>rest-scaffold-from-entity<br></div><div><br></div><div><b>EJB Centric</b> (add a service layer to deal with persistence) :</div>
<div>ejb-scaffold-from-entity </div><div>jsf-scaffold-from-ejb</div><div><div>rest-scaffold-from-ejb</div></div><div><br></div><div><b>REST centric</b> (the JSF backing beans use the REST endpoint, using JAX-RS 2.0 Client API) :</div>
<div>rest-scaffold-from-entity</div><div>jsf-scaffold-from-rest</div><div><br></div><div><br></div><div>I will let you know when the post is written, it will be clearer</div><div><br></div></div>-- <br>Antonio Goncalves <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">LinkedIn</a> | <a href="http://www.parisjug.org/" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr/" target="_blank">Devoxx France</a>
</div></div>