Maintain many tables - reuse?


EJB design: Maintain many tables - reuse?

  1. Maintain many tables - reuse? (2 messages)

    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.


    Threaded Messages (2)

  2. Correction[ Go to top ]

    Rather than View Object I meant Value Object
  3. 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