Seam in Action

Dan Allen

Mentioned 2

A guide to Seam, a Java EE framework, provides instructions for designing and building applications.

More on

Mentioned in questions and answers.

Let's say that I'm new to JBoss Seam, is there a way to get my skills up to speed? Are there any good tutorials?

You might want to pick up a book called 'Seam In Action' by Dan Allen. It walks you through all the frameworks that Jboss Seam glues together, not just Jboss Seam itself.

Other than that, you can learn a lot from the examples in Jboss Seam, which you can compile and run almost out of the box, or by using seamgen.

If this is your first time using jsf, hibernate, drools, etc, and you are new to bijection, go for the book.

I'm quite new to Seam and am working on a relatively large project at work. The application is quite complicated in that there's a lot going on a single page at any time. I'm trying to figure out how to structure this and would like some feedback.

A good example to base this on would be Facebook (or a similar social media app). Facebook has a ton of stuff going on the screen. If all that logic were in a single view and backing bean, the files would be monolithic in size.

The way I see it is you'd have different components. For example, in Facebook, there'd be a component that handles showing your friends or friends in common with another person, there'd be another component handling invitations, suggestions, etc, etc.

All this is separate functionality being displayed on a single page however, in some cases, although being separate components, they're related at the end of the end. For example, if I click something in the main screen (i.e. not the elements in the sidebars) that generates an ajax request, a component in the sidebar might need to be updated automatically or rerendered.

Further than just sidebar components, there might be multiple disparate elements in the main area of a page (for example, a tabbed area where each panel could, in actuality be a separate or a separate view of the page).

It would be ugly if I had to handle everything in a single backing bean or something similar. It makes sense to me that each of these disparate elements have their own controllers (backing beans?) and what not. If I do an action in component x, it's bean could fire an event that could be listened to from component y's bean (thus causing component y to be rerendered).

Any ideas or resources I could look at?

Seam certainly allows division of pages into multiple fragments with separate backing components. They can be quite independent but can also interact.

To learn it, start with the Seam tutorial at JBoss and the book Seam in Action.

For the Ajax interaction you're looking for, you might also want to look at the RichFaces Developer Guide.