Well, I don't know about the EL class *specifically*--you're really not
"supposed" (by Faces standards) to be resolving EL in your beans (as
opposed to using injection). But the general idea of using
utility/singleton/pseudo-singleton classes (for things that can be
determined without injection, e.g., through BindingContext.getCurrent())
is preferable to doing this in a base class, because the coupling's
looser.
Here's what I mean: Suppose you have a base framework bean class,
myorg.framework.backing.BaseBackingBean. Then, you find a really cool bean
class published by a third party that you really want to use, but you need
to add in some functionality that is present in BaseBackingBean. You're in
trouble--you can't extend two classes at the same time, so you'll have to
duplicate code from one of them.
Now, by contrast, suppose you've just created a utility,
myorg.framework.util.BackingBeanUtils, and then you find that really cool
thrid-party bean. Now, it's no problem: You extend that third-party bean,
and delegate to methods from BackingBeanUtils. No code needs to be
duplicated.
A general principle: Subclassing to get functionality is more limiting
than using a utility to get functionality (which allows the base class to
vary), which itself is more limiting than using a composed object to get
functionality (which allows *both* the base class *and* the functionality
provider to vary). There can be factors that are more important than this
(e.g., if you want functionality from a class' protected methods, or if
the functionality is part of a framework that might call package-scoped
methods on it [as BC classes are], you'd better extend that class).
Best,
Avrom
--
Avrom’s Java EE and Oracle ADF Blog
http://www.avromroyfaderman.com