+ All Categories
Home > Technology > Nuxeo and JavaScript

Nuxeo and JavaScript

Date post: 18-Oct-2014
Category:
View: 1,471 times
Download: 1 times
Share this document with a friend
Description:
Thierry Delprat gave his thoughts about JavaScript as a language and explained how it's currently used and will be use in the Nuxeo Platform
14
1 Nuxeo Platform JavaScript in Nuxeo Platform Thierry Delprat
Transcript
Page 1: Nuxeo and JavaScript

1

Nuxeo Platform

JavaScript in Nuxeo Platform

Thierry Delprat

Page 2: Nuxeo and JavaScript

2

I am probably too old to JavaScript

Page 3: Nuxeo and JavaScript

3

Nuxeo Platform vs JavaScript

Nuxeo is not really a JavaScript Shop

● we used to be a Python Shop

● we are now 100% Java Platform● OSGi deployment and plugin model ● Strong typing● Contribute and extend with Java Classes

● Server side MVC model ● Seam (pre-CDI) / JSF

Page 4: Nuxeo and JavaScript

4

Nuxeo Platform vs JavaScript

● However this is changing, because

● You (probably) want to write JavaScript– Coding in Sublime Text is so much cooler than in Eclipse

● Light dev environment● Quick coding/deploy/test cycles

● Html5 and Browser are actually a nice UI Platform– Back to the Client/Server days !

● Some Html5 / JavaScript MVC frameworks rocks– AngularJS is a good example– A lot of nice Html5/JS Widgets

Page 5: Nuxeo and JavaScript

5

Nuxeo Platform vs JavaScript

● Bonus

● JavaScript makes coding easy ?!– People are scared to write Java code

(they should not)– People are not scared to write JavaScript code

(sometimes, they should, at least for the maintenance)

● Use JavaScript without writing actual JavaScript– CoffeeScript– Dart

Page 6: Nuxeo and JavaScript

6

Adapting Nuxeo Platform to JS

● Make room for JavaScript widgets● Extend JSF framework with simple JS Widgets

● Expose JavaScript API ● REST API/Client lib● Allow JS developers to leverage Nuxeo Services

● Build client SDK for Html5/JS framework● AngularJS, Dart/Polymer…● Use Nuxeo Platform as a PaaS

Page 7: Nuxeo and JavaScript

7

Nuxeo Widgets and JavaScript

● JSF/Facelet has a nice MVC Model● Actually pretty close to what AngularJS proposes

● We added an abstract Widget Model● But most people have a hard time building custom widgets

(remember Java is scary !)

● But most people are happy to add custom JavaScript widgets

● We built an hybrid model● JSF handles server side validation and state management

● JS handles client side display and Ajax refresh

● We use REST API to interact with the server

Page 8: Nuxeo and JavaScript

8

Examples

● Select2 integration

● JQuery widgets integration

Page 9: Nuxeo and JavaScript

9

Nuxeo Platform API

● Nuxeo Platform exposes 2 sets of http API● Resource API

– CRUD on Document, Tasks, Workflows, Users ...

● Command (RPC) API– Execute command on an object

● JSON-RPC Marshaling

● nuxeo.js● Wrap Nuxeo http API in a JavaScript client● Associated with

– JavaScript shell

– Node.js shell

– Unit tests

Page 10: Nuxeo and JavaScript

10

Examples

● Nuxeo Platform Explorer

● Nuxeo JavaScript Shell

Page 11: Nuxeo and JavaScript

11

Buidling JS Apps with Nuxeo Platform

● Nuxeo.io● Hosting the content repository

– Provide Storage, Services and API

● Hosting the Back Office : Nuxeo CAP– Provide configurable management UI

● Hosting the configuration IDE : Nuxeo Studio– Define business model, workflows, custom API

● Hosting JavaScript IDE

– Build client side using Nuxeo AngularJS SDK

Page 12: Nuxeo and JavaScript

12

Provision Platform Nuxeo Cloud Controler

Business Model Nuxeo Studio

Build WebApp Nuxeo Web IDE

nuxeo.io

Page 13: Nuxeo and JavaScript

13

Examples

Page 14: Nuxeo and JavaScript

14

Some links

● Nuxeo API● https://github.com/nuxeo/nuxeo-rest-api

● http://doc.nuxeo.com/display/NXDOC/REST+API

● nuxeo.js & Nuxeo javascript shell● https://github.com/tiry/nuxeo-automation-jsshell

● Nuxeo AngularJS sample● https://github.com/nuxeo/nuxeo-angular-sample

● https://github.com/dmetzler/nuxeo-slideshow-sample

● http://www.nuxeo.com/fr/resource-center/webinar/angularjs#recording

● Nuxeo Studio trial ● https://connect.nuxeo.com/nuxeo/site/connect/trial/form


Recommended