ria front-ends: flex, gwt integration in nuxeo

19
Nuxeo 5.2 Nuxeo 5.2 RIA technologies and Nuxeo RIA technologies and Nuxeo Thierry Delprat |

Upload: nuxeo

Post on 01-Nov-2014

5.697 views

Category:

Technology


3 download

DESCRIPTION

RIA (Rich Internet Applications), provide new and richer user experience for web applications. Several approaches are proposed by various vendors and open source projects, and Nuxeo is mostly agnostic in this respect, by providing appropriate data to RIA front-ends using simple protocols such as JSON. This talk will present how two RIA technologies have been recently used on Nuxeo projects, Adobe’s Flex and Google’s GWT (Google Web Toolkit).

TRANSCRIPT

Page 1: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo 5.2Nuxeo 5.2RIA technologies and NuxeoRIA technologies and Nuxeo

Thierry Delprat |

Page 2: RIA front-ends: Flex, GWT integration in Nuxeo

RIA and Nuxeo

● Already several client-side technologies● browser based: JSF/Seam and WebEngine● RCP based: Apogee

● Why adding more?● sometimes look&feel is a major issue ● rich and reactive application in a browser● for rich media management● to open Nuxeo platform to new developers● because we wanted to play :)

Page 3: RIA front-ends: Flex, GWT integration in Nuxeo

Adding Flex and GWT

Nuxeo PlatformWCM / WebSites

Hi-productivity contribution

Administration

Business Application

General publicApplication

WebEngineFlex / Air

Eclipse RCP

NXShell

JSF

GWT

DedicatedRIA

Page 4: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo 5.2Nuxeo 5.2Google Web ToolkitGoogle Web Toolkit

Thierry Delprat |

Page 5: RIA front-ends: Flex, GWT integration in Nuxeo

Why GWT ?

● To address browser based RIA● rich and reactive application without deployment

● Because GWT looks cool● nice development model● nice widget libs

● Because we are mainly Java developers● no JS developers● no (real) flex developers

Page 6: RIA front-ends: Flex, GWT integration in Nuxeo

GWT strengths

● Very pleasant development model● almost no JavaScript to write● hosted mode for real debugging● efficient UI development model

● Nice widgets libs● Handles transparently multi-browser support● Works well!

Page 7: RIA front-ends: Flex, GWT integration in Nuxeo

GWT weaknesses

● Works in a sandbox● needs to stay in the sandbox

● No real modularity system● everything must be resolved at compile time

● No state management● all the states in handled in the JS VM● browser navigation can kill the app

Page 8: RIA front-ends: Flex, GWT integration in Nuxeo

GWT use cases in Nuxeo EP

● Annotea client● a lot of UI is handled in JS client side● Nuxeo Annotea server expose a native REST API● client needs to manipulate HTML DOM

● Tiling / Annotation client● GWT UI toolkit make it easy to have a rich UI ● Nuxeo Tiling service exposes a native REST API

Page 9: RIA front-ends: Flex, GWT integration in Nuxeo

Annotations/Tiling with GWT

Page 10: RIA front-ends: Flex, GWT integration in Nuxeo

GWT and WebEngine

● WebEngine and GWT play well together● WebEngine provides navigation and pluggability● WebEngine provides REST APIs● GWT provides the widget model

● Use cases● small dedicated UI hosted into a WebEngine page

– users management– specific content browser– ...

Page 11: RIA front-ends: Flex, GWT integration in Nuxeo

Easy RIA with GWT and WebEngine

● nuxeo-gwt-coremake GWT pluggable in Nuxeo

● provide Extension-points to GWT● extensions are resolved/contributed at build time● helpers for JSON and asynchronous requests

● nuxeo-gwt-ui framework for a multi-tabbed editor for Nuxeo Documents

● Layout / Views management● Context management

Page 12: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo 5.2Nuxeo 5.2AMF/Flex connectorAMF/Flex connector

Thierry Delprat |

Page 13: RIA front-ends: Flex, GWT integration in Nuxeo

Why a flex connector ?

Flex is well suited for some applications

Rich media applications(ex: eLearning)

Applications where look & feel is capital

(ex : marketing for end users)

Page 14: RIA front-ends: Flex, GWT integration in Nuxeo

Why a Flex connector ?

● Because Flex 3 has become a real platform● Browser techno: Flex● Desktop techno: Air● Developer tools: based on Eclipse● Remoting framework : BlazeDS / AMF

● Because there are a lot of Flex developers

Page 15: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo and Flex, how ?

● Access Nuxeo ECM service from a Flex client● via HTTP with simple REST API

– reuse existing REST services– no Flex connector needed

● via AMF– native binary marshalling (fast and efficient)– requires a connector to expose Nuxeo Services via AMF

● let Flex and Air clients● fetch / push documents from Nuxeo● access all Nuxeo services

Page 16: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo Flex connector

● AMF provider choice● Exadel/Flamingo AMF connector (used in alpha)

– easy to use– bound to Seam framework– no complete dataservice API– based on GraniteDS code

● GraniteDS– complete data service API– flexible and pluggable

Page 17: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo DS – server side connector

● Based on GraniteDS● Expose Seam components via AMF remoting● Expose Runtime service via AMF remoting● Pluggable marshalling

● via NXRuntime Extension points● via GraniteDS pluggable architecture

● Use Seam for state mngt of stateful services

Page 18: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo DS – client side

● AS client side library● encapsulates Authentication● encapsulates DocumentModel marshalling

● Several samples code provided● demonstrate basic usage of Nuxeo API via AMF

● Build system integrated with maven

Page 19: RIA front-ends: Flex, GWT integration in Nuxeo

Nuxeo Air Explorer