Jump to: navigation, search

Difference between revisions of "Helios System Requirements and Architecture"

(Component Tree)
(Web.xml configuration API)
Line 173: Line 173:
  
 
== Web.xml configuration API ==
 
== Web.xml configuration API ==
 +
 +
New API will be created to directly get and set context param and other web.xml-specific options for JSF.
  
 
== EL Framework ==
 
== EL Framework ==
  
 
== Structured Source Editor Extensions ==
 
== Structured Source Editor Extensions ==

Revision as of 12:45, 22 February 2010

This document is tentative and subject to change without notice.

Themes

JSF 2.0 Support

The Helios release will introduce system level support for JSF 2.0.  This includes updates to:

  1. Facet and library framework support for JSF 2.0 projects.
  2. The XML catalog (after requisite IP review) for new XML schemas.
  3. The application configuration EMF model (facesconfig) for new XML elements introduced in the release.
  4. Supported web.xml configuration concepts.
  5. The JSF Tag Registry, which will become the authoratative source of information about JSF tags (both JSP and Facelet).
  6. Component tree rendering for the addition of the rendering target concept and an API to retrieve component ids that are in use.


New JSF 2.0 concepts to be supported by the system are:

  1. Annotation-based configuration of JSF artifacts.
  2. Implicit navigation rules formulated from supported action source tags.
  3. Design time support for the JSF resource loading concept.
  4. Facelet source editing support in the Structured Source Editor (SSE).


Flexibility of Adoption

Based on lessons learned over almost five years of experience with the JSF project as both committers and adopters, we have come to some conclusions about the limitations of our current bundling architecture with respect to adoption.  These are based on the following premises:


  1. The most common, and therefore premier, adoption scenario is to create an update site that is installed directly on top of some subset of WTP and its dependencies.
  2. Adopters may support other scenarios such as productizing, but they will still need to support option 1.
  3. Frameworks that create long-lived objects or react to events without the adopter doing anything make it very difficult for adopters to tune their end-user experience. 
  4. Only a choice few base platform features like JDT have become so "defacto standard" that adopters are comfortable exposing them to end users without significant customization.  WTP JSF Tools is not in this category.
  5. The WTP API policy and the Eclipse annual release cycle combine to make it very difficult to evolve API and user visible features once they are released.


This leads us to the following observations about adoption of the JSF Tools Project:


  1. End-user visible features that appear by default are bad.  Examples include the appearance of the WPE action on the Open With action in the project explorer and the validation framework.  Once these features are contributed an adopter is stuck with them.  Short of doing hacky things like calling non-API methods or worse, calling setAccessible to get private data.  This is bad due to premise 1: adopters get stuck exposing things to their users that they may not like or conflict with a similar feature that they want to implement in their own way or based on a superior internal technology.
  2. Frameworks that depend on non-overridable data such as JSF tag metadata are difficult to customize for same reason as observation 1.
  3. Singletons make it difficult to extend a framework because it make things difficult to configure (generally singletons configure themselves) and control lifecycle (when do you dispose the singleton?).  This is bad due to premise 3.
  4. Frameworks that use long-running processes, whether background or foreground, make it difficult for adopters to tune experience.  This is a problem due to premise 4.


Based on this analysis, we propose to change the bundling and system architecture in the following ways to improve adoptability:


  1. Break up the JSF feature into smaller features.  Only the core feature will live in the SDK release.  The rest will be availabe in an optional download.
  2. Eliminate singletons and replace them with relocatable services managed by OSGI.
  3. Make all services configurable through pluggable factories.
  4. Replace static method calls to services with object method calls that use constructor-based manual dependency injection to configure the service instance being used.


Bundling and Deployment Architecture

Feature Reorganization

The JSF feature is divided as follows:

JSF Core: All of the base functionailty required to support JSF tooling.  This feature will not expose any UI by default although it may contain resuable UI components.

Exemplary Features: All of the extensions and metadata required to extend JSF Core into basic exemplary features except for Faces Config Editor and Page Designer.

Faces Config Editor: The editor implementation.  Some of the reusable UI components such as artifact creation wizards will remain in JSF Core.

Page Designer (already exists): Of the plug-ins required for the WPE.


Replace Singletons with Relocatable Services

The following singletons is replaced with relocatable features.  Where the singleton is API, the access API for the singleton is depracated and changed to call the new service architecture:


Singleton Description
MetadataModelManager A per-project singleton for managing meta-data.
JSFAppConfigManager A per-project singleton for managing application-wide JSF app config EMF models.
JSPModelProcessor A per-file singleton that caches information about EL artifacts of interest.
ResourceBundleMapSource A per-project singleton used to manage bundle files.
DesignTimeApplicationManager A per-project singleton that manages simulated JSF objects.


Make Services Factory Configurable

The following services will be made factory configurable:


Service
Change Description
Metadata
Introduce a Domain Context Factory that the framework will use to optionally delegate construction of each Model object to.  Current defaults will be maintained.
Metadata
Introduce Metadata Manager Factory that allows secondary in-memory repositories to be created.
JSF App Config
Introduce a Locator Provider Factory that the default JSF App Config Manager service uses to select which locators to use to find JSF App Config artifacts.  Current defaults will be maintained (note this means that adopters will need to specifically elect to find JSF 2.0 annotation-based and implicit navigation artifacts; this is done to allow tuning of performance).
JSF App Config
Introduce a Factory that allows additional configurations of the App Config Manager to be created.
Design Time Application Manager Introduce a factory that allows optional delegation for creation of design application manager instances.Current defaults will be maintained.
ResourceBundleMapSource

Introduce a Factory that allows for optional construction of the map source objects through delegation.  Current defaults will be maintained.



Replace Static Method Calls to Services

System Requirements

Locator Framework

JSF Resource Locators

Application Configuration Manager

New Locators

Meta-data Framework

Component Tree

Metadata

New meta-data will be added to support component tree construction from Facelet tags.

Construction Concepts

Support for the view facet that defines "render targets". This is necessary to be aware of components that are added relative h:head and h:body tags.

Component Id Management

The design time view root will have a new API method that can be used to get a list of all component ids in the view including the option to map back to the component/tag that uses the id. This method must be optimized for runtime performance since it is intended to be used by real time user features such as content assist.

JSF Tag Registry

A new tag registry will be added to support Facelet VDL tags.

Web.xml configuration API

New API will be created to directly get and set context param and other web.xml-specific options for JSF.

EL Framework

Structured Source Editor Extensions