1 Reply Latest reply on Aug 19, 2009 12:58 AM by asookazian

    Seam Patterns - Archtecture

    soares

      Hi,


      I now that Seam samples give us a lot of diferent standards and Seam application implementation, but
      I have some doubts which I describe as follows:


      - What is the best pattern to use when I need to create Business Objects for business logic and DAOs to encapsulte my JPA queries? It is better to create Seam components
      or just create simple Java classes that receives the EntityManager as parameter?


      - If I use Seam components in the first question and I need to execute atomic operations with BOs or DAOs, how should be the bet way to do that, to safely guarantee the atomic persistence?


      - Finally, using Seam what are the best architecture to use? I.E.: View --> Seam POJO --> Business Object --> DAO --> EntityManager


      Thank you!

        • 1. Re: Seam Patterns - Archtecture
          asookazian

          soares gouveia wrote on Aug 18, 2009 19:42:



          - Finally, using Seam what are the best architecture to use? I.E.: View --> Seam POJO --> Business Object --> DAO --> EntityManager

          Thank you!


          There is no best architecture or design pattern combination.  It depends on the project.  If you read the J2EE without EJB book by Rod Johnson, for example, he states that if you don't have a lot of business logic and it's mostly CRUD in your app, then why do you need DAO layer.  Seam is cool because it doesn't force you to overcomplicate your architecture unless you need/want to...