Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.
/ hi5 Public archive

Modular Web SPAs (Single Page Apps) powered by the Eclipse 4 application model

License

Notifications You must be signed in to change notification settings

erdalkaraca/hi5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hi5

HTML5 Renderer for Eclipse 4 applications. The aim is not to be able to run your existing Eclipse RCP code with minor changes in a web browser. Instead this is a complete paradigm shift in Eclipse RCP development allowing to adapt the latest web development trends and technologies.

These are the major assumptions driving the development of this project:

  • Eclipse RCP and OSGi form a stable/robust and highly modular and enduring technology stack for back end logic (server side programming)
  • even if the life time of web frameworks is very short (compared to, for example, Eclipse frameworks and projects), they reflect the latest trends in the IT regarding, for example, UX design
  • web development technologies are generally much faster to master than, for example, getting started with SWT or JavaFX, this allows for more rapid recruitment of new team members in (running projects) [my subjective observation]
  • web development tooling is sufficient (for example, all major browsers have built-in support for JavaScript debugging)

Hi5 Architecture Overview

Server side

On the server side (backend) the infrastructure of the Eclipse RCP platform is handling requests that the web client is doing. This includes collecting all available E4 fragments and merging them into the application model. Next, the merged application model is transformed into a HTML DOM representation which is then sent back to the client via HTTP.

With the Eclipse Communication Framework (ECF) there is also great support for a service driven development approach as OSGi services can serve as web services, for example, using ECF's JAX-RS integration.

Client side

On the client side you can use your favorite framework/library to provide a smooth and reactive/responsive UI.

Deployment modes

The application can be deployed in several modes:

  • typical server/client mode: Eclipse RCP backend runs on a server and the client runs in a web browser
  • local mode: Eclipse RCP backend runs locally and the client runs in a JavaFX WebView instance

Maven Build

  • checkout repo
  • switch to repo's root folder
  • mvn clean install

Update site is contained in folder:

=> releng\de.metadocks.hi5.tycho.update\target\repository

Platform specific demo products are contained in:

=> releng\de.metadocks.hi5.tycho.product\target\products

Start one of the platform specific product and point your browser to

http://localhost:8080/app/index.html

The simple library demo will start up:

Library Demo

You can also start the embedded browser (which will start a JavaFX WebView instance in a standalone window) by adding the following setting to the .ini file in the created platform specific product. For example, for the windows product navigate to

=> releng\de.metadocks.hi5.tycho.product\target\products\de.metadocks.hi5.demo.app.product\win32\win32\x86_64

open the eclipse.ini file and make sure the following settings are provided:

-Dorg.osgi.framework.bundle.parent=ext -Dhi5-start-jfx-client=true

Library Demo JavaFX

The application is still available via your browser.

Real world example

The following screenshot shows a real world example in action (the website is in german and deals with mental self-coaching) which was the initial trigger of creating this project:

syflux

Current Status

[x] means supported, [ ] means not yet implemented, [~] means covered by third party lib

E4 API Hi5
App model, fragments [x]
Window Menu [x]
IEclipseContext/Scoping [ ]
DI [ ]
EventBus [~]
Data Binding [~]
Key Bindings [ ]
ECommandService/EHandlerService (commands, handlers) [ ]
ESelectionService (part selections) [ ]
EMenuService (context menus) [ ]
EPartService (parts management) [x]

Dependencies

Project License Used for Required?
Eclipse 4 EPL defining/managing contributions of the single-page web application yes
Eclipse Modeling Framework EPL used by Eclipse 4 to model the workbench yes
RequireJS MIT client side dependencies management (AMD compliant implementation) yes
w3.css No Licence responsive layout yes
jQuery MIT client side DOM manipulation yes
Jersey CDDL 1.1 JAX-RS OSGi integration yes
Eclipse Communications Framework EPL web services support no
Eclipse Texo EPL de/serialization of EMF models from/to server/client in JSON format no
rivets js OS JS data binding no
PubSubJS MIT JavaScript Publish/Subscribe Pattern (aka EventBus) yes

License

This project is licensed under the Eclipse Public License (EPL).