Jeremy,
Perhaps one of the first things we should do is update the "Get Started" on www.javaserverfaces.org to show both options. This would require both a Weld archetype (which I think you've been working on?) and one for Spring 3 (I could work on providing one).
Agreed, in this particular example, I would not recommend this approach. What about @ViewScoped though? That's one of the more useful pieces of JSF 2 in my opinion. I don't believe there is an out-of-the-box CDI-equivalent, right? I would assume it's not hard to implement a custom @ViewScoped that CDI would recognize?
There isn't a CDI equivalent of @ViewScoped in the CDI spec, but Weld/Seam will be providing a portable extension, hopefully getting weaved back into a revision of the spec. We shouldn't have to revert to @javax.faces.ManagedBean just to get this feature.
Right, and we can provide a similar extension in Spring, but I'm wondering if we can find some sort of shared approach...
...
To be fair, we aren't yet providing any out-of-the-box implementations of JSR-330's @Scope other than the @Singleton that is required by by the spec. Maybe this is an opportunity for further collaboration, outside of the scope of the EG. It would be really cool if we could establish a single common and complete set of scope annotations as portable extensions usable in both Seam and Spring...I'm not entirely certain yet how technically feasible this would be...just something to think about.
I'm glad that we can communicate with friendly exchanges and I always look forward to getting your perspective. Frankly, I think that's what defines this EG, as Andy so elegantly pointed out in his blog.Indeed, it is quite refreshing to be able to have such discussions without things degenerating into TSS-style bickering. As can seen by taking a look at some of the arguments on the JSR-330 list, for example, EG's are not by rule free of such nonsense. I am thankful for your open-ness and for Ed and everyone else's roles in fostering such an environment, and look forward to seeing it continue.