Brainstorming
People who would (like to) contribute
- Gerhard Petracek
- Jakob Korherr
- Matthias Wessendorf
- Mark Struberg
- Arne Limburg
(Feel free to add your name here...)
Suggestions for the module name
Short name which we also use as name for the jira module.
- Separate name suggestions
- EXTCDI (JIRA)
- cdi (svn)
Extensions/Scope (aka ExtScope)
- EXTSCOPE (JIRA)
- scope (svn)
- Name suggestions for SVN and JIRA
- CDIflow
- CODI
At the end we also could have a "smart" name like Butterfly to brand this
If we have a short name it should be used for the JIRA module as well...
Feature suggestions
@ViewScoped support
- @Flow (and @Subflow) for special flow config-classes
- Dependency Injection for JSF action method parameters
- @ELResource (e.g. @ELResource("#{...}")
- Alternative: @Resource similar to the annotation in Spring
- probably enable @Observes for JSF2 events (not sure if this is possible in a JSF container independent way)
enable support for activating @Alternatives depending on a JSF project stage. I've already implemented this as @ProjectStageActivated annotation.
producer method for request parameters (@RequestParam(name = "xyz"))
Crazy ideas :)
@ViewController like the one of Orchestra
- Support dynamic recompilation and bean reloading like Ext-Scripting does for standard JSF managed beans within myfaces.
Goodies
We could also implement a few nice goodies by using the new interceptor-1.1 stuff of JSR-299, like
- (Comment (Gerhard): I already made a prototype. It's so easy with CDI that I guess we don't really need it - esp. you just need it without EJB's)
- @Commit for action methods
- (Comment (Gerhard): If we decide that @Transactional makes sense, we should also think about this one. I also prototyped this one. Difference to @Transactional: it's possible to provide a View-ID in case of a rollback)
@StartPage (redirecting to a starting page in case of an unexpected error like a conversation timeout)
- Provide a CDI container independent interface (+ impls for OWB and Weld) to run unit tests (JUnit and TestNG)
- startup listeners
it should be possible to implement beans for creating test-data which get invoked automatically during the startup phase of an application (in case of project stage development). if a bean also hosts the qualifier @Jsf - the startup should be performed e.g. in the PostConstructApplicationEvent-Listener
Details
Draft Implementation
A first version of the cdi-ext is available at http://github.com/struberg/myfaces-ext-cdi
Already Implemented features:
see Progress
@ProjectStageActivated to disable beans depending on a JSF ProjectStage
@ViewScoped Context to use javax.faces.bean.ViesScoped as a NormalScope(passivating=true) in CDI
Moved to Jira
- Scopes
- Support for the Orchestra conversation style with CDI.
ProjectStage support
@Produces ProjectStage (even if JSF is not running e.g. in Unit Tests!)
Annotations similar to blog as alternative to @ViewController
producer method for the current PhaseId (a similar solution)