webuiframework

advertisement
Jazz WebUI Framework
Jazz Platform Architecture – Open Source middleware
Jazz Eclipse Client
Jazz Web Client
Other Clients
Jazz Client Extensions
Jazz Client Kernel
Eclipse Platform
HTTP, Web Services, RSS, Atom
Jazz Team Server
Jabber
Web UI
Jazz Server Extensions
Jazz Server Kernel
Eclipse Equinox
Apache Tomcat
Apache
Derby
Deploy OSGI Container in a Servlet Container
• OSGI container – servletbridge.jar,
jazzservletbridge.jar
• core jazz OSGI bundles – JAF,
provisionService, oAuth Service, etc...,
they are registered in
eclipse\configuration\config.ini
• Extended Services provisioned by
provisionService
Provision Service
• Components can be deployed out of OSGI
container. This is achieved by provision service
• Load sequence:
–
–
–
–
Start Servlet Container
OSGI container load registered OSGI bundles
Provision Service is activated and look for profiles
Update-site defined in profile is loaded and activated
OSGI Framework Control
Config web.xml to enable framework control.
Uncomment following two init parameters
...
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>commandline</param-name>
<param-value>-console</param-value>
</init-param>
Some OSGI command:
SS – display the installed bundle list and bundle’s status
Start <bundleid> - start the bundle
Stop <bundleid> -stop the bundle
Overview
JAF Structural Elements
Key
Dependency
Extension
net.jazz.ajax
Dojo
Mozilla
Rhino
Equinox Server-side
Jazz JSON
Marshaling
Extension Points
Extension-point: net.jazz.ajax.webBundles
• Marker extension that the JAF uses to
discover the subset of server bundles
containing JAF-targeted code
– As opposed to bundles containing servlets,
web services, etc.
• Required for JAF extenders
<extension point=“net.jazz.ajax.webBundles”/>
Extension Points
Extension-point: net.jazz.ajax.applications
• Reserves a URI (or URI pattern)
• Total control over UI
• Provides a scoping mechanism for other
UI elements (e.g. pages)
• Examples: Jazz Project UI, Jazz Server
URI (under context
Fully-qualified name of
Admin UI
root) to access
application
‘class’ implementation
<extension id="admin"
point="net.jazz.ajax.applications">
<application alias="/admin"
jsclass="com.ibm.team.repository.web.ui.internal.admin.AdminApplication"
icon="/jazz.ico"
statusHandler="com.ibm.team.repository.web.internal.resource.RedirectStatusHandler"
</extension>
Extension Points
Extension-point: net.jazz.ajax.pages
• Coarse-grained chunk of UI
• Run within one or more applications
• Contains a set of one or more
bookmarkable “actions”
• Examples: “Work Items”, “Iteration
Plans”, “Reports” within Jazz Project
Area application
Extension Points
Extension-point: net.jazz.ajax.pages (con’t)
Initial action that
<extension
Parameter to built-in
runs if a user clicks
point="net.jazz.ajax.pages">
jazz.viewPage
on a page link
<page
action
defaultAction="com.ibm.team.process._defaultAction2"
id="com.ibm.team.process.ProcessTemplateManagement"
name="%ProcessTemplateManagement"
Displayed in the
widget="com.ibm.team.process.web.ui.internal.admin.proces
user interface
s_templates.ProcessTemplateManagementPage">
Fully-qualified path to
<action
widget implementation
id="com.ibm.team.process._defaultAction2">
</action>
The set of all
<action
(bookmarkable) actions
id="com.ibm.team.process.manageTemplates">
defined for the page
</action>
(more on this later)
</page>
</extension>
Extension-point: applicationPageBindings
Determines in which
<extension
application(s) which
point="net.jazz.ajax.applicationPageBindings">
pages will show up
<application
id="com.ibm.team.repository.web.admin">
<page id="com.ibm.team.process.projectAreaList"/>
<page
id="com.ibm.team.repository.server“ default="true"
/>
<page id="com.ibm.team.repository.users"/>
<page
id="com.ibm.team.process.ProjectAreaManagement"/>
<page
id="com.ibm.team.process.ProcessTemplateManagement
"/>
It’s different from the mechanism for
</application>
jazz foundation 0.6, where the page
</extension>
is defined in applicationScope
Inside the JAF
JAF Application Startup
•
1.
2.
3.
–
A JAF-based application has a sophisticated bootstrapping sequence
optimized for a fast, responsive load
Note: This process is invisible to extenders
User browses to a JAF-based application (e.g.
/web/myJAFApp)
Equinox server-side passes request to a JAF servlet
The JAF servlet responds with an HTML page (which uses
validation-based caching) with:
a.
b.
c.
d.
4.
5.
6.
Inlined CSS
A <script> tag (using expiration-based caching) pointing to a URI that
contains the compressed, concatenated “JAF runtime” (basically Dojo +
core JAF functionality) and the relevant application code
The extension registry data from all webBundles
A dojo.addOnLoad function that starts the targeted application
The contributed application builds up the basic UI and tells
the JAF when it’s done
The JAF runs the initial action which, as a side-effect, loads
the code for the initial page (based on the URI)
The JAF monitors the URI for changes to the URI’s hash value
Download