Вы находитесь на странице: 1из 29

Extending Bioclipse

Ola Spjuth
Dept. Pharmaceutical Biosciences
Uppsala University
Sweden
Contents

• Eclipse architecture
– Evolution of the client
• Bioclipse architecture
• Extending Bioclipse
– Add external programs
– Write scripts
– Write Plugins
• Tutorial: Writing your first plugin for Bioclipse
Evolution of the Client: Fat
Client
All application logic on the client
Rich user experience
Platform dependent
Monolithic application
Relatively difficult to update
Evolution of the Client: Thin
Client
All application logic on the server
Massively concurrent application
Client platform independent
– Clients run in browser
Very simplistic user experience
Relatively easy to update
Evolution of the Client: Rich
Client
Rich user experience
Typically (though not necessarily) a client for
some backend service
Platform independent
–Runs with little or no modification on multiple
platforms and devices
Component model
Integrated update mechanism
Extensible
Rich or Thin Clients?
Thin client
– Casual users don’t want to install software
– Online banking, auction browsing
Rich client
– Power users demand responsive, rich, powerful
user interfaces
– Teller, bank manager, power auctioneer, life
science
What is a Rich Client?
An application that uses the windowing and GUI
features of the operating system
– Native widgets
– Drag & drop
– Integration with
platform
component
model
– Much, much,
more…
http://udig.refractions.net/confluence/display/UDIG/Home
Why Use Eclipse Rich Client
Platform?
A consistent and native look and feel across
applications and features
Provides common application services
– Native look and feel
– Window management
– Standardized component model
• Extension registry
• Update Manager
– Help system
First-class development tools
Middleware for building rich client applications!
– Allows programmers to focus on core application
not the plumbing
– Don’t reinvent the wheel
Building Platforms (1/2)
It all starts with plug-ins
– Eclipse RCP applications are composed of
components that plug into the platform
When starting development on RCP, it is
common to provide a handful of domain-specific
components that sit directly on top of RCP
Building Platforms (2/2)
It’s natural for RCP
development to spawn
one or more
“platforms”
– A custom base for
multiple development
teams to build their
applications upon
– Bioclipse is a perfect
example
Example: Maestro – NASA Space
Mission Management
Contents

• Eclipse architecture
– Evolution of the client
• Bioclipse architecture
• Extending Bioclipse
– Add external programs
– Write scripts
– Write Plugins
• Tutorial: Writing your first plugin for Bioclipse
Bioclipse architecture

Built on Eclipse Rich Client Platform (RCP)


– Minimal set of Eclipse plugins to develop a
complete software application

Makes use of Eclipse plugin-architecture


– Everything is a plugin

Adds plugins for life science


3D visualization, 2D structure editing, parsing
of molecules/proteins/spectra etc.
Architecture

•Access data from a variety of sources


Component based architecture

3D
Data analysis
2D

Bioclipse

Spectra
Proteochemometrics
Molecular dynamics
Bioclipse plugin structure
Contents

• Eclipse architecture
– Evolution of the client
• Bioclipse architecture
• Extending Bioclipse
– Add external programs
– Write scripts
– Write Plugins
• Tutorial: Writing your first plugin for Bioclipse
Add external programs
Write a script

•Javascript (Mozilla Rhino engine)


– Higher level of programming than Java
•Write scripts inside the Bioclipse
workbench
•Publish scripts as menu actions

More info in tutorial by Johannes


Wagener…
Write a plugin

Most powerful way of extending Bioclipse


Add anything
GUI components Plug-in

Algorithms
Domain objects (new entities) Plug-in

Plugins can interact


Virtually no limits for extensions Plug-in
What does a plugin consist of?
•Java classes
•Other resources (documentation, jars etc)
•Manifest files
– plugin.xml
– MANIFEST.MF
– build.properties
What is an extension point?
A point that can be extended!

•A new view: Plug-in


– org.eclipse.ui.views
•A new editor Plug-in
– org.eclipse.ui.editors
•A new help topic
Plug-in
– org.eclipse.help.toc
Plugins can declare new
extension points

•Bioresource EP:
– net.bioclipse.bioResources
Plug-in
•QSARProvider EP:
– net.bioclipse.qsar.provider
Plug-in

We add new EP:s as we need them!


Plug-in
What is an extension?

•The implementation of an extension


point
Plug-in
– Example: We add a View by
implementing the org.eclipse.ui.view
EP Plug-in

Plug-in
The manifest files (plugin.xml)
Purpose: Describe how the java classes fit in the
Eclipse framework by extending extension points

<extension
point="org.eclipse.ui.views">
<view
name=”Jmol View”
class="net.bioclipse.JmolView"
id="net.bioclipse.JmolView"
icon="icons/jmol.gif">
</view>
</extension>
Contents

• Eclipse architecture
– Evolution of the client
• Bioclipse architecture
• Extending Bioclipse
– Add external programs
– Write scripts
– Write Plugins
• Tutorial: Writing your first plugin for Bioclipse
Tutorial: Write your first plugin
for Bioclipse

Eclipse basics
Compile Bioclipse
Run Bioclipse
Write a plugin:
Create an Action
Integrate with other plugins
Create a Popup menu
Create a View
Prerequisites
Java >= 1.5 installed
Eclipse 3.2.x installed
Subclipse SVN plugin installed
Bioclipse checked out from SVN server
Clean all projects
Updated classpath

This is all done in the lab computers


Thank you!
www.bioclipse.net

Bioclipse: An open source workbench for chemo- and bioinformatics


Ola Spjuth, Tobias Helmus, Egon L Willighagen, Stefan Kuhn, Martin Eklund, Johannes
Wagener, Peter Murray-Rust, Christoph Steinbeck, Jarl E.S. Wikberg
BMC Bioinformatics 2007, 8:59

Вам также может понравиться