32
PR0017 - 2009-09-29 Redistribution and other use of this material requires written permission from The RCP Company. e4, the Next Generation Eclipse Platform After 13 years, the Eclipse framework gets it second make-over. The new work is termed e4 and will be included in Eclipse 4.0. In the first make-over the run-time was replaced in Eclipse 3.0 with OSGi to get a better and more stable foundation for plug-ins. This time the user interface and contributions are modernized for use in Eclipse 4.0. In this session, we will see some of the insides of the new paradigms in e4.

javagruppen.dk - e4, the next generation Eclipse platform

Embed Size (px)

DESCRIPTION

After 13 years, the Eclipse framework gets it second make-over. The new work is termed e4 and will be included in Eclipse 4.0.In the first make-over the run-time was replaced in Eclipse 3.0 with OSGi to get a better and more stable foundation for plug-ins. This time the user interface and contributions are modernized for use in Eclipse 4.0.In this session, we will see some of the insides of the new paradigms in e4.

Citation preview

Page 1: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

Redistribution and other use of this material requires written permission from The RCP Company.

e4, the Next Generation Eclipse Platform

After 13 years, the Eclipse framework gets it second make-over. The new work is termed e4 and will be included in Eclipse 4.0.

In the first make-over the run-time was replaced in Eclipse 3.0 with OSGi to get a better and more stable foundation for plug-ins. This time the user interface and contributions are modernized for use in Eclipse 4.0.

In this session, we will see some of the insides of the new paradigms in e4.

Page 2: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

2

Agenda

Introduction

Eclipse is… what exactly?

A little about the general Eclipse architecture

The goals and history of e4

The guts of e4

The timeline for Eclipse 4.0

Page 3: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

3

Who Are You?

Who uses with Eclipse?

Who have developed plug-ins for Eclipse?

Who have al ready looked into e4?

Who knows about Dependency Injection?

Page 4: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

4

About Me

Tonny Madsen, Founder and Owner of The RCP Company

20 years of experience in system development in major companies

Regnecentralen (now ICL) Digital (now HP) Anritsu (previously NetTest)

9 years experience as the Systems Architect of an 20+ MLoC project

8 years of experience with Eclipse and Eclipse RCP

Solutions Member of the Eclipse Foundation Chairman of Eclipse.dk Extern Lecturer at IT-University on Model Driven Development

and Domain Specific Languages Regular speaker at EclipseCon, Eclipse Summit, etc

Page 5: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

5

Eclipse is… what exactly?

Page 6: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

6

Eclipse – The Java IDE

Page 7: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

7

Eclipse – The Tools Platform

Page 8: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

8

Eclipse – The Application Platform Nordea Banking Desktop

Page 9: javagruppen.dk - e4, the next generation Eclipse platform

L0019 - 2008-11-28

9

IBM Lotus NotesVersion 8

Page 10: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

10

EclipsePlatform

Res

ourc

esW

orks

pa

ceHel

pU

pdat

e

Tea

m

Web

S

erve

r

File

syst

em

s

Apa

che

Sea

rch

Nav

igat

or

Intr

oT

ext

Edi

tors

JDT

CV

S

WT

P

Da

tato

ols

VE

BIR

T

Myl

yn

PD

E

Eclipse RCP

Run-time/OSGiSWTJFace

WorkbenchP

refe

ren

ces

Jobs

ICU

Com

man

dsR

egis

try

CD

T

A Little Aboutthe General Eclipse Architecture

Page 11: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

11

Basically…

We need an architecture that supports distributed development over a large number of autonomous development groups

We need a component concept where components are loosely coupled and can be started (and stopped) independently

We need a way to describe external interfaces of components and dependencies between components

We need a way to only start the components as they are needed – also known as late activation

We need all this to work over multiple generations of components

Page 12: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

12

EclipsePlatform

Res

ourc

es

Wor

ksp

ace

Hel

p

Upd

ate

Tea

m

Web

Ser

ver

File

syst

ems

Apa

che

Sea

rch

Nav

igat

or

Intr

o

Tex

t E

dito

rs

Eclipse Architectural Components

JDT

CV

S

WT

P

Da

tato

ols

VE

BIR

T

Myl

yn

PD

E

Eclipse RCP

Run-time/OSGi

SWT

JFace

WorkbenchP

refe

renc

es

Jobs

ICU

Com

man

ds

Reg

istr

y

CD

T

Page 13: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

13

ApplicationPlatform

Com

m.

Log

ging

Hel

p

Upd

ate

Aut

h.

Aud

itin

g

Apa

che

Intr

o

Your Typical RCP Application

Ba

se

Ad

d-o

n

Ad

d-o

n

Ad

d-o

n

Ad

d-o

n

De

bu

g T

oo

ls

Da

ta M

od

el

Eclipse RCP

Run-time/OSGi

SWT

JFace

WorkbenchP

refe

renc

es

Jobs

ICU

Com

man

ds

Reg

istr

y

Ad

d-o

n

Page 14: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

14

Organizing the Platform

The software of an Eclipse system is based on the following terms: Plug-ins – a plug-in is the basic unit of software

Fragments – a fragment is an add-on to an existing plug-in with additional functionality

Features – a feature is a number of plug-ins that is distributed and updated as a whole

Applications – an application is a Java class that implements a specific interface and is declared as such in the plug-in

Products – a product is a set of features or plug-ins along with the appropriate branding

Page 15: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

15

The Short Story

1994: IBM develops VisualAge for Smalltalk – programmed in Smalltalk 1995: Java is released to a select group 1996: IBM develops VisualAge for Java – still programmed in Smalltalk November 1998: OTI (Object Technology International – part of IBM)

commissioned to develop new development platform for Java 7. November 2001: Eclipse 2.0 made Open Source 25. June 2004: Eclipse 3.0 released introducing Eclipse RCP

Framework make-over introducing OSGi

2009: Eclipse 3.5 released – known as Galileo

27. June 2010: Eclipse 3.6 will be released Also known as Helios

June 2011: Eclipse 3.7 will be released

June 2012: Eclipse 4.0 will be released

Page 16: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

16

The Goals and History of e4

Page 17: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

17

Why A New Eclipse Framework

Simplify the Eclipse programming model This will reduce development and maintenance costs and enable a

larger developer community to leverage the platform in their own Eclipse-based applications

Enable the platform for use on emerging web-based runtime technologies This will ensure the platform remains a compelling and viable

application framework in a rapidly changing web technology landscape, and it will allow e4-based applications to leverage web technologies, while remaining insulated from specific technology choices that may quickly become obsolete

Broaden participation in development of the platform This reduces the risks associated with building on a platform largely

funded from a single source. Having a large and diverse group of commercial backers, will ensure the platform remains vibrant and viable over the long term

Page 18: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

18

Main Technical Differences between Eclipse 3.x and e4

Application Model in EMF Complete live model for the application – changes are reflected

immediately in the application

Rendering the Application Maps the model to the UI Allows for a completely new look and feel without touching the

internals Allows support for different widget sets – even Adobe Flash or

Microsoft Silverlight

Context Contains the context/environment for all contributions Brokers interaction with the framework: service lookup, service

registration

Dependency Injection Allows for POJOs for all contributions

Page 19: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

19

Basic e4 Workbench Model

Application

Command

Handler Binding

Window

Part

Menu

Part Description

Toolbar

Page 20: javagruppen.dk - e4, the next generation Eclipse platform

L0036 - 2008-11-23

20

Basic Eclipse 3.x Workbench Model

Workbench Window

Workbench Page

Editors Views

PerspectiveTop-level menu

Top-level toolbar

Status line

Perspective switcher

Drop-down menuLocal toolbar

Workbench

0..n

1..n

0..n0..n

Page 21: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

21

Application Model

Page 22: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

22

Rendering the Application

Provides the mapping of the model to a specific UI Widget Set SWT xWT GWT Adobe Flash Macrosoft Silverlight

For some of the mappings, the concrete look can be customized using CSS

A render Creates the needed widgets for the model element Binds the widget and model element

Page 23: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

23

The Current Context - IEclipseContext

Contains the current context for contributions Name/Value pairs Value can be POJO or IComputedValue objects

Created in a hierarchy Children inherits all values from parent Child contexts are used to override values locally

Used for all contributions Views Handlers Wizards Dialogs etc

Supports IClipseContext.runAndTrack – allows you to track changes in the values you use IComputedValue – allows for late creation of objects and common behavior

Used as the base data store for Dependency Injection

Page 24: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

24

Dependency Injection

Popular solution to the singleton problem: PicoContainer Spring Google Guice OSGi declarative services

Injection supported for all class members: Fields, Constructors and Methods Need not be public or protected Marked with @Inject

Possibly @Optional

Value based on type of argument or field Finds matching value from IEclipseContext Possibly marked @Named(“name”)

Used with static methods on ContextInjectionFactory: Object inject(Object object, IEclipseContext context) Object make(Class clazz, IEclipseContext context) Object invoke(Object object, String methodName, IEclipseContext context, Object defaultValue)

Page 25: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

25

Code for Parts

The code that provides the “parts” of the application is ordinary POJO No special inheritance – e.g. IViewPart or IWizardPage

public class Preview {public Preview(Composite parent, Realm workspace) {

// Create UI ...}

@Injectprivate MUILabel uiItem;

@Injectpublic void setSelection(@Optional @Named(IServiceConstants.SELECTION) IFile input) {

// React on Selection Changes}

}

Page 26: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

26

Adding Parts to the Application Model

Page 27: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

27

Open Social Gadgets

What are OpenSocialGadgets Gadgets are web-based software components based on HTML, CSS,

and JavaScript. Open Eclipse for a new set of developers Examples

Remember the Milk http://www.rememberthemilk.com Twitter Gadget …

Page 28: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

28

The e4 Story

First presented at EclipseCon ’08

20. May 2008: Mail to e4-dev „A radical approach to explore new paths for e4“

Platform designed from Scratch Based upon an EMF-Application-Model No statics, no singletons, usage of Dependency Injection Based on OSGi-Services

14. January 2010: 1.0M3 released

27. June 2010: 1.0 will be released

Page 29: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

29

If You Want to Know More about Eclipse

The foundation: http://eclipse.org

The Danish User Group: http://eclipse.dk

The training: http://www.eclipse.org/community/training/classes.php

Resources on Eclipse: http://www.eclipse.org/resources/

Consolidated Blog: http://planeteclipse.org/

Page 30: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

30

If You Want to Know More about e4

The Project: http://www.eclipse.org/e4/

Downloading e4: http://download.eclipse.org/e4/downloads/

The Wiki: http://wiki.eclipse.org/E4

The training: Not yet, but coming after the Summer

Tutorials on e4: http://www.vogella.de/articles/EclipseE4/article.html

A “create an application” tutorial from Lars Vogel

Page 31: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

31

Q & A

Page 32: javagruppen.dk - e4, the next generation Eclipse platform

PR0017 - 2009-09-29

32

Eclipse.dk – The Danish Eclipse Society

Eclipse.dk was created in Marts 2007 as a meeting place for everyone interested in the Eclipse (www.eclipse.org) platform.

The purpose of Eclipse.dk is as follows: To promote the knowledge of Eclipse in Denmark. To create networks amongst danish Eclipse-users and developers. To build knowledge on Eclipse in Denmark, especially

In danish institutes of higher education. Between danish companies developing applications based on

Eclipse.

Create and maintain a web site on Eclipse for danish users – eclipse.dk.

Strengthen the relations between danish and international Eclipse-users and organizations.

The eclipse.dk society has members representing not only vendors of Eclipse-based products and services, but also users of the platform and representatives from institutions of higher education.