6 Replies Latest reply on Aug 25, 2008 6:26 PM by norman

    ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more

    kito99.kmann.virtua.com

      Hello,


      I'm pleased to announce two pieces of original content at JSFCentral (part of renewed emphasis on the site). The first is a podcast with Gavin King, where we discuss Seam and JSF in detail. Here’s an excerpt:



      Kito: Okay, so we are talking about state and how it is not such a bad thing after all. In more specific terms, what is a stateful component in Seam and how does the conversation play into that?


      Gavin: A stateful component is just a stateful session bean, or in fact can be any Java class. You don’t have to use EJB 3 with Seam if you don’t want to. It is just a Java class which would specify a context. You can say "this object is scoped to the conversation” or “this object is scoped to the session." In fact this is a model that is just taken straight from the JSF managed bean model, but what we have done is added new contexts -- we added the conversation context and the business process context -- to that model. It can be bound to the view layer just by EL expressions, just like in JSF. So then these stateful components are able to interact with each other so we kind of have a more sophisticated version of dependency injection, which is designed to cope with the problems that you come across when you have stateful components from different contexts interacting with each other. What we are trying to achieve in the component model is extremely loosely coupled applications.


      Download the podcast or read the transcript here: Gavin King Podcast


      The second article is an In the Trenches story about how Jason Lee and his team at IEC developed a file upload JSF component that integrates with an applet, and donated it to the Mojarra Scales project. Here’s an excerpt:


      Lee became involved when it was time to tackle an issue with regard to file uploads. He explained:



      While the application itself is not too exciting, what makes it interesting is the custom component we wrote to work around an HTML limitation. When the TDM group uploads these BOMs, there can easily be 20-30 at a time that they need to upload. With the plain HTML file input widget, the user can only select one file at a time. While there are some pretty slick and clever ways to make that more palatable, the requirement that the user click a button before selecting each file -- over and over -- was quickly dismissed as unacceptable. To work around this, we looked at projects like JUpload, but they did not work exactly how we'd like, and setting it up on the page was more work than we wanted to see.

      Read the rest of the article here:  In The Trenches


      I also tracked down Dan Allen, who was at JavaOne crashing parties and soaking up the excitement, for his thoughts on Seam, Seam in Action, and Seam's integration with Spring. The fervor of JavaOne had Dan fired up on this particular evening, so this episode is sure to please. He went on to discuss what to expect from his book, why integration with Spring is desirable and some of the differences in philosophies of the two frameworks (and its creators), how to respect the persistence context, and some of his wishes for JSF 2. Here is an excerpt:



      So really the idea is Seam provides some annotations that you add to classes to make components. If you use the components straight from JSF or any EL value expressions, you can be accessing EJBs. So people realize that "I'm using an EJB right now, this is incredible. I have never had the opportunity to get here before because JNDI look-ups and getting stuff configured can be daunting." So Seam really closes all those gaps. At the same time it says "why don't you use EJB 3s from your JSF? Why do you have these backing beans that are really worthless? They just pass stuff back to the other layers." That's not to say you can't do it with Seam. You have the option of having a very layered app, or you have the option of having very collapsed layers in your app.

      Download the podcast or read the transcript here: Dan Allen Podcast


      You can expect more content from JSFCentral this summer.


      Kito D. Mann

        • 1. Re: ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more

          Great interview. 


          I really liked the technical details.  Even the nitty gritty ones like the coupling of Seam components to FacesMessages.  Actually, on that one, I believe you can reduce or eliminate the dependency by raising an event, and have some observer be responsible for placing the message into FacesMessages.  In fact, this is more in line with the notion of a Component anyway.


          • 2. Re: ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more
            dan.j.allen

            My original thought was to raise an event too, which works great from an application level. You can see in the TRUNK that Pete has done a refactoring that takes the framework approach. There is a component named StatusMessages which has the same API as the former FacesMessages, without a dependency on JSF. If JSF is present on the classpath, StatusMessages is overridden (based on component precedence) with FacesMessages and is thus used transparent (or behind the scenes, as I like to call it). This pattern is used quite often in Seam. No more dependency on JSF in the core!


            As for the podcast, I look forward to listening to it.

            • 3. Re: ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more

              On applications I chose to go with the framework approach as well as it seems to keep the logic contained to where the message originated.  In my recent use of SWF they have taken the same avenue with the MessageContext which is a nice abstraction.  I hadn't noticed the recent refactorings Pete had performed, thanks for pointing that out Dan as I will certainly take advantage.  Glad to see this direction as developers can avoid having to perform this wrapping through a custom implementation!

              • 4. Re: ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more

                Great interview!  Gavin's states:



                The second thing Seam is, is an attempt totally change the way we build web applications and change away from a stateless, pure request oriented architecture to an architecture based upon state management, based upon conversations, based upon stateful components. This is the thing that sounds least well-defined and less relevant when I say it like that, but actually once people sit down and start using Seam, they kind of re-evaluate the way they build applications. It is the thing that excites people the most.

                After being a heavy user of Seam, I can certainly attest to this.  In using Spring Webflow (SWF) on a recent contract, the stateless nature of Spring beans required what felt like a step backward.  Even though SWF allows conversational state to be managed through flow execution, I constantly felt myself wishing for bijection as I kept 'reminding' Spring beans of conversational state.  Bijection is truly the next step in dependency injection.  I realy look forward to working with Web Beans!

                • 5. Re: ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more
                  dan.j.allen

                  I updated this post to add another podcast in which Kito interviews me [Dan Allen] on Seam, Seam in Action, and Seam's integration with Spring. Enjoy!

                  • 6. Re: ANNOUNCE: JSFCentral podcasts: Gavin King and Dan Allen on Seam and more
                    norman

                    Is there an actual podcast feed that people can subscribe to?