File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes JSF Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSF Beans" Watch "JSF Beans" New topic

JSF Beans

Dushy Inguva
Ranch Hand

Joined: Jun 24, 2003
Posts: 264
Hi all,

Im currently working on a new project, and we are planning to use JSF. The question i have is:

In JSF, every page has to be backed by a Bean. These beans might not be re-usable as they are composed of page specific data. In this case, won't we see a Bean explosion? How effective is it to write a Bean just to have get and set methods?
As an alternative, we are thinking of creating a domain object model, having the page beans act as a facade to the domain object beans. We are faced with multiple issues here:
a. We do not want to use EJBs as the backing beans because of the size of our team (2 developer team).
b. Everytime a backend bean is updated, it has to be saved into the database. And these beans cannot be cached due to concurrency issues. It is quite expensive to load an entire bean every time a part of it is being used by a facade bean.


Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

I would reconsider using EJBs.

Also, look into the Value Object pattern. There is an Updatable Value Objects Strategy (term borrowed from Core J2EE Patterns book) in which you would use the Value Object as the bean to back your pages.

A good workman is known by his tools.
I agree. Here's the link:
subject: JSF Beans
It's not a secret anymore!