On 12/19/06, Behrang Saeedzadeh <[EMAIL PROTECTED]> wrote:

Hi all,

It looks like that I am not the only one confused by JSF terminology,
as there's not an official glossary of terms in the spec. The best
thing would be to ask the EG to add a glossary of terms in the next
release. Till then, it seems that MyFaces' mailing list is the place
to come up with a definition that the community agrees on - almost.


Historically, "backing bean" is a design idiom, not a required feature of
the specification.  In general, the intent of the term was to name a common
pattern where you have a JavaBean associated with each view, containing the
event handlers and/or bound component instances, and/or both.  But nothing
in JSF *requires* that you do things that way -- it's common, for example,
to see a single bean contain all the server side information for an entire
multi-view "conversation" or "dialog" with the user.

Don't tie your design down to someone's definition of an idiom ... look for
the patterns that make the most sense for your application architecture.

Craig


Regards,
Behi

On 12/19/06, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
> Simon Lessard and Gus,
>
> Respectfully, while books on JSF may help establish the culture and
> conventions of the JSF community, they certainly are no replacement for
> the official specifications.
>
> I quite dislike the narrow definition of "backing bean" as presented in
> Core JavaServer Faces. I've found that the general JSF community uses
> the term in a much broader sense, and being exposed to JSF initially
> through this book gave me a bit of confusion on this point.
>
> Instead, I prefer Simon Kitching's summary in this thread of the meaning
> of the term. I think it sums up the common usage much more accurately.
> Of course, it is also quite acceptable to use the term more loosely to
> refer to any bean referenced from the view page through an EL
expression.
>
> If you follow the usage in the books, that's fine... just don't expect
> people to assume that you are specifically using bindings to
> UIComponents rather than some other EL.
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Gus wrote:
> > Yes, I agree. The JSF Complete Reference book also states like this.
> >
> >
> > Simon Lessard wrote:
> >> Actually Core Java Server Faces uses backing bean when you use
binding
> >> attribute on tags. The backing bean is then the bean holding the
> >> UIComponent
> >> reference.
> >>
> >>
> >> Regards,
> >>
> >> ~ Simon
> >>
> >> On 12/17/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
> >>> Behrang Saeedzadeh wrote:
> >>>> Hi,
> >>>>
> >>>> What is the difference between a managed-bean and a backing-bean?
> >>>>
> >>>> 1) Aren't all backing-beans, managed-beans as well?
> >>>> 2) In which scenarios a managed-bean is not a backing-bean?
> >>>>
> >>>> I browsed through the JSF 1.1 spec and I couldn't find the
definition
> >>>> for either of these terms. Overall I think the spec lacks a
glossary
> >>>> (local value, etc. are not defined formally anywhere in the sepc.)
> >>> A "managed bean" is something defined in a faces config file using
the
> >>> <managed-bean> tag.
> >>>
> >>> AFAIK, the term "backing bean" is not a term used by the JSF spec at
> >>> all. It's a common web development term (struts, etc) that doesn't
> >>> entirely map to the JSF concepts. My personal interpretation is that
> >>> when a page (jsp/facelets/etc) contains EL expressions that mostly
or
> >>> entirely map onto a single managed bean, then that managed bean can
be
> >>> called the "backing bean" for that page. Note, however, that there
is no
> >>> requirement in JSF for a page to access only one managed bean; it
can
> >>> access a dozen if it wishes, in which case the term "backing bean"
> >>> really can't be applied.
> >>>
> >>> And if I were using the Apache Shale View Controller, then I might
use
> >>> the term "backing bean" to talk about the object that receives the
> >>> view-based callbacks, even if the associated page accesses a range
of
> >>> other managed beans.
> >>>
> >>> Cheers,
> >>>
> >>> Simon
> >>>
> >>
> >
>
>
>


--
"Science is a differential equation. Religion is a boundary condition"
- Alan Turing

Behrang Saeedzadeh
http://www.jroller.com/page/behrangsa
http://my.opera.com/behrangsa

Reply via email to