3 Replies Latest reply on May 21, 2009 4:45 PM by mimosah

    starting with seam

    mimosah

      Hello evreybody,


      I'm learning seam and I'm trying to understand how can we design our business logic with seam.


      I remarked in the examples that we create a class for every use case. For example, in the seambay example, we have AuctionAction, AuctionDetailAction, AuctionEndAuction, AuctionSearchAction ...


      So, my question is : why don't we regroup these actions in one class: AuctionManager for example?


      Thanks


        • 1. Re: starting with seam
          mimosah

          I want to explain my situation: I have to develop a web application according to the JEE platform and I chose seam for that.


          I must return a report that contains the design of the application before starting development.


          So help me please to understand how to design an application with seam.


          Thnak you

          • 2. Re: starting with seam
            niox.nikospara.yahoo.com

            Hello,


            Application design isn't that much related with SEAM. SEAM, in my opinion, gives you the means to implement your design. Of course SEAM has its own idiosyncrasy, that is why you have to study the documentation and examples before designing an application with it. And again, general application design is a prerequisite knowledge.


            For the other question: Take a look at AuctionAction, AuctionDetailAction, AuctionEndAuction, AuctionSearchAction: They are SEAM components (the @Name). They need to be separate for two reasons, one (I guess) is separation of concerns (each component does one thing). That is a secondary design decision in this case; you could merge them in one component that does one thing, managing Auctions, and still have a valid design.


            However the second reason is that these components need to be specified in a different scope (see @Scope). I.e. AuctionSearchAction lives for the entire session, AuctionAction for a SEAM conversation, the rest for a single request. This, allways in my opinion, is the main reason for placing the Auction-related functionality in different classes.

            • 3. Re: starting with seam
              mimosah

              Thanks Nikos for the response.
              It really helps for me.