Hi Vineet,
I've published the blog :
http://antoniogoncalves
.org/2013/10/29/several-architectural-styles-with-java-ee-7/
I've implemented the three different architectural styles and you can have
a look at :
https://github.com/agoncal/agoncal-sample-javaee/tree/master/03-
TierArchitecture
Unfortunately I still have an issue with the RESTendpoint doing a paginate
(I've asked some help in the jersey mailing list, but still no news, you
can have a look at :
https://java.net/projects/jersey/lists/users/archive/2013-10/message/64
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 :
https://issues.jboss.org/browse/FORGE-944)
* Horizontal :*
- jpa-scaffold-from-database
- jsf-scaffold-from-entity
- rest-scaffold-from-entity
*EJB Centric :*
- jpa-scaffold-from-database
- ejb-scaffold-from-entity
- jsf-scaffold-from-ejb
- rest-scaffold-from-ejb
*REST centric :*
- jpa-scaffold-from-database
- rest-scaffold-from-entity
- jsf-scaffold-from-rest
If that interests you, I would be more than happy to contribute to
something like that.
Antonio
2013/10/21 Vineet Reynolds Pereira <vpereira(a)redhat.com>
----- Original Message -----
> From: "Antonio Goncalves" <antonio.mailing(a)gmail.com>
> To: "forge-dev List" <forge-dev(a)lists.jboss.org>
> Sent: Monday, October 21, 2013 2:09:41 PM
> Subject: [forge-dev] Several architectural styles in Forge (was
Wondering about coding convention)
>
> 2013/10/21 Vineet Reynolds Pereira < vpereira(a)redhat.com >
>
>
>
>
>
> IMHO we should not be putting persistence concerns in either the JSF
beans or
> the REST resources.
> They should go into a service or a repository or whatever data access
pattern
> is suitable for the context.
> 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.
>
>
> Vineet, this is the topic I'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's where I thing Forge should give some
> choices. What I'm writing is about having 3 different architectural
styles
> that could be resume like this (using CLI) :
>
> Current (generates JSF/REST from entities) :
> jsf-scaffold-from-entity
> rest-scaffold-from-entity
>
> EJB Centric (add a service layer to deal with persistence) :
> ejb-scaffold-from-entity
> jsf-scaffold-from-ejb
> rest-scaffold-from-ejb
>
> REST centric (the JSF backing beans use the REST endpoint, using JAX-RS
2.0
> Client API) :
> rest-scaffold-from-entity
> jsf-scaffold-from-rest
>
Very interesting. I was about to suggest linking any work in this space
with FORGE-944.
Overall, I get the impression that we should structure commands based on
developer workflows given common architectural styles.
I'll await your post.
>
> I will let you know when the post is written, it will be clearer
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
>
> _______________________________________________
> forge-dev mailing list
> forge-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/forge-dev
_______________________________________________
forge-dev mailing list
forge-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev
--
Antonio Goncalves
Software architect and Java Champion
Web site <
http://www.antoniogoncalves.org/> |
Twitter<http://twitter.com/agoncal>
| LinkedIn <
http://www.linkedin.com/in/agoncal> | Paris
JUG<http://www.parisjug.org/>
| Devoxx France <
http://www.devoxx.fr/>