27
Tackling Actual Problems on the Wings of the Netbeans Platform Jure Polutnik

Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Embed Size (px)

DESCRIPTION

“Virtual globe platform Gaea+ has evolved from a specialised flood simulation visualisation tool implemented as part of a research project. Initial releases were implemented in a pure Swing, which, although being a nice API, still requires a lot of work to build complex and production ready applications. In late 2009 we realised that a vast majority of time was spent on implementing generic functionalities such as portable module system and window manager, instead of working on actual problems that would push the platform to the next level. After a thorough survey of available platforms and experimental ports of the visualisation core of Gaea+, we decided to build the next release on top of the Netbeans Rich Client Platform. Netbeans Platform provides a number of excellent common APIs extending not only the Swing but also other aspects of a modular application development. This talk will present and review some of the major benefits of Netbeans Platform with a number of used and customised API examples. The talk will also point out some of the difficulties we faced during the transition to the new platform.

Citation preview

Page 1: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Tackling Actual Problems on the Wings of the Netbeans Platform

Jure Polutnik

Page 2: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Agenda

Development of Gaea+ Our experience Rich Client PlatformsNetBeans Platform & APIs

Page 3: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

About XLAB

● Founded in 2001● Employs 42+ experts in Computer Science, Electronics and Mathematics● Participated in 10+ EU FP project in ICT, 10+ national projects● Main products:

● ISL Online | Remote Collaboration solutions● MedicView | Imaging in nuclear medicine, segmentation tools● Gaea+ | 3D visualisation of realistic geographics environment

Page 4: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Evolution of Gaea+

● Virtual globe platform● Evolved from specialized flood simulation tool● 2008 Dec – Rleased first version of Gaea+

● WorldWind Java SDK● Swing + some additional UI libraries

● 2010 Mar – Released new version of Gaea+● NetBeans Rich Client Platform

● Cross platform, extensible, support for I18N● Standars-complient (WFS, WMS, KML, GPX, SHP, TIFF, OBJ)

Page 5: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Gaea+ Screenshots

Page 6: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Gaea+ Screenshots v2

Page 7: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Gaea+ Screenshots v3

Page 8: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Why we switched to RCP

● Module system● I18N and L10N● Distribution● Development time

● More - Implementing generic functionalities● Module system● Window Manager

● Less - Actual bussines logic● New features

Page 9: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Rich Client Platform

● A Rich Client Platform is an application lifecycle enviroment, a basis for desktop applications

● Basic blocks: menu, splash-screen, status bar, i18n mechanism, toolbar …

● Advantages● Reduction in development time● User interface consistency● Platform Independency● Reusability and Reliability

Page 10: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

RCP in Java world

Any many more ...

Page 11: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Swing Application Framework

Some basic features● Application life-cycle● Support for managing and loading resources● Support for Actions (defining, managing, biding)● Basic persistence of session state

Does not support● Branding● Module system and dependencies● Window system● ...

Page 12: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Spring Rich Client

● Features● Window system● Module system ● Input validation, button bars, I18N, image/icon caching, UI

threading, progress monitoring …

● But● The project seems to be dead / put aside● Release dates: 17.3.2008, 23.6.2009

Page 13: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Eclipse Rich Client Platform

Since 2003

Huge community

Plentiful of documentation and examples

RCP + many other features

Constantly improving

Open sourced (Eclipse public license - EPL)

Page 14: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Eclipse Rich Client v2 Platform

Uses SWT

Pro• Uses native elements • Supported by Eclipse• Large number of examples

Contra• Reusing existing swing code• Requires native libraries for each supported system• Not so platform independent• Management of native reources

Page 15: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

NetBeans Platform

Mature platform – since 2001, and has been supported by IDE in 2005

Large community

Plentiful of documentation and examples

RCP + many other features, Constantly improving

Open sourced

CDDL and GNU Public License v.2 w/Classpath Exception

Page 16: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

NetBeans Platform v2

Current version (6.9.1)

OSGi interoperability

Encanhements for Maved-based Netbeans Platform applications

Branding editor – L10N of NetBeans platform

Generation of native installers

Future (6.10)

Performance of IDE

Better installer support

Integration of JavaFX components

Page 17: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Eclipse RCP vs NetBeans Platform

Feature are roughly equivalentBoth are probably good choices

Depend on exact requirements

Our requirement was AWT/Swing• WWJ does not support SWT• Performance dropped for 30%, when integrated

AWT Canvas into SWT

Page 18: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Sketsa SVG Graphics Editor

Page 19: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

NetBeans IDE

Page 20: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Bluemarine

Page 21: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Office Look and Feel

● OfficeLAF module

- Flamingo

● Platform has not

been patched

Page 22: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Gaea+

Page 23: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

NetBeans Platfrom APIs

Module System APIDependencies between moduleLoading and unloading (in runtime)Version controlClassloader system

Window System APIDrag&DropDocking and undockingMaximization and minimization (Side bar)

Page 24: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

NetBeans Platfrom v2 APIs

Lookup APIIntermodule communication (Service Loader)Context sensitivity of windows, nodes and data objectsCan be used in your own objects

File System APICommunication between modulesVirtual filesystem (layer.xml)

Page 25: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

NetBeans Platfrom v3 APIs

Nodes APIVisual representation of underlaying objects

Datasystems APICustom file types

Actions APIContext-sensitive actions, registration in layer.xml

Visual Library APIExplorer & Property Sheet API...

Page 26: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

But ...

The platform is not the magic stickIt will help you create better architectureBut you can always do it “your way”

Steep learning curveWe spent 1 month just for learning and testing the

platformAnd another 2 months for porting Gaea+ to new base

Page 27: Tackling Actual Problems on the Wings of the Netbeans Platform, Jure Polutnik

Jure [email protected]

Thank you for your attention!