Design issue concerning beans, form beans and maps

Hi everybody. As I am new to this forum, I introduce myself first: I'm Alessio, from Venice, Italy. I am currently developing my first application using struts, actually struts 1.3.8, on persistence layer I do use Ibatis, while the whole web app runs on apache tomcat. I have a "design question" that goes like this: how should I use pojo beans in my application? I try to explain: for "data entry" purpose I use form beans, for "data displaying" I actually work better defining some maps and presenting the output..so... how/where should I use the beans that actually, as stated on chcuk cavaness book, build up the model layer? I employed three layer:

INPUT (insert, update) case:

1) "actions" layer: it receives the input form (if any) and passes it to the service layer

2) "service" layer: it receives the input form, translate it into a bean and invokes a dao for each bean involved

3) "dao" layer: it receives the bean and write it to db.

OUTPUT (read) case:

1) dao builds up a map and passes it to service layer

2) service layer performs some adjustments (say: date formatting, etc) and passes map to the action layer

3) action layer puts map in request.

Is this design correct, or not? Thanks a lot to everyone that will provide some information!

[1317 byte] By [nikonmana] at [2007-11-27 6:44:10]
# 1

Sounds simple & straight in terms of maintainance and profiling constraints.But to be frank one can never really comment on the design part of any project because it completely depends upon their set requirements,performance concerns and ultimately size of your project.

To be more frank i work on a similar project too.But as i said earlier Patterns change depending on the way U want the application to perform and it to be maintained.

In Specific to Struts check of the below links which most of the people follow.

http://cpd.ogi.edu/seminars04/tyhurstseminar_files/frame.htm

http://kuchipudi.biz/eadbestpractices.html

http://www.javaworld.com/javaworld/jw-09-2004/jw-0913-struts.html

http://ajug.org/meetings/download/Struts_DC2005.pdf

http://publib.boulder.ibm.com/infocenter/wsadhelp/v5r1m2/topic/com.ibm.etools.struts.doc/topics/cstrdoc001.html

http://www.ibm.com/developerworks/web/library/wa-struts/

and i still get back 2 classic J2EE patterns which still address issues in our day to day devolopment of a typical web application

http://java.sun.com/blueprints/patterns/catalog.html

RahulSharnaa at 2007-7-12 18:15:20 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...