This is exactly the way I'm doing it. But I use guice instead of Spring. > 5. DAOs must "fetch" all needed data (no lazy instatiation from view). I also agree to this since lazy loading is very time consuming. A fetch keyword in the hql query is much faster.
Whats your experience using Spring? What I don't like at Spring is that you have to bind every bean that you want to inject. I also don't like the XML file cause of refactoring and usability(auto completition) problems. On Mon, Jun 8, 2009 at 3:51 PM, DaveMark<djdavem...@yahoo.co.uk> wrote: > > 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 > ------------------------------------------------------------------------------ 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