Presentation is loading. Please wait.

Presentation is loading. Please wait.

JavaScript Micro Services Simon Kaegi 27 March 2012.

Similar presentations


Presentation on theme: "JavaScript Micro Services Simon Kaegi 27 March 2012."— Presentation transcript:

1 JavaScript Micro Services Simon Kaegi 27 March 2012

2 What are Micro Services? OSGi minus the modularity

3 … about software development in a browser

4 Orion and OSGi Modularity e4 – OSGi style modularity in JavaScript { "Bundle-SymbolicName":"sample.jsbundle", "Bundle-Version":"1.0", "Bundle-ScriptPath":"script.js", "Import-Package":"a.resource;version=[1.0.0,2.0.0)", "Export-Package":"sample.resource;version=1.0.0", "Require-Bundle:"some.other.bundle“ } AMD – RequireJS define(["dojo", "orion/serviceregistry", "dojo/DeferredList"], function(dojo, mServiceregistry){… return exports});

5

6 Orion Plugins Orion applications are NOT made up of plugins Orion pages are designed to be 'extended' with plugins Orion plugins are 'separate' HTML pages hosted in non-visible IFrames Can be cross origin and communicate using HTML5 postMessage which is ASYNC Plugins are isolated and secure against direct modification of the hosting page

7 7 Web Application Front-end Web Client Web Application Front-end Web Server Web Application Front-end Plugin Web Application Front-end Plugin Web Application Front-end Plugin Web Application Front-end Web Client Web Application Front-end Web Server Web Application Front-end Proxied Service Web Application Front-end Proxied Service Java Web Application / OSGiProxy Server / Portal

8 Web Application Front-end Web Client Web Application Front-end Web Server Orion way / Client-side Extension Web Application Front-end Plugin Web Application Front-end Web Server Web Application Front-end Plugin Web Application Front-end Web Server

9 Eclipse IDE Extensibility

10 Orion Extensibility registerService(INTERFACE_NAME, IMPLEMENTATION, PROPERTIES) In-page Plugin

11 Comparing OSGi and Orion Service APIs Orion provides a nearly complete implementation of the Service API from OSGi BundleContext ServiceReference, ServiceRegistration, … service listeners, event types Use Strings instead of java.lang.class when referencing Service interfaces All Service calls return a “promise” – needed to abstract asynchronous service implementations No ServiceTracker currently originally built into getService but this was a mistake

12

13 What’s next Declarative Services wire.js – extends Asynchronous Module Definition define([“wire!aService", “wire!anotherService], function(aService, anotherService){…}); Configuration Admin and Metatype Services Permission Policy and Admin

14 14


Download ppt "JavaScript Micro Services Simon Kaegi 27 March 2012."

Similar presentations


Ads by Google