Hello Everyone,

Re :

> I've not seen much "best practices" type documentation
> for using stripes when a service layer is present and
> you therefore want minimal logic in your web layer &
> action beans.

I happen to be in the middle of glueing Stripes/Spring/JPA together to come up 
with a guide to put in the "User Additions" section of the online docs. I 
recently worked on a large scale project and I'm putting together some "Best 
Practices". It would be good to hear your thoughts when it's ready.

In short it boils down to this :

1. Stripes ActionBeans do there thing
2. SpringInterceptor injects Service objects via @SpringBean
3. Spring is configured to open/commit transactions (rollback if exception) on 
certain Service method naming patterns eg.
find*
update*
save*
4. DAOs are injected into Service objects.
5. DAOs must "fetch" all needed data (no lazy instatiation from view).
6. DAOs use a generic (in the Java 'Generics' sense) base class for all basic 
functionality.

With all that in place you can easily unit test every layer!

I'd then like to add Maven2 into the mix and come up with a 
Stripes-Spring-JPA-Archetype.

Cheers,

DJDaveMark


















_


      

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to