4 Replies Latest reply on Jan 31, 2008 7:10 AM by pmuir

    Design Patterns/Best Practices

    senhce

      1. Is there any predefined set of design patterns & design principles for Jboss Seam & JSF applications. This question is from my strong belief , that most of the wiring of layers is taken care by seam and very little improvisation could be done for layering & decoupling the Presentation/business layer/Persistence.

      Thanks,
      Senthil Balakrishnan
      PS: I am relatively new to Jboss Seam and planning to use seam for one of our projects.

        • 1. Re: Design Patterns/Best Practices
          pmuir

          No. Seam allows you to design your app without patterns - you design as it suits you not, the framework.

          • 2. Re: Design Patterns/Best Practices
            kasim

             

            "pete.muir@jboss.org" wrote:
            No. Seam allows you to design your app without patterns - you design as it suits you not, the framework.


            yes and that is a VERYYYY dangerous thing to.

            I think its great in the right hands, but for junior developers who are just starting Seam its "intereseting" what they come up with as solutions.

            • 3. Re: Design Patterns/Best Practices
              kasim


              btw to expand on your first question.

              Just because there is little code needed, doesn't mean there aren't design patterns or maybe the better term is "good design".

              Since Seam comes pre-loaded with soo many options you are going to have lots of decisions to make.

              ie:

              - When to use a Stateful vs Stateless vs JavaBean
              - When to use the query objects as a DAO layer vs when to call it on your own from the business teir with the entity manager.
              - Scopes, when to apply each scope, determining when it's appropriate
              - Heck even down to when the EB / SB NEEDS to be a Seam component vs just being a regular EB / SB / Pojo.

              But as Pete said ... it's mostly up to you. Just be careful i've noticed beginners tend to take some easy ways out.

              • 4. Re: Design Patterns/Best Practices
                pmuir

                 

                I think its great in the right hands, but for junior developers who are just starting Seam its "intereseting" what they come up with as solutions.


                So, the senior program comes up with the "desgin patterns" for your app and tells the junior programmer. At the end of the day, I think, even with books full of design patterns, just letting a "junior" programmer loose on an app with no design behind it is going to result in failure.