Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Beans

 
Dushy Inguva
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Dushy
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic