wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes Seam in Action : How is ease of use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Seam in Action : How is ease of use" Watch "Seam in Action : How is ease of use" New topic
Author

Seam in Action : How is ease of use

Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

hi Author,

what are the techniques, that make the seam is ease of use?

Thanks,


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Dan Allen
Author
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
There are two aspects that make Seam easy to jump into.

#1. seam-gen

When you are first learning a framework, you want to get something running quickly so that you can see it working and so that you can "pull on the levers" so to say. seam-gen steps you through a series of questions, after which it sets up a working Seam project which can be deployed to JBoss AS (and with slight modifications to GlassFish). If you want an even faster way to get started, go grab the Seam in Action source code and run "ant quickstart". That command will download JBoss AS, download Seam, build a sample database, and let you select a project to deploy.

Before moving on to the next point, I want to make a personal comment about seam-gen. Look, it isn't the best project generator in the world and it certainly doesn't create the "perfect" project scaffolding. What it does do is give you a path to testing out Seam with the least amount of resistance. Over time, seam-gen will improve, or you will perhaps outgrow it. If you don't need seam-gen anymore, then you should be happy to know that you have likely become a skilled Seam developer.

#2. The @Name annotation

If you have used JSF before Seam, then you know that defining a managed bean file in XML is a real pain. In Seam, you create a class, add the @Name annotation to it, and you have a component you can access from JSF (expressed using the EL). But it goes beyond establishing this mapping. That component can now be wired to other components using the @In annotation, again saving you from the XML-based wiring required with JSF managed beans. The component can also be placed in one of Seam's six scopes (event, page, session, conversation, business process, application). The Seam services available to your component then extend from there.

In another thread I mention the things that are tough about Seam. I cite JSF, bijection, and conversations. But these things are by no means a high bar, more like a new way of thinking.


Dan Allen | http://mojavelinux.com | Author of Seam in Action - http://mojavelinux.com/seaminaction
Jason Porter
Ranch Hand

Joined: Apr 26, 2007
Posts: 120
I'd like to add few things that I've noticed.

  • Very little configuration needed. Typically things like persistence.xml, faces-config.jml, and web.xml rarely change after seam-gen (so you can copy and paste into new projects). There may be some changes to components.xml as your application grows, but that's one configuration file instead of three plus.
  • It stays out of your way. As Dan mentioned Seam uses a lot of annotations. That's about as much as you see from Seam. Seam also doesn't impose any sort of architecture on your project so you're free to use 3 tiers, 5 tiers, two, or whatever your project needs.
  • Seam makes PDF, RTF, XLS, CSV, RSS, email, and graphic manipulation as simple as a few tags in an XHTML file. I haven't seen anything as easy as Seam for those file generations.
  • Security. See chapter 15 in the reference, or chapter 11 in Dan's book.


  • There are others as well, these are some of the big ones that I have noticed.
    Dan Allen
    Author
    Ranch Hand

    Joined: Mar 05, 2003
    Posts: 164
    Good additions Jason.
    [ October 10, 2008: Message edited by: Dan Allen ]
    Kuladip Yadav
    Ranch Hand

    Joined: Jul 30, 2008
    Posts: 162

    Nice discussion

    Really useful for new learner.
    Muhammad Saifuddin
    Ranch Hand

    Joined: Dec 06, 2005
    Posts: 1321

    Thanks Dan & Jason for your reply...
    Uchana Jackson
    Ranch Hand

    Joined: Dec 07, 2007
    Posts: 37
    You'll find that security with Seam (e.g., page-level and component level restrictions) are fairly easy. Using the Seam Identity object, you addRole() at session startup (after successful authentication), and hasRole() to check to see if the current user can do this or not.

    configuring page navigation in the pages.xml is fairly easy as well.

    honestly, Seam has lots of easy concepts and lots of difficult ones as well.


    SCJP 1.4<br />SCBCD 5
    Dan Allen
    Author
    Ranch Hand

    Joined: Mar 05, 2003
    Posts: 164
    What's makes Seam security so important is that page-level security is otherwise not possible in JSF (without creating your own PhaseListener and lots of custom code).
     
     
    subject: Seam in Action : How is ease of use
     
    Similar Threads
    seam and ruby on rails
    Seam and No Seam
    How easy is it to use ICEFaces 1.8 with JBoss Seam?
    JBoss Seam - Spring+Hibernate vs EJB3
    what is seam frame work