Right now I am using Struts2, Spring, and Hibernate. Although the Spring JdbcTemplate is looking better all the time.
I follow this: Action --> Service --> Dao Yes it is more code, but the benefits are in testibility, componentization, and maintenance. I even have this: Action --> Service --> JSP so that I can wrap my business objects instead of adding formatting functionality, etc directly to my nice b.o. pojos. That's just how I do it. > Date: Tue, 24 Feb 2009 07:42:50 -0600 > Subject: Struts 2 Architecture - Best Practices... > From: burtonrho...@gmail.com > To: user@struts.apache.org > > I am curious to know what structure many of you use to organize and > separate your struts apps. I can't seem to find a "standard" in this > regard. I started with a simple application, and of course, it has > grown to where more separation of logic layers is a must. Right now I > have Presentation Layer (jsp & action classes) and a data layer (DAO & > DAO Implementation classes). I am upgrading this application to use > Struts 2, Spring, JPA, & Hibernate. Right now many of my action > classes directly use my dao classes with some exceptions where the > logic was complicated. Is it the general consensus that there should > be NO access to DAO in the Action classes? If so, it seems like this > could create quite a few "Service Layer" classes (perhaps I'm wrong on > this). I know there is no :correct: answer, but would love to hear > from the experts as to what you do in this regard. > > Also, would love to know any naming conventions or class organization > structure you use (e.g. com.[company].action.*,. > com.[company].service.*,. com.[company].entity.*,. > com.[company].doa.*, etc) . > > Many thanks! > > Burton > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Access your email online and on the go with Windows Live Hotmail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Access_022009