5 Replies Latest reply on Jan 16, 2007 9:09 AM by Jonatas Wingeter Rodrigues

    Seam coupling

    Jonatas Wingeter Rodrigues Newbie


      I'm designing the actual system of my enterprise.

      Now, we've application developed with JSF and DAO.

      Due to the session JSF management problems (business process, http session overusing, state, etc), we has decided to find out and implement a solution to use persistance data and business logic layer with EJB3.

      Studying the Seam framework, I perceived that it couples low the Session Bean EJB and other beans, if needed. Therefore, it looked me that JSF has implicit high coupling, cause the jBPM and jsf pages use directly access to the actions.

      If in the future, we decided to change the presentation tier (JSF to Struts, example). Can Seam offers a solution and headache low to change it? or should I change all the session beans, decopling Seam and implement third-part solution?


        • 1. Re: Seam coupling
          Pete Muir Master

          Seam certainly decreases the amount of abstraction required, but not really by increasing the coupling, but by hiding most of the glue away in the framework (where it belongs) than in the business classes.

          Seam means that the coupling between the business layer and the presentation layer is low (I mean at some point you have to actually connect the presentation layer and the business layer, no matter how many layers you put in the way).

          I think it would be fair to say that Seam promotes a simple (i.e. very few layered) design, but still makes possible a traditional layered design (but be prepared for people to go What?? Why??? ;) ).

          But I'm sure others can write this more eloquently than me :)

          • 2. Re: Seam coupling
            Jonatas Wingeter Rodrigues Newbie

            Hi Petemuir,

            Thank for your post.

            I thought that the issue is: can seam connects other kinds of presentation layer?

            Imagine that we've a pet story designed with JSF, Seam and some persistence layer. The client must check the feed by cell phone, for example. Could seam abstract the presentation layer and change it (swing)?
            In this case, I guess (not sure) the seam couldn't be used, or the classes should be redesigned, abstracting business layer (from Session Bean) to separated layer and connect it to seam design, permitting both mobile and web clients.
            If it couldn't do, shall Seam be removed (desperated situation) or other best solution could apply?

            Imagine a XML config saying: "adding Mobile capability through dependency injection". It should be great.

            I wait for some contribution.
            we lies this issue to migrate to Seam.

            I has appreciated the Conversation and http session hands off.


            • 3. Re: Seam coupling
              Jonatas Wingeter Rodrigues Newbie

              Of course,

              the Seam purpose may not be connect different presentation layer, because it could be developed to solve JSF problems. But even so the Session Bean <-> Seam dependency must be cleared.

              • 4. Re: Seam coupling
                Pete Muir Master

                Ah, I see now :)

                I think the answer is not at the moment, but in the future.

                You can output to a mobile device (or any presentation layer that can read xml) using JSF (e.g. Trinidad has a renderkit for pdas) but other devices/applications (e.g. Swing, Web Services) aren't currently supported but I think are intended to be (WS certainly is)

                Useful posts:


                • 5. Re: Seam coupling
                  Jonatas Wingeter Rodrigues Newbie


                  I saw the related posts that you sent.

                  I thought that Seam purpose, according the posts, is to eliminate complex designing. Therefore, the question holds on...

                  If I change the presentation layer, how could I insert dependency injection?

                  Through annotations we can get connect the layers, but has Seam engine for that?

                  Whatelse may be necessary implement interaction layer (JSF -> Int. Layer -> (Seam -> EJB)Abstracted.
                  Note, I really fancy the Seam techniques, they are great (conversation, for example).
                  Should be interesting offer this service to any presentation layer.