• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Seam in Action : How is ease of use

 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Author,

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

Thanks,
 
Author
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 134
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
    Posts: 164
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Good additions Jason.
    [ October 10, 2008: Message edited by: Dan Allen ]
     
    Ranch Hand
    Posts: 162
    Hibernate Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Nice discussion

    Really useful for new learner.
     
    Muhammad Saifuddin
    Ranch Hand
    Posts: 1325
    Android Java Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Dan & Jason for your reply...
     
    Ranch Hand
    Posts: 37
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    Dan Allen
    Author
    Posts: 164
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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).
     
    girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic