Seam! Baby! *Drool*!
I finally found a web framework that doesn't make me cringe or belt out WTFs at a rate of 12 per hour. Plain JSF was OK but had a tremendous amount of crippling issues. Velocity scared me, and Web Work was nice but had some features that were puzzling, Struts was good for simple apps but weird and awkward when you needed to do more difficult stuff. But, alas, my opinions are my own.
JBoss Seam is impressive. Right away, it answered one of the problems that JSF always had me posing, "Why do I have to create an adapter to a session or facade bean when the functionality is already there?" The answer that JBoss Seam supplied was simple - you don't. JBoss Seam is intent on allowing you to create a business process bean that is reusable away from the web layer. Does this mean that there is complete separation from the web layer and the business service layer? No. Seam has a lot of integrated web functionality (like Phase Listening and Session Management). I will be the first to say that web functionality doesn't belong within a session bean, but the fact that it is there will not stop me from using Seam.
So, not only does JBoss Seam deal with JSF adapter issues, it also remedies JSF by making it RESTful in a push or pull style, which was something that always troubled me about JSF. On top of this, JBoss Seam makes table management a hell of a lot easier. If you have ever had to deal with data modeling and caching of data in JSF, then you know how difficult it is. Seam eases this pain by simply annotating a List attribute as a @DataModel. That's it! OK, but how does JBoss Seam handle row selection? Easy, it allows you to annotate the attribute that will eventually get selected as @DataModelSelection.
If that's not enough, keep reading. The one thing that impresses me most about this framework, the one thing that I have not seen in any other web framework, is the extraction of a business process layer! You have to check this out for yourself…
If you run the DVD Store example, and log in as the administrator, who happens to Albus Dumbledore, you will see that you can set the business process rules and that these rules can be changed on demand. The business rules are not hard coded into the web framework. Holy Crap! No more rolling my eyes when a customer wants to change business process rules yet again (not that I do that anyway ;)). With JBoss Seam, I can merely change my business process document and be done with it, no coding whatsoever.
I only touched the tip of the iceberg here. There is sooo much more packed in with this new web framework. As soon as you get the chance, take any web application and try it with JBoss Seam, which of course works with EJB 3.0. I think you’ll find that you enjoy web programming on a whole new level.
Fri, 23 Jun 2006 04:30 PM GMT
It's good to see some positive words about Seam from someone who has used it and doesn't work for JBoss. ;0)
Fri, 23 Jun 2006 06:51 PM GMT
"I will be the first to say that web functionality doesn't belong within a session bean, but the fact that it is there will not stop me from using Seam." In Seam, we try to extract the JSF details out of the beans so that you don't have any "web" functionality in your components. We haven't done this perfectly. You still need action methods when not using pageflows. I find that distastful, but it's not critical. In many examples, we use a FacesMessage component for creating UI messages. I think this should be more abstract, but it's not a huge coupling. Beyond that, almost all the other web stuff should be accomplishable through data bindings or in other classes outside the component. If you have an example where you still have to have too much "web functionality" in your components, bring it up on the Seam forums. Maybe we can find some better integration options.
Mon, 26 Jun 2006 08:59 AM GMT
Seam looks very interesting indeed. Have you looked at Stripes before making your choice? My feeling is that it comes down to these 2 frameworks right now, but their philosophies are quite different: extreme lightness and ease-of-use in stripes, very advanced state-management features in Seam.