I am trying to come up with the best pattern to use in a situation where I need to make forms to maintain (view, add, update delete) 9 tables in a database. I am looking for a way to do a lot of reuse. I currently have for each table:
4 Command classes (view, update, create, delete)
1 ViewBean (This could probably be used for all tables instead of 1 each)
1 View Object (basically holds 1 row of the table)
1 PO - Stateless Session EJB (methods - view, update, create, delete)
1 Facade - Stateless Session EJB (methods - update, create, delete)
1 Entity EJB
1 JSP
And I also have 1 DAO for all the tables.
Thanks!
-
Maintain many tables - reuse? (2 messages)
- Posted by: David S
- Posted on: January 27 2005 10:31 EST
Threaded Messages (2)
- Correction by David S on January 27 2005 11:13 EST
- RE: Maintain many tables - Use Code Generation by Andy Grove on January 30 2005 16:29 EST
-
Correction[ Go to top ]
- Posted by: David S
- Posted on: January 27 2005 11:13 EST
- in response to David S
Rather than View Object I meant Value Object -
RE: Maintain many tables - Use Code Generation[ Go to top ]
- Posted by: Andy Grove
- Posted on: January 30 2005 16:29 EST
- in response to David S
You could use a code generator such as FireStorm/DAO to generate your DAO and Form code automatically from your data model. It can also generate your stateless session beans facades.
Andy Grove
CTO, CodeFutures Software