Hi, I am building a medium size struts application (40-60 jsp pages) in a team.
my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>