File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Backing bean vs Managed bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Backing bean vs Managed bean" Watch "Backing bean vs Managed bean" New topic

Backing bean vs Managed bean

Pinal N Patel
Ranch Hand

Joined: Sep 05, 2003
Posts: 57
Is there a difference between backing bean and managed bean? JSF in action implies they are the same thing. Please correct me if I am wrong.
Backing beans are usualy declared with the Managed Bean Creation facility in faces-config.xml.

I am guessing they are different.

Thanks for your response in advance.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

They are the same thing.

GenRocket - Experts at Building Test Data
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17423

Well, if you want to get really pedantic, a "Managed Bean" is a bean constructed/initialized via injection in the faces-config.xml file. A "Backing Bean" is a bean referenced by JSF pages and is defined in the faces-config.xml file.

Few people will probably care about the difference. Usually if it's one, it's also the other.

An IDE is no substitute for an Intelligent Developer.
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
I answered this question several time ago. Please take a look at
Chandan Thour

Joined: Dec 24, 2011
Posts: 1

Backing Bean and Managed Bean Analogy

Here’s a good analogy to help you remember the difference between backing and managed beans. A managed bean is like a backpack you use to carry your stuff when you go for a hike. You know how much your stuff weighs, so you carefully decide which items you want to put in the backpack and leave heavier items that you don’t really need at home. A backing bean that gets generated by JDeveloper is like a backpack packed by your partner. Because he or she doesn’t know what exactly you need for the trip—but he or she wants to make sure you have everything you need—everything goes into that backpack. You then must carry all that weight as you hike over the hills. Because generating a backing bean creates setter and getter methods for all components on a page, including those you don’t use in your Java programming, the backing bean backpack grows big and heavy. If you use managed beans instead, you are packing the bean backpack yourself with better control over its weight.
I agree. Here's the link:
subject: Backing bean vs Managed bean
It's not a secret anymore!