Plugins 2.0: The Overview
-
date post
22-Oct-2014 -
Category
Technology
-
view
2.784 -
download
0
description
Transcript of Plugins 2.0: The Overview
![Page 1: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/1.jpg)
Don Brown, Atlassian
Plugins 2.0: The overview
![Page 2: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/2.jpg)
Confluence Team Hosted
QuickTime™ and a decompressor
are needed to see this picture.
![Page 3: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/3.jpg)
JIRA Studio
QuickTime™ and a decompressor
are needed to see this picture.
![Page 4: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/4.jpg)
Why do we need a new plugin framework?
![Page 5: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/5.jpg)
One feature * five products =
Dashboard
![Page 6: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/6.jpg)
Multiple teams across the globe
Gdańsk, PolandSan Francisco, USA
Kuala Lumpur, MalaysiaSydney, Australia
![Page 7: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/7.jpg)
Plugin development slow
Write plugin codeBuild pluginCopy plugin to WEB-INF/libStart appDiscover bugWash, rinse, repeat
![Page 8: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/8.jpg)
Inconsistency between products
QuickTime™ and a decompressor
are needed to see this picture.
QuickTime™ and a decompressor
are needed to see this picture.
QuickTime™ and a decompressor
are needed to see this picture.
QuickTime™ and a decompressor
are needed to see this picture.
. . . Constructor injection? Setter injection? Pico? Spring?
![Page 9: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/9.jpg)
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
![Page 10: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/10.jpg)
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
![Page 11: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/11.jpg)
Backwards compatibility
Version 1 plugins - 100% compatibleo WEB-INF/libo Confluence’s dynamic plugins
Version 2 (OSGi-based) pluginso Compatibility varies by product
![Page 12: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/12.jpg)
Which products?
Crowd 1.5 FishEye 1.5 Crucible 1.5 Confluence 2.10 JIRA 4.0Bamboo 2.3
![Page 13: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/13.jpg)
OSGi in one slide
Bundles contain code, configuration, manifest metadataRuntime dependencies at Java package, service, and bundle levelsSupports multiple versions of codeCan share dynamic service objectsLifecycle: install, resolve, active, uninstall
![Page 14: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/14.jpg)
Goal - Minimal OSGi required
Can we scale the learning curve to keep the easy plugins easy?
![Page 15: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/15.jpg)
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
![Page 16: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/16.jpg)
Dynamic deployment = faster dev cycle
Without OSGi1.Code2.Compile3.Copy to WEB-INF/lib4.Restart application5.Test in browser
With OSGi1.Code2.Build and push to
running web application
3.Test in browser
. . . from code to browser in one or two seconds
![Page 17: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/17.jpg)
Standard plugin modules
Servleto servleto servlet-filtero servlet-listener
o servlet-context-param
Componento componento component-import
Web Itemso web-itemo web-section
Misco module-typeo web-resource
![Page 18: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/18.jpg)
Sandboxed plugins
![Page 19: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/19.jpg)
DEMO: Using Atlassian Plugins
![Page 20: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/20.jpg)
Plugins architecture
![Page 21: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/21.jpg)
Plugin descriptor
atlassian-plugin.xml
<atlassian-plugin key="com.xyz.example" name="Example Plugin” plugins-version=“2”> <plugin-info> <description>A sample plugin</description> <version>1.0</version> </plugin-info> <servlet key=”test" name=”Test Servlet" class="com.xyz.TestServlet"> <description>An example servlet</description> </servlet></atlassian-plugin>
![Page 22: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/22.jpg)
Plugin descriptor - Hidden OSGiatlassian-plugin.xml
<atlassian-plugin key="com.xyz.example" name="Example Plugin” plugins-version=“2”> … <component key=”myComponent" class="com.xyz.MyComponent” public=“true”> <interface>com.xyz.Component</interface> </component>
<component-import key=”otherComponent" interface="com.abc.OtherComponent” />
</atlassian-plugin>
![Page 23: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/23.jpg)
Plugin descriptor - Hidden OSGiGenerates atlassian-plugin-spring.xml
<beans …> <bean id=“myComponent class=“com.xyz.MyComponent” />
<osgi:service id=“myComponent_service” ref=“myComponent” interface=“com.xyz.Component” />
<osgi:reference id=“otherComponent" interface="com.abc.OtherComponent” /></beans>
![Page 24: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/24.jpg)
Plugin to bundle process
Goal: Allow simple plugins with no OSGi knowledge
Three types of plugins:o Simple - no OSGio Moderate - OSGi via plugin descriptor
o Complex - OSGi via Spring XML directly
![Page 25: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/25.jpg)
Plugins 2 showcase
![Page 26: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/26.jpg)
Atlassian Gadgets
![Page 27: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/27.jpg)
Shared Access Layer (SAL)
Plugin upgrade frameworkPlugin settingsJob schedulingi18n SearchHTTP calls
. . . and much more
![Page 28: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/28.jpg)
Atlassian REST Module Type
Implemented as a dynamic module typeUses JAX-RSCan be extended by other plugins to add new data mappers
GET rest/name/1.0/bob
{ "firstName":”Bob", "lastName":"Smith"}
GET rest/name/1.0/bob
{ "firstName":”Bob", "lastName":"Smith"}
![Page 29: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/29.jpg)
Plugin Exchange Client
Uses REST plugin type for JSON, XML, and HTML
![Page 30: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/30.jpg)
Confluence Widget Connector
Widget types extendable via plugins
![Page 31: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/31.jpg)
And many more. . .
Applinks 2Streams 2Confluence Repository ClientTemplate rendererTeam Hosted pluginsStudio pluginsAll Crucible and FishEye pluginsAll OSGi bundles
![Page 32: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/32.jpg)
Join the fun!
![Page 33: Plugins 2.0: The Overview](https://reader033.fdocuments.in/reader033/viewer/2022061106/54477325b1af9f1f098b46a3/html5/thumbnails/33.jpg)
Questions