Plugins have evolved in the past year, and the new plugin architecture will be incorporated in all products in 2009. This session dives into the detail of the new plugins system, guides developers on the best techniques and approaches and explores how the architecture will evolve further.
Atlassian Speaker: Don Brown
Key Takeaways:
* In-depth look at plugins 2
* How-tos and code samples
9. Plugins break on product
upgrade
Plugins have
unrestricted access
to application
classes, objects,
and configuration
Broken plugins after
a product upgrade
make us look bad
10. Plugins 2 gives you. . .
Ability for plugins to depend on each
other
Ability for plugins to define their own
extension points
Consistent plugin development platform
across products
Better insulation of plugins from product
changes
11. Backwards compatibility
Version 1 plugins - 100% compatible
o WEB-INF/lib
o Confluenceʼs dynamic plugins
Version 2 (OSGi-based) plugins
o Compatibility varies by product
13. OSGi in one slide
Bundles contain code,
configuration, manifest
metadata
Runtime dependencies at
Java package, service,
and bundle levels
Supports multiple versions
of code
Can share dynamic
service objects
Lifecycle: install, resolve,
active, uninstall
14. Goal - Minimal OSGi required
Can we scale the learning curve to keep
the easy plugins easy?
15. Each team can “own” a bundle
Only JAX-RS exposed
Complete freedom to
switch to another JAX-
RS implementation
Can run multiple
versions of the bundle
side-by-side
16. Features written once
Example: OpenSocial-
based dashboard as
an OSGi plugin
Written and owned by
San Francisco team
Contains UI, Shindig,
internal services, SPI,
and API
17. Dynamic deployment = faster
dev cycle
Without OSGi
With OSGi
1. Code
1. Code
2. Compile
2. Build and push to
3. Copy to WEB-INF/lib
running web
4. Restart application
application
5. Test in browser
3. Test in browser
. . . from code to browser in one or two seconds
18. Standard plugin modules
Servlet
Component
o servlet
o component
o servlet-filter
o component-import
o servlet-listener
Web Items
o servlet-context- o web-item
param
o web-section
Misc
o module-type
o web-resource
25. Plugin to bundle process
Goal: Allow simple
plugins with no OSGi
knowledge
Three types of plugins:
o Simple - no OSGi
o Moderate - OSGi
via plugin descriptor
o Complex - OSGi
via Spring XML
directly
28. Shared Access Layer (SAL)
Plugin upgrade
framework
Plugin settings
Job scheduling
i18n
Search
HTTP calls
. . . and much more
29. Atlassian REST Module Type
Implemented as a GET rest/name/1.0/bob
dynamic module
type
{
Uses JAX-RS
quot;firstNamequot;:”Bobquot;,
Can be extended
quot;lastNamequot;:quot;Smithquot;
by other plugins to
add new data }
mappers
32. And many more. . .
Applinks 2
Streams 2
Confluence Repository
Client
Template renderer
Team Hosted plugins
Studio plugins
All Crucible and
FishEye plugins
All OSGi bundles