a simple plugin architecture for wicket
DESCRIPTION
A simple plugin architecture for the Apache Wicket web application framework, allowing pluggable GUIs.TRANSCRIPT
Wicket Meetup Amsterdam Nov 2007A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for
WicketNiels van Kampenhout [email protected] Grevink [email protected]
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Intro
• Wicket newbies
• Easy to do cool things with Wicket
• We like feedback!
http://flickr.com/photos/openthreads/234957983/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Dream
• A pluggable GUI
http://flickr.com/photos/gilest/123760608/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Use Case
• Hippo CMS
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Use Case
• Open architecture
• Easily customizable, extendible
• But people want more...!
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Problem
• Poor customizability on GUI level
• Changing and recompiling core code necessary
http://flickr.com/photos/antware/1749436733/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Problem
• Many similar but slightlydifferent applications
• Copy paste
• Forks
http://flickr.com/photos/eqqman/454920412/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Problem
• Maintenance hell
• Support hell
http://flickr.com/photos/eqqman/54508927/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Solution
• Generic platform
• Building blocks
http://flickr.com/photos/chris-fritz/2011872018/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Solution
• Hippo CMS is just one possible configuration of plugins
http://flickr.com/photos/17271969@N00/16402704/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Solution
• You can adapt the configuration to your needs
http://flickr.com/photos/cryptic/294614661/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Solution
• Any other configuration of plugins is also possible
http://flickr.com/photos/liquidx/594302659/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Tool
• Wicket
http://flickr.com/photos/lifeasart/361147812/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
The Implementation
• Prototype
http://flickr.com/photos/bootload/439400044/
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
A Wicket page
public RootPanel() {add(“list”, new ListPanel());add(“tree”, new TreePanel());add(“custom”, new SimplePanel());
}
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
A Wicket page using plugins
public RootPlugin() {}
ConfigurationConfiguration
root: class = org.example.RootPlugin children = {list, tree, custom}list: class = org.example.listPlugin children = {}custom: class = org.example.simplePlugin children = {}tree: [...]
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
Plugin configuration
• Data driven
• Any data store, implement simple interface.
• JCR repository (Jackrabbit)
• Static
• Initial page setup
• An application is an assembly of plugins
• Dynamic
• Change plugin configuration at runtime
• Can be triggered by any runtime condition
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
Global picture
• A library of Plugins
• Plugins are specialized Panels
• Plugins are packaged in separate jars
• Tiny core
• Reads plugin configuration
• Loads and assembles plugins
• Manages inter-plugin communication (event based)
• Core model classes
• Abstract base classes for common GUI elements
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
What's next
• Load plugins from configuration data store
• Jackrabbit repository classloader
• Wicket upload plugin plugin
• Add or change plugins at runtime
A Simple Plugin Architecture for Wicket Wicket Meetup Amsterdam Nov 2007
Demo
• Change plugin configuration at runtime
• Manually by filling in a form
• Triggered by a runtime condition (user credentials)