Discussions

EJB design: Suggessions on using Design patterns

  1. Suggessions on using Design patterns (5 messages)

    I've decided to do a project on Human Resource using struts,ejb and oracle as database. But I am not sure what are all the design patterns to use. Can anyone suggest me a good design using patterns.
    Thanks in advance.

    Rgs,
    Philip.

    Threaded Messages (5)

  2. Suggessions on using Design patterns[ Go to top ]

    This is a rather difficult question to answer.
    Generally I have seen people make use of the Session Facade patterns for EJBs - MVC for Struts. depending on the complexity service locator, delegates etc may be used too.
  3. u can use multiple[ Go to top ]

    u can break down ur application into different modules (if the requiremnt is big enough) use multiple design pattern depending upon the modules req.
    U can use Session Facade where theres rigerous access to database..
    for more UI based module and less BL use MVC

    http://lokeshpant.blogspot.com
  4. Suggessions on using Design patterns[ Go to top ]

    Use patterns when you have a problem in hand and you know that using a particular patter would be the better way to solve it.

    Dont use patterns for the heck of it.

    Since you are using EJBs, that you could make use of patterns as
    value object pattern - to pass around composite data( for example a User Object instead of passing around name, id,age,dob etc)
    Session Facade - to code your business logic and to reduce call to entities(if at all you use)
    DAO - to access database.
    Service Locator - to locate your EJBs
  5. Design patterns per say are means to solve common recurring problem by identifying and strategically implementing a proven solution technique.

    The following could be a generic design implmentation for a typical architecture.

    WEB TIER
    --------
    1. Struts
    2. Business Delegate
    3. EJB Home factory
    4. Service loacator

    SERVER (BUSINESS & PERSISTENCE)
    ------------------------------
    1. Session/Message facade
    2. Factory (BC Handlers, DTO)
    3. DTO
    4. Data Accessor
    5. DAO
    6. Primary key generation (If needed)
    7. Service locator

    Vijay
  6. DTO + Service Locator + Session Facade + DAO