You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Intro

The core of MyFaces CODI consists of two modules (api and impl). This site just contains information about the api module. Basically it just provides some basic interfaces, common annotations and useful utils.
The core (both modules) is the only required module for using MyFaces CODI. All other modules are optional. That means you can chose the modules you really need! Most of the other modules depend on the core. The only exception is the message module which is self-contained.

(The message module is the only module of CODI which is completely independent of CDI. So it's possible to use it for any Java based application.)

Hint

If you would like to test CODI or you need all modules provided by CODI, you can use an all-in-one JAR file.

Config

Framework Config

The core of CODI provides base implementations which are used to provide a testable, pluggable and type-safe config. If it is possible this CDI based config approach is used to configure the framework (esp. the SPI). This approach decouples the logical config entries from the config-source. That means it's possible to switch e.g. between Java Config (values are directly encoded in config classes), property files, db table/s, xml (e.g. web.xml) and every other format which can be used for a config.

Hint

Since the config is based on CDI mechanisms, it isn't possible to use it for all configurations. There are some very basic configurations (e.g. deactivation of specific CODI features), which have to be accessible before CDI is fully initialized.

View Config

View config is a type-safe approach to configure a view. Currently the basic infrastructure is used by the JSF module to allow a type-safe navigation and View-Controller (and it's planned to provide further features after the first alpha of CODI).

Project Stage

The core provides a pluggable and type-safe approach for using project stages in a project (it's also used within the framework). Furthermore, @ProjectStageActivated allows to use e.g. implementations annotated with javax.enterprise.inject.Alternative for specific project-stages.

Warning

Currently the config is bound to the project stage implementation of JSF (since the impl. uses strings you won't see the dependency at compile time). However, we will change that. If you already use it, please be aware that the names for the config will change.

Scopes

All interfaces and annotations which are independent from the concrete UI technology are provided by the core. E.g. the concepts of CODI conversations aren't bound to JSF. So the core defines the basic API for CODI conversations. Instead of providing a framework adapter (like MyFaces Orchestra does), CODI hosts the specific implementation in the corresponding module. Currently the UI modules of CODI are just for JSF. However, it would be possible to provide a module e.g. for (plain) servlets. Such a module can use the APIs provided by the core (which are independent of JSF and its concepts).

Qualifiers

The core provides a bunch of central qualifiers. Some of them are used to decouple CODI modules and others are used to provide special features. E.g. @Advanced allows the injection of advanced implementations provided by CODI, if JEE supports the injection of the default implementation.

Utils

The core also provides some utils and tools which are useful for CDI based applications (and/or for the framework itself).

  • No labels