This post is dedicated to “Eclipse 4.1 Application Platform” (EAP).
So what is the EAP? In short it is a Widget-Toolkit agonstic UI-Application framework for OSGi which provides the following features:
- An extensible central application model abstracting the main concepts of UI-Applications:
- UI-Concepts like Windows, Toolbars, Parts, …
- None-UI Concepts like Commands and Handlers, Extensions, …
- An event bus to get away with listeners
- UI-State persistance
- …
- A dependency injection container to keep up with modern programming technologies
- An extension system build applications from various modules instead one big
As said the EAP-Core is widget agonstic and can be used with any native UI-Technology you want to write your applications with.
Here’s an example application coded 3 times with the native technologies. The only thing they share is the EAP which provides the runtime platform.
- SWT
- Swing
- JavaFX
As of now SWT is the platform with the best support because the Eclipse 4.1 SDK is built on top of EAP and ships with a set of default SWT-Renderes. The Swing and JavaFX implementations for EAP are currently proof of concepts but can be used as a show case of how powerful and flexible the design of EAP is (you’ll find the sources in my github-repo).
The only interface EAP requires you to implement and register looks is this:
public interface IPresentationEngine { public Object createGui(MUIElement element, Object parentWidget, IEclipseContext parentContext); public Object createGui(MUIElement element); public void removeGui(MUIElement element); public Object run(MApplicationElement uiRoot, IEclipseContext appContext); public void stop();
This where EAP hands over control to you to build and keep the UI in sync with the model.
The already written IPresentationEngine implementation for Eclipse 4.1 is a good source of inspiration on how one could approach the problem but finally it is up to you – all the EAP expects you to respect is the IPresentationEngine-Interface.
… and before some mentions that the current application model is not supporting modern UI-Concepts needed to built App-UIs as you know them from smart phones, tablets, … . You can extend the application model and add the concepts you think are missing.
All I can say: If you have the task to write an UI-Application you should take a look at this new but quite solid runtime platform because it offers you many advanced concepts you’d have to reinvent if not doing so.
Pingback: Eclipse 4.1: Run your 3.x RCP in 4.1 | Tomsondev Blog
Hi Tom,
What is the relation between UFaceKit and EAP (if there’s one) ?
Well some of the experience i gathered with UFacekit has influenced EAP in one or the other way but the real difference between those are the UFaceKit is generic UI-API (specialized for Form-UIs) and EAP is an application platform with a programming model (DI) and a completely generic application model which goes beyond UI including none UI centric stuff like commands/handlers but puts them into context with UI
Can mix the different render within the same UI, e.g. one part is SWT, one part is JavaFx ?
Well you can do that even in 3.x but you need an integration between the technologies so while doable (e.g. Swing-SWT-Bridge) i don’t think that’s the way to go
Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your webpage? My website is in the exact same area of interest as yours and my users would truly benefit from some of the information you present here. Please let me know if this okay with you. Cheers!
As long as you respect Creative Commons Attribution-NonCommercial-ShareAlike 3.0 as mentionned on the right of my blog all is fine. What I don’t really like is if you simply copy complete blog post. What is the URL of your website?
Aw, thiѕ աɑs an extremely nice post. Taking the time ɑnd
ctual effort to create a superb article… Ƅut what can I
say… Ӏ hesitate а աhole lot and don’t manage
tօ get nearly anything done.