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!

