jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes Backing Beans and CDI Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Backing Beans and CDI Beans" Watch "Backing Beans and CDI Beans" New topic
Author

Backing Beans and CDI Beans

Prithvi Sehgal
Ranch Hand

Joined: Oct 13, 2009
Posts: 774
Hi All,

I am new to JSF and i have started JSF 2.0 recently. I am currently referring to Core Java Server Faces Edition 3.

I was at chapter 2 which is called Managed Beans and i came across some statements which made me confused. Any help
in their context will be highly appreciated.

-It says the term backing bea and the definition is sometimes it is convinient to design a bean that contains some or all component objects
of a web-form. Such a bean is called a backing bean. This backing bean (JavaBean) contains properties that are bound to either component value or
component instance. My question is

1- What does it mean by binding component value or component instance? What's the basic difference?
2- Secondly it tells something about CDI beans. It says that, it is good to use CDI beans rather then backing beans when you deploy your application
in a web-server. My question is why should i use CDI, when my managed bean is managed by the framework itself and this CDI bean configuration
i have to write somewhere. Why should i take this hassle?

Another thing, am i following right path by using Core Java Server Faces, because it is updated for JSF 2.0. Any other tutorials or pointers will be
appreciated as well.

Best Regards,


Prithvi,
My Blog, Follow me on Twitter,Scjp Tips, When you score low in mocks, Generics,Scjp Notes, JavaStudyGroup
Ashok A Kumar
Greenhorn

Joined: Jul 01, 2010
Posts: 19
Hi Prithvi,
Even i'm new to JSF after going through your questions and found these links are helpful ( IMO).. Let me know your views

http://www.jaininaveen.com/?page_id=136
http://blogs.sun.com/enterprisetechtips/entry/using_cdi_and_dependency_injection

Regards,

Ashok
Prithvi Sehgal
Ranch Hand

Joined: Oct 13, 2009
Posts: 774
Hi Ashok,

They seem to be pretty nice links and i have checked one of them. Still i am pretty much a novice in JSF development so many things
i am not able to understand but some basic difference is concluded in my head though.

I think so to understand the basic difference, we should clearly understand the JSF life-cyle. Very good link is JSFLifeCycle
It has made me understand a certain things and then i referred back to the first link you provided me. I am not able to get what he is
trying to say in value binding thing. I guess either he has written it a bit complex or the context of sentences is not right.

What are your opinions?

Ashok, i have found a good discussion about Managed Beans VS Backing Beans on this forum.
Have a look at it too. Seriously so many things to learn

Best Regards,
Ashok A Kumar
Greenhorn

Joined: Jul 01, 2010
Posts: 19
Hi Prithvi,
Gone through the links that you've provided, Really heplful and informative, I believe understanding JSF is not easy, .. WE have long way to go.. Keep me posted on good links and tutorials on JSF....


Wish you all success... javascript:emoticon('');

Ashok
Prithvi Sehgal
Ranch Hand

Joined: Oct 13, 2009
Posts: 774
Hi Ashok,

I fairly agree with you learning JSF is not easy. It takes a bit of time to understand its concepts. Why can't we both make a roadmap learning
JSF and complete things as a team? Let me know about your views.

Best Regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Backing Beans and CDI Beans