I've been learning Spring and one of its core features is the
BeanFactory, which can be configured in roughly the same way as
JSF's managed beans. Spring's approach has some nice things missing from managed beans:
1. The ability to invoke specific constructor and pass it arguments.
2. The ability to create beans by invoke static or non-static methods of factory classes
3. The ability to derive or template parameters. So if you have several beans that need to have the same properties set with the same values, you can do this in one place.
4. The ability to specify "init" and "destroy" methods of the bean and have them invoked properly.
On the other hand, there are some things missing that occur in managed beans:
1. There is no notion like managed-bean-scope. You can indicate is a bean will be a singleton, but there is no notion of session.
2. There is no "param" scope for http parameters
Still the notions are so similar I daydream that they may converge in a best-of-breed sort of way. I mean, why reinvent the wheel, the underlying paradigm, dependency injection, should be given a standard implementation once and for all, no?