Thursday, February 11, 2010

Difference between Managed and Backing Beans in JSF

Managed Beans: Java Bean Objects managed by JSF implementation is called Managed Bean, It is nothing but describe how beans are created and managed(scope). Managed Beans are automatically created by the framework at runtime. Managed Beans can be put in request, session and Application context.

Backing Beans: Java Beans Objects that associated with UI component is called backing bean. It is basically holds data of associated UI component and may contains business logic. The backing beans may also contains other methods for validations and events for that UI component. The Backing Beans are referenced by form(JSF/JSP page). The Backing Beans can be put in request scope only.
Sometime Backing Beans is also called View Objects, View Objects are specifically used in Presentation Layer. It contains data and logic to validate, events and interact with business logic tier.

No comments:

Post a Comment