SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
Building complex and modular
RIAs with OSGi
™
and Flex
®
francois.fornaciari@zenika.com
www.zenika.com
Content
• Introduction
• OSGi™
and Flex®
interactions
• Application modularization
• Demo
• Conclusion
2ApacheCon NA 2010 - François Fornaciari
• Java EE / RIA consultant and trainer
• Technical leader on the new temporary
staff search engine at Manpower
• Board member of the OSGi™
Users’
Group France
• Over the last 4 years
• Participation in the refactoring of the new
version of JOnAS based on OSGi™
3ApacheCon NA 2010 - François Fornaciari
Bio
What is Flex
®
(1/2)
• Framework for building RIA
• Flash technology
• Flash Player (VM)
• Free Software Development Kit (SDK)
• Strong integration with Java
• Tooling
• Flash Builder™
: IDE based on Eclipse
• IntelliJ IDEA
4ApacheCon NA 2010 - François Fornaciari
What is Flex
®
(2/2)
• MXML: XML-based language
• ActionScript: ECMAScript-compliant
scripting
• Library of pre-built components
• Compiler: create SWFs from
MXML/ActionScript
5ApacheCon NA 2010 - François Fornaciari
MXML
• XML-based language
• Declarative way to build applications
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:Panel>
<s:Label text="Label" />
<s:Button label="Button" />
</s:Panel>
</s:Application>
6ApacheCon NA 2010 - François Fornaciari
ActionScript
• Core of the Flex®
Framework
• ECMAScript-compliant scripting
• Familiar syntax
package com.zenika.flex {
public class MyClass interface MyInterface {
public function MyClass() {
}
public function doSomething():String {
}
}
}
7ApacheCon NA 2010 - François Fornaciari
What is OSGi
™
• OSGi™
framework specifications (4.2)
• Core Specification
• Compendium Specification
• Enterprise Specification
• A module system and service
platform for the Java programming
language
8ApacheCon NA 2010 - François Fornaciari
Purpose
• Presentation of the main design
patterns for building complex and
modular applications with OSGi™
and
Flex®
• Two axes
• Communication between Flex®
and
OSGi™
• Application modularization
9ApacheCon NA 2010 - François Fornaciari
General architecture
Flex®
OSGi™
Framework
Client (browser) Server (Java)
HTTPService
WebService
RemoteObject
Producer
Consumer
SWFApplication
SWFModule
SWFModule
Bundle
Bundle
Bundle
10ApacheCon NA 2010 - François Fornaciari
Handling remote calls
• HTTPService, WebService, Remote
Objects, Consumer/Producer
• Asynchronous calls
• Result, Fault or Message handlers
• Arguments and result types
• Strongly typed or generic objects
• XML format
• Properties
• URL, destination, endpoint, id, …
11ApacheCon NA 2010 - François Fornaciari
Service call example
private function callService():void {
var service:MyService = new MyService(destination);
service.addEventListener(ResultEvent.RESULT, onResult);
service.addEventListener(FaultEvent.FAULT, onFault);
service.send();
}
private function onResult(event:ResultEvent):void {
var result:MyObject = event.result as MyObject;
...
}
private function onFault(event:FaultEvent):void {...}
12ApacheCon NA 2010 - François Fornaciari
Accessing web services (1/2)
• “Non-OSGi™
” services
• Flex consumer objects
• HTTPService
• Supported methods: GET | POST
• HEAD | OPTIONS | PUT | TRACE | DELETE
only through the server-based proxy service
• WebService
• Provides access to SOAP-based web
services on remote servers
13ApacheCon NA 2010 - François Fornaciari
Accessing web services (2/2)
• Expose OSGi™
services through the
“Remote Services Specification”
• Development of OSGi™
standard
services
• Service properties for defining
• SOAP-based services
• RESTful JAXRS-based endpoints
• Implementation: Distributed OSGi™
• Sub-project of Apache CXF
14ApacheCon NA 2010 - François Fornaciari
Accessing OSGi
™
services
• In a transparent way
• Two communication types
• RemoteObject
• Simple call to an existing OSGi™
service
• Strongly-typed arguments and result or …
• … generic objects
• Producer/Consumer
• Topic subscription
15ApacheCon NA 2010 - François Fornaciari
AMF Protocol
• Action Message Format (v3)
• Binary format used to serialize
ActionScript objects
• Optimized transferred data amount
• Primarily used to exchange data
between Adobe Flash applications and
remote services
• Specification since 2007
• Supported by many server-side languages
and technologies: Java™
, .NET, PHP, …
16ApacheCon NA 2010 - François Fornaciari
Integration frameworks
• Existing open source frameworks
• AMF3 for OSGi™
(Christopher Brind)
• Robust, OSGi™
compliant and easy to use
• Only 3 bundles to deploy
Name OSGi™
support RemoteObject OSGi
™
EventAdmin
bridge
AMF3 for OSGi™
(LGPL) yes yes yes
GraniteDS (LGPL) yes (prototype) yes (unstable) no
Spring Flex (ASL) yes (Virgo) yes no
17ApacheCon NA 2010 - François Fornaciari
AMF3 for OSGi
™
• OSGi™
bundle description
• uk.co.arum.osgi.amf3
• Serialization-deserialization of AMF3 objects
• uk.co.arum.osgi.amf3.http
• Registers an HTTP servlet that is capable of
reading and writing AMF3 objects
• uk.co.arum.osgi.amf3.flex.remoting
• Implements FlexRemoting over HTTP
• Provides support for channel based
messaging
18ApacheCon NA 2010 - François Fornaciari
Apache Felix projects (1/2)
• Core of the server-side application
• Framework
• File Install
• Directory based OSGi™
management agent
• Used internally by AMF3 for OSGi ™
• Declarative Service (SCR)
• Event Admin Service
• Log Service
• HTTP Service (Jetty)
19ApacheCon NA 2010 - François Fornaciari
Apache Felix projects (2/2)
• Application-specific projects
• Event Admin Service
• OSGi™
EventHandler receives messages
from Flex Producers
• Messages posted by the OSGi™
EventAdmin
service are received by Flex Consumers
• iPOJO
• Used to declare OSGi™
components
• Support of annotations
• Extensible handlers
20ApacheCon NA 2010 - François Fornaciari
Event Admin
• Based on the Publish-Subscribe
pattern
Publisher
EventAdmin
« service »
postEvent
(topics)
EventHandler
« service »
handleEvent
(topics)
21ApacheCon NA 2010 - François Fornaciari
Publishing OSGi
™
services
• Additional service property
• AMF_SERVICE_NAME
• Instantiated with the service class name
@Component(name="MyService")
@Provides
public class MyServiceImpl implements MyService {
@ServiceProperty(name="AMF_SERVICE_NAME")
private String serviceName = MyService.class.getName();
...
}
22ApacheCon NA 2010 - François Fornaciari
Consuming OSGi
™
services
• Flex RemoteObject
• Endpoint: AMF3 servlet path
ex: http://localhost:8080/amf3osgi
• Destination: OSGi™
service class name
<s:RemoteObject id="myService"
endpoint="/amf3osgi"
destination="com.zenika.service.MyService">
<s:method name="doSometing"
result="onResult(event)"
fault="onFault(event)" />
</s:RemoteObject>
23ApacheCon NA 2010 - François Fornaciari
Producer / Consumer (1/2)
• Bridge between Flex®
events and
EventAdmin service
• Elements attributes
• Consumer: callback when a message is
received
• Consumer and producer: destination
<s:Consumer message="onMessage(event)"
destination="events"
fault="onFault(event)" />
<s:Producer destination="events"
fault="onFault(event)" />
24ApacheCon NA 2010 - François Fornaciari
Producer / Consumer (2/2)
• Destination configuration
• Set of channels used to send messages
to a target destination
• QoS: many channels for network failure
tolerance
var channelSet:ChannelSet = new ChannelSet();
var channel:AMFChannel =
new AMFChannel("events","/amf3osgi");
channel.pollingInterval = 5000;
channelSet.addChannel(channel);
consumer.channelSet = channelSet;
25ApacheCon NA 2010 - François Fornaciari
Sending messages (1/2)
• From OSGi™
• PublishedObjectEvent (channelID, object)
• Extends org.osgi.service.event.Event
@Bind
public void bindEventAdmin(EventAdmin eventAdmin) {
this.eventAdmin = eventAdmin;
}
private void sendMessage() {
eventAdmin.postEvent(
new PublishedObjectEvent("events", object));
}
26ApacheCon NA 2010 - François Fornaciari
Sending messages (2/2)
• From Flex®
• Sending AsyncMessage through the
producer
• Body: object to send
var message:AsyncMessage = new AsyncMessage();
message.body = messageObject;
producer.send(message);
27ApacheCon NA 2010 - François Fornaciari
Receiving message (1/2)
@Component(name="FlexEventHandler")
@Provides
public class FlexEventHandler implements EventHandler {
@ServiceProperty(name="event.topics")
private String eventTopics =
".../amf3/flex/remoting/events/PublishedObjectEvent";
@ServiceProperty(name="event.filter")
private String eventFilter = "(channel.id=events)";
public void handleEvent(Event event) {
if (event instanceof PublishedObjectEvent) { ...}
}
}
28ApacheCon NA 2010 - François Fornaciari
Receiving message (2/2)
private function start():void {
consumer.subscribe();
}
private function stop():void {
consumer.unsubscribe();
}
private function onMessage(event:MessageEvent):void {
var msg:MyMessage = event.message.body as MyMessage;
...
}
• Start / cancel subscription
• Message: typed-object
29ApacheCon NA 2010 - François Fornaciari
Flex
®
modulary
• Flex®
modules
• SWF files that can be loaded and
unloaded at runtime by an application
• Free up memory and resources if needed
• Better encapsulation
• No need to load all modules at startup
• Smaller initial download size
• Cannot be run independently
30ApacheCon NA 2010 - François Fornaciari
Main goal
• OSGi™
is the Java modularity
• Flex®
supports modules
• How can we build a complete modular
application?
31ApacheCon NA 2010 - François Fornaciari
Creating modules
• “Module” as root element
<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
implements="...api.ModuleInterface"
creationComplete="start()">
<fx:Script>
<![CDATA[
public function start():void {...}
public function stop():void {...}
]]>
</fx:Script>
<s:Label text="Label" />
</mx:Module>
32ApacheCon NA 2010 - François Fornaciari
Module lifecycle
• Start method is called when the
module is loaded
• Stop method is called before
unloading the module
• Common interface between the
application and the module
package com.zenika.systemmanager.api {
public interface ModuleInterface {
function stop():void;
}
}
33ApacheCon NA 2010 - François Fornaciari
Module
Bundle
Packaging
Application
Bundle
UI
(SWF)
JAVA
(OSGi™
)
• Each bundle contains
• Business logic
• OSGi™
services
• User interface
• SWF file
• Building tools like
Maven, Ant or Gradle
can ease the packaging
phase
manifest manifest
34ApacheCon NA 2010 - François Fornaciari
UI
(SWF)
JAVA
(OSGi™
)
Application bundle
• User Interface skeleton
• Able to retrieve list of available
modules
• OSGi™
service for getting module URLs
• Flex®
client notified when a module
appears or disappears
• Flex consumer is aware of events
posted by the EventAdmin
35ApacheCon NA 2010 - François Fornaciari
Technical view (1/4)
• At startup, registers bundle resources
by using the HTTP Service
• Main SWF, HTML files, …
• Gets registered modules and listens
to bundle arrival / departure
• Implementation of the extender pattern
36ApacheCon NA 2010 - François Fornaciari
Technical view (2/4)
• Extender pattern
• Use of a BundleTracker in order to be
notified of ACTIVE bundles declaring
Flex®
modules
• MANIFEST.MF :
• SWF-Modules: [path]=[SWF name]
• Register / unregister SWFs into path
• Creation of a resource-aware context
• Post event to notify Flex®
client
37ApacheCon NA 2010 - François Fornaciari
Technical view (3/4)
var modules:ArrayCollection = event.result as
ArrayCollection;
for each(var module:SWFModule in modules) {
var loader:ModuleLoader = new ModuleLoader(module.url);
// Register event listeners
loader.addEventListener(ModuleEvent.READY,
handleModuleReady);
loader.addEventListener(ModuleEvent.ERROR,
handleModuleError);
// Start the module loading
loader.load();
}
38ApacheCon NA 2010 - François Fornaciari
Technical view (4/4)
• After bundle undeployment
• Call the stop method
• Stop properly on-going processes
• Warning: OSGi™
services have already been
unregistered
• Unload associated modules
• Free-up memory and resources
39ApacheCon NA 2010 - François Fornaciari
Module bundle
• Autonomous module
• Contains its own UI and logic
• Good isolation
• Flex®
modules have to be based upon
their own OSGi™
services
• Avoid using unregistered services or
managing service dynamicity on the client-
side
40ApacheCon NA 2010 - François Fornaciari
Demo
Conclusion (1/2)
• Flex®
• Development of rich interfaces
• Native support of modules
• Loading / unloading modules at runtime
• OSGi™
• The Dynamic Module System for Java™
• Service Oriented Architecture
• Service availability to Flex®
42ApacheCon NA 2010 - François Fornaciari
Conclusion (2/2)
• Seamless communications
• Asynchronous remote calls
• Notifications
• Integration
• Application: set of autonomous bundles
with their own interface and business
logic
43ApacheCon NA 2010 - François Fornaciari
References
• OSGi™
: www.osgi.org
• Apache Felix: felix.apache.org
• Adobe Flex®
:
www.adobe.com/fr/products/flex
• AMF3 for OSGi™
:
www.arum.co.uk/amf3osgi.php
44ApacheCon NA 2010 - François Fornaciari
Questions
45ApacheCon NA 2010 - François Fornaciari
francois.fornaciari@zenika.com
www.zenika.com

Weitere ähnliche Inhalte

Was ist angesagt?

Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Lucas Jellema
 
Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...
Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...
Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...Serdar Basegmez
 
Flink Connector Development Tips & Tricks
Flink Connector Development Tips & TricksFlink Connector Development Tips & Tricks
Flink Connector Development Tips & TricksEron Wright
 
Alfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Software
 
Matt's PSGI Archive
Matt's PSGI ArchiveMatt's PSGI Archive
Matt's PSGI ArchiveDave Cross
 
Alfresco 5.2 REST API
Alfresco 5.2 REST APIAlfresco 5.2 REST API
Alfresco 5.2 REST APIJ V
 
OSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoringOSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoringGianluca Arbezzano
 
Towards Flink 2.0: Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
Towards Flink 2.0:  Unified Batch & Stream Processing - Aljoscha Krettek, Ver...Towards Flink 2.0:  Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
Towards Flink 2.0: Unified Batch & Stream Processing - Aljoscha Krettek, Ver...Flink Forward
 

Was ist angesagt? (9)

Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
 
Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...
Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...
Engage 2019: Your Data in the Major Leagues: A Practical and Updated Guide to...
 
Flink Connector Development Tips & Tricks
Flink Connector Development Tips & TricksFlink Connector Development Tips & Tricks
Flink Connector Development Tips & Tricks
 
Alfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo Data
 
Matt's PSGI Archive
Matt's PSGI ArchiveMatt's PSGI Archive
Matt's PSGI Archive
 
OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta
 
Alfresco 5.2 REST API
Alfresco 5.2 REST APIAlfresco 5.2 REST API
Alfresco 5.2 REST API
 
OSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoringOSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoring
 
Towards Flink 2.0: Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
Towards Flink 2.0:  Unified Batch & Stream Processing - Aljoscha Krettek, Ver...Towards Flink 2.0:  Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
Towards Flink 2.0: Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
 

Andere mochten auch

Comunicación de diciembre 2012
Comunicación de diciembre 2012Comunicación de diciembre 2012
Comunicación de diciembre 2012Pablo Ruiz Amo
 
Tech talk October 2014 - Rotary Cadre Foundation Communication
Tech talk October 2014 - Rotary Cadre Foundation CommunicationTech talk October 2014 - Rotary Cadre Foundation Communication
Tech talk October 2014 - Rotary Cadre Foundation CommunicationPablo Ruiz Amo
 
Shot types ppt
Shot types pptShot types ppt
Shot types pptecsmedia
 
Shot types
Shot typesShot types
Shot typesecsmedia
 
shot types presentation by thanh and his group
shot types presentation by thanh and his groupshot types presentation by thanh and his group
shot types presentation by thanh and his groupecsmedia
 
Y3 course introduction
Y3 course introductionY3 course introduction
Y3 course introductionAlison Hardy
 
Media presentation pinar
Media presentation pinarMedia presentation pinar
Media presentation pinarecsmedia
 
Angle shots
Angle shotsAngle shots
Angle shotsecsmedia
 
20100505 Versenypolitika Es Allami Tamogatas
20100505 Versenypolitika Es Allami Tamogatas20100505 Versenypolitika Es Allami Tamogatas
20100505 Versenypolitika Es Allami Tamogatasgaalnorb
 
Pre production 1
Pre production 1Pre production 1
Pre production 1ecsmedia
 
Nivki 2010 - Oleg
Nivki 2010 - OlegNivki 2010 - Oleg
Nivki 2010 - Olegnivki
 
Pre production power point presentation
Pre production power point presentationPre production power point presentation
Pre production power point presentationecsmedia
 

Andere mochten auch (20)

Sea
SeaSea
Sea
 
Cases
CasesCases
Cases
 
Comunicación de diciembre 2012
Comunicación de diciembre 2012Comunicación de diciembre 2012
Comunicación de diciembre 2012
 
Action2012
Action2012Action2012
Action2012
 
Tech talk October 2014 - Rotary Cadre Foundation Communication
Tech talk October 2014 - Rotary Cadre Foundation CommunicationTech talk October 2014 - Rotary Cadre Foundation Communication
Tech talk October 2014 - Rotary Cadre Foundation Communication
 
Shot types ppt
Shot types pptShot types ppt
Shot types ppt
 
Shot types
Shot typesShot types
Shot types
 
shot types presentation by thanh and his group
shot types presentation by thanh and his groupshot types presentation by thanh and his group
shot types presentation by thanh and his group
 
Y3 course introduction
Y3 course introductionY3 course introduction
Y3 course introduction
 
55555
5555555555
55555
 
Storyboard
StoryboardStoryboard
Storyboard
 
Direct Navigation
Direct NavigationDirect Navigation
Direct Navigation
 
Media presentation pinar
Media presentation pinarMedia presentation pinar
Media presentation pinar
 
Emeief prof
Emeief profEmeief prof
Emeief prof
 
Angle shots
Angle shotsAngle shots
Angle shots
 
20100505 Versenypolitika Es Allami Tamogatas
20100505 Versenypolitika Es Allami Tamogatas20100505 Versenypolitika Es Allami Tamogatas
20100505 Versenypolitika Es Allami Tamogatas
 
Pre production 1
Pre production 1Pre production 1
Pre production 1
 
Nivki 2010 - Oleg
Nivki 2010 - OlegNivki 2010 - Oleg
Nivki 2010 - Oleg
 
Pre production power point presentation
Pre production power point presentationPre production power point presentation
Pre production power point presentation
 
upload test2
upload test2upload test2
upload test2
 

Ähnlich wie Apache conna2010 os-gi_flex-fornaciari

The Open eHealth Integration Platform
The Open eHealth Integration PlatformThe Open eHealth Integration Platform
The Open eHealth Integration Platformkrasserm
 
Building complex and modular RIAs with OSGi and Flex
Building complex and modular RIAs with OSGi and FlexBuilding complex and modular RIAs with OSGi and Flex
Building complex and modular RIAs with OSGi and FlexCARA_Lyon
 
25 Intro to Symfony #burningkeyboards
25 Intro to Symfony #burningkeyboards25 Intro to Symfony #burningkeyboards
25 Intro to Symfony #burningkeyboardsDenis Ristic
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NETYaniv Uriel
 
A Brief History of OWIN
A Brief History of OWINA Brief History of OWIN
A Brief History of OWINRyan Riley
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixYunong Xiao
 
Attacking SAP Mobile
Attacking SAP MobileAttacking SAP Mobile
Attacking SAP MobileERPScan
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
Near real-time anomaly detection at Lyft
Near real-time anomaly detection at LyftNear real-time anomaly detection at Lyft
Near real-time anomaly detection at Lyftmarkgrover
 
Voxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKsVoxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKsVoxeo Corp
 
Make the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourceMake the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourcePerfecto by Perforce
 
Education using FIRE
Education using FIRE Education using FIRE
Education using FIRE FORGE project
 
The Open eHealth Integration Platform
The Open eHealth Integration PlatformThe Open eHealth Integration Platform
The Open eHealth Integration Platformkrasserm
 
Education using FIRE
Education using FIREEducation using FIRE
Education using FIREFORGE project
 
Integrating Alfresco @ Scale (via event-driven micro-services)
Integrating Alfresco @ Scale (via event-driven micro-services)Integrating Alfresco @ Scale (via event-driven micro-services)
Integrating Alfresco @ Scale (via event-driven micro-services)J V
 
FluentD for end to end monitoring
FluentD for end to end monitoringFluentD for end to end monitoring
FluentD for end to end monitoringPhil Wilkins
 
Apache Flex - Enterprise ready GUI framework
Apache Flex - Enterprise ready GUI frameworkApache Flex - Enterprise ready GUI framework
Apache Flex - Enterprise ready GUI frameworkTomislav Pokrajcic
 

Ähnlich wie Apache conna2010 os-gi_flex-fornaciari (20)

OUGF - OSGi / Flex
OUGF - OSGi / FlexOUGF - OSGi / Flex
OUGF - OSGi / Flex
 
OUGF OSGi/Flex
OUGF OSGi/FlexOUGF OSGi/Flex
OUGF OSGi/Flex
 
The Open eHealth Integration Platform
The Open eHealth Integration PlatformThe Open eHealth Integration Platform
The Open eHealth Integration Platform
 
Building complex and modular RIAs with OSGi and Flex
Building complex and modular RIAs with OSGi and FlexBuilding complex and modular RIAs with OSGi and Flex
Building complex and modular RIAs with OSGi and Flex
 
25 Intro to Symfony #burningkeyboards
25 Intro to Symfony #burningkeyboards25 Intro to Symfony #burningkeyboards
25 Intro to Symfony #burningkeyboards
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
 
A Brief History of OWIN
A Brief History of OWINA Brief History of OWIN
A Brief History of OWIN
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
Attacking SAP Mobile
Attacking SAP MobileAttacking SAP Mobile
Attacking SAP Mobile
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
 
Near real-time anomaly detection at Lyft
Near real-time anomaly detection at LyftNear real-time anomaly detection at Lyft
Near real-time anomaly detection at Lyft
 
Voxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKsVoxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKs
 
Make the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourceMake the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open Source
 
Education using FIRE
Education using FIRE Education using FIRE
Education using FIRE
 
The Open eHealth Integration Platform
The Open eHealth Integration PlatformThe Open eHealth Integration Platform
The Open eHealth Integration Platform
 
Education using FIRE
Education using FIREEducation using FIRE
Education using FIRE
 
Integrating Alfresco @ Scale (via event-driven micro-services)
Integrating Alfresco @ Scale (via event-driven micro-services)Integrating Alfresco @ Scale (via event-driven micro-services)
Integrating Alfresco @ Scale (via event-driven micro-services)
 
FluentD for end to end monitoring
FluentD for end to end monitoringFluentD for end to end monitoring
FluentD for end to end monitoring
 
Apache Flex - Enterprise ready GUI framework
Apache Flex - Enterprise ready GUI frameworkApache Flex - Enterprise ready GUI framework
Apache Flex - Enterprise ready GUI framework
 

Mehr von Zenika

Datascience & IoT
Datascience & IoTDatascience & IoT
Datascience & IoTZenika
 
Matinale Agile Wake Up #4 : les tests et l'agilité
Matinale Agile Wake Up #4 : les tests et l'agilitéMatinale Agile Wake Up #4 : les tests et l'agilité
Matinale Agile Wake Up #4 : les tests et l'agilitéZenika
 
Agile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UXAgile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UXZenika
 
Agile Wake Up #3 : La transformation Agile de Kisio Digital
Agile Wake Up #3 : La transformation Agile de Kisio DigitalAgile Wake Up #3 : La transformation Agile de Kisio Digital
Agile Wake Up #3 : La transformation Agile de Kisio DigitalZenika
 
Agile Wake Up #3 : la contractualisation Agile
Agile Wake Up #3 : la contractualisation AgileAgile Wake Up #3 : la contractualisation Agile
Agile Wake Up #3 : la contractualisation AgileZenika
 
Zenika matinale spark-zeppelin_ml
Zenika matinale spark-zeppelin_mlZenika matinale spark-zeppelin_ml
Zenika matinale spark-zeppelin_mlZenika
 
Docker du mythe à la réalité
Docker du mythe à la réalitéDocker du mythe à la réalité
Docker du mythe à la réalitéZenika
 
Motivation 3.0 : sens, autonomie et maîtrise.
Motivation 3.0 : sens, autonomie et maîtrise.Motivation 3.0 : sens, autonomie et maîtrise.
Motivation 3.0 : sens, autonomie et maîtrise.Zenika
 
Matinale React
Matinale ReactMatinale React
Matinale ReactZenika
 
NigthClazz Spark - Machine Learning / Introduction à Spark et Zeppelin
NigthClazz Spark - Machine Learning / Introduction à Spark et ZeppelinNigthClazz Spark - Machine Learning / Introduction à Spark et Zeppelin
NigthClazz Spark - Machine Learning / Introduction à Spark et ZeppelinZenika
 
NightClazz Spark / Machine Learning
NightClazz Spark / Machine LearningNightClazz Spark / Machine Learning
NightClazz Spark / Machine LearningZenika
 
HTTP2 : ce qui va changer par Julien Landuré
HTTP2 : ce qui va changer par Julien LanduréHTTP2 : ce qui va changer par Julien Landuré
HTTP2 : ce qui va changer par Julien LanduréZenika
 
Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...
Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...
Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...Zenika
 
Agile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud Villenave
Agile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud VillenaveAgile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud Villenave
Agile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud VillenaveZenika
 
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelleAgile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelleZenika
 
Entreprise libérée : Du mythe à la réalité ?
Entreprise libérée : Du mythe à la réalité ?Entreprise libérée : Du mythe à la réalité ?
Entreprise libérée : Du mythe à la réalité ?Zenika
 
Conference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieConference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieZenika
 
NightClazz Docker Découverte
NightClazz Docker Découverte NightClazz Docker Découverte
NightClazz Docker Découverte Zenika
 
Matinale DevOps / Docker
Matinale DevOps / DockerMatinale DevOps / Docker
Matinale DevOps / DockerZenika
 
NightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteNightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteZenika
 

Mehr von Zenika (20)

Datascience & IoT
Datascience & IoTDatascience & IoT
Datascience & IoT
 
Matinale Agile Wake Up #4 : les tests et l'agilité
Matinale Agile Wake Up #4 : les tests et l'agilitéMatinale Agile Wake Up #4 : les tests et l'agilité
Matinale Agile Wake Up #4 : les tests et l'agilité
 
Agile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UXAgile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UX
 
Agile Wake Up #3 : La transformation Agile de Kisio Digital
Agile Wake Up #3 : La transformation Agile de Kisio DigitalAgile Wake Up #3 : La transformation Agile de Kisio Digital
Agile Wake Up #3 : La transformation Agile de Kisio Digital
 
Agile Wake Up #3 : la contractualisation Agile
Agile Wake Up #3 : la contractualisation AgileAgile Wake Up #3 : la contractualisation Agile
Agile Wake Up #3 : la contractualisation Agile
 
Zenika matinale spark-zeppelin_ml
Zenika matinale spark-zeppelin_mlZenika matinale spark-zeppelin_ml
Zenika matinale spark-zeppelin_ml
 
Docker du mythe à la réalité
Docker du mythe à la réalitéDocker du mythe à la réalité
Docker du mythe à la réalité
 
Motivation 3.0 : sens, autonomie et maîtrise.
Motivation 3.0 : sens, autonomie et maîtrise.Motivation 3.0 : sens, autonomie et maîtrise.
Motivation 3.0 : sens, autonomie et maîtrise.
 
Matinale React
Matinale ReactMatinale React
Matinale React
 
NigthClazz Spark - Machine Learning / Introduction à Spark et Zeppelin
NigthClazz Spark - Machine Learning / Introduction à Spark et ZeppelinNigthClazz Spark - Machine Learning / Introduction à Spark et Zeppelin
NigthClazz Spark - Machine Learning / Introduction à Spark et Zeppelin
 
NightClazz Spark / Machine Learning
NightClazz Spark / Machine LearningNightClazz Spark / Machine Learning
NightClazz Spark / Machine Learning
 
HTTP2 : ce qui va changer par Julien Landuré
HTTP2 : ce qui va changer par Julien LanduréHTTP2 : ce qui va changer par Julien Landuré
HTTP2 : ce qui va changer par Julien Landuré
 
Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...
Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...
Agile Wake Up #1 du 01/12/2015 : L'agilité au service des projets Orange Fran...
 
Agile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud Villenave
Agile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud VillenaveAgile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud Villenave
Agile Wake Up #1 du 01/12/2015 : Scrum Master's Diary par Arnaud Villenave
 
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelleAgile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
 
Entreprise libérée : Du mythe à la réalité ?
Entreprise libérée : Du mythe à la réalité ?Entreprise libérée : Du mythe à la réalité ?
Entreprise libérée : Du mythe à la réalité ?
 
Conference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieConference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partie
 
NightClazz Docker Découverte
NightClazz Docker Découverte NightClazz Docker Découverte
NightClazz Docker Découverte
 
Matinale DevOps / Docker
Matinale DevOps / DockerMatinale DevOps / Docker
Matinale DevOps / Docker
 
NightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteNightClazz Java 8 Decouverte
NightClazz Java 8 Decouverte
 

Kürzlich hochgeladen

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Apache conna2010 os-gi_flex-fornaciari

  • 1. Building complex and modular RIAs with OSGi ™ and Flex ® francois.fornaciari@zenika.com www.zenika.com
  • 2. Content • Introduction • OSGi™ and Flex® interactions • Application modularization • Demo • Conclusion 2ApacheCon NA 2010 - François Fornaciari
  • 3. • Java EE / RIA consultant and trainer • Technical leader on the new temporary staff search engine at Manpower • Board member of the OSGi™ Users’ Group France • Over the last 4 years • Participation in the refactoring of the new version of JOnAS based on OSGi™ 3ApacheCon NA 2010 - François Fornaciari Bio
  • 4. What is Flex ® (1/2) • Framework for building RIA • Flash technology • Flash Player (VM) • Free Software Development Kit (SDK) • Strong integration with Java • Tooling • Flash Builder™ : IDE based on Eclipse • IntelliJ IDEA 4ApacheCon NA 2010 - François Fornaciari
  • 5. What is Flex ® (2/2) • MXML: XML-based language • ActionScript: ECMAScript-compliant scripting • Library of pre-built components • Compiler: create SWFs from MXML/ActionScript 5ApacheCon NA 2010 - François Fornaciari
  • 6. MXML • XML-based language • Declarative way to build applications <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <s:Panel> <s:Label text="Label" /> <s:Button label="Button" /> </s:Panel> </s:Application> 6ApacheCon NA 2010 - François Fornaciari
  • 7. ActionScript • Core of the Flex® Framework • ECMAScript-compliant scripting • Familiar syntax package com.zenika.flex { public class MyClass interface MyInterface { public function MyClass() { } public function doSomething():String { } } } 7ApacheCon NA 2010 - François Fornaciari
  • 8. What is OSGi ™ • OSGi™ framework specifications (4.2) • Core Specification • Compendium Specification • Enterprise Specification • A module system and service platform for the Java programming language 8ApacheCon NA 2010 - François Fornaciari
  • 9. Purpose • Presentation of the main design patterns for building complex and modular applications with OSGi™ and Flex® • Two axes • Communication between Flex® and OSGi™ • Application modularization 9ApacheCon NA 2010 - François Fornaciari
  • 10. General architecture Flex® OSGi™ Framework Client (browser) Server (Java) HTTPService WebService RemoteObject Producer Consumer SWFApplication SWFModule SWFModule Bundle Bundle Bundle 10ApacheCon NA 2010 - François Fornaciari
  • 11. Handling remote calls • HTTPService, WebService, Remote Objects, Consumer/Producer • Asynchronous calls • Result, Fault or Message handlers • Arguments and result types • Strongly typed or generic objects • XML format • Properties • URL, destination, endpoint, id, … 11ApacheCon NA 2010 - François Fornaciari
  • 12. Service call example private function callService():void { var service:MyService = new MyService(destination); service.addEventListener(ResultEvent.RESULT, onResult); service.addEventListener(FaultEvent.FAULT, onFault); service.send(); } private function onResult(event:ResultEvent):void { var result:MyObject = event.result as MyObject; ... } private function onFault(event:FaultEvent):void {...} 12ApacheCon NA 2010 - François Fornaciari
  • 13. Accessing web services (1/2) • “Non-OSGi™ ” services • Flex consumer objects • HTTPService • Supported methods: GET | POST • HEAD | OPTIONS | PUT | TRACE | DELETE only through the server-based proxy service • WebService • Provides access to SOAP-based web services on remote servers 13ApacheCon NA 2010 - François Fornaciari
  • 14. Accessing web services (2/2) • Expose OSGi™ services through the “Remote Services Specification” • Development of OSGi™ standard services • Service properties for defining • SOAP-based services • RESTful JAXRS-based endpoints • Implementation: Distributed OSGi™ • Sub-project of Apache CXF 14ApacheCon NA 2010 - François Fornaciari
  • 15. Accessing OSGi ™ services • In a transparent way • Two communication types • RemoteObject • Simple call to an existing OSGi™ service • Strongly-typed arguments and result or … • … generic objects • Producer/Consumer • Topic subscription 15ApacheCon NA 2010 - François Fornaciari
  • 16. AMF Protocol • Action Message Format (v3) • Binary format used to serialize ActionScript objects • Optimized transferred data amount • Primarily used to exchange data between Adobe Flash applications and remote services • Specification since 2007 • Supported by many server-side languages and technologies: Java™ , .NET, PHP, … 16ApacheCon NA 2010 - François Fornaciari
  • 17. Integration frameworks • Existing open source frameworks • AMF3 for OSGi™ (Christopher Brind) • Robust, OSGi™ compliant and easy to use • Only 3 bundles to deploy Name OSGi™ support RemoteObject OSGi ™ EventAdmin bridge AMF3 for OSGi™ (LGPL) yes yes yes GraniteDS (LGPL) yes (prototype) yes (unstable) no Spring Flex (ASL) yes (Virgo) yes no 17ApacheCon NA 2010 - François Fornaciari
  • 18. AMF3 for OSGi ™ • OSGi™ bundle description • uk.co.arum.osgi.amf3 • Serialization-deserialization of AMF3 objects • uk.co.arum.osgi.amf3.http • Registers an HTTP servlet that is capable of reading and writing AMF3 objects • uk.co.arum.osgi.amf3.flex.remoting • Implements FlexRemoting over HTTP • Provides support for channel based messaging 18ApacheCon NA 2010 - François Fornaciari
  • 19. Apache Felix projects (1/2) • Core of the server-side application • Framework • File Install • Directory based OSGi™ management agent • Used internally by AMF3 for OSGi ™ • Declarative Service (SCR) • Event Admin Service • Log Service • HTTP Service (Jetty) 19ApacheCon NA 2010 - François Fornaciari
  • 20. Apache Felix projects (2/2) • Application-specific projects • Event Admin Service • OSGi™ EventHandler receives messages from Flex Producers • Messages posted by the OSGi™ EventAdmin service are received by Flex Consumers • iPOJO • Used to declare OSGi™ components • Support of annotations • Extensible handlers 20ApacheCon NA 2010 - François Fornaciari
  • 21. Event Admin • Based on the Publish-Subscribe pattern Publisher EventAdmin « service » postEvent (topics) EventHandler « service » handleEvent (topics) 21ApacheCon NA 2010 - François Fornaciari
  • 22. Publishing OSGi ™ services • Additional service property • AMF_SERVICE_NAME • Instantiated with the service class name @Component(name="MyService") @Provides public class MyServiceImpl implements MyService { @ServiceProperty(name="AMF_SERVICE_NAME") private String serviceName = MyService.class.getName(); ... } 22ApacheCon NA 2010 - François Fornaciari
  • 23. Consuming OSGi ™ services • Flex RemoteObject • Endpoint: AMF3 servlet path ex: http://localhost:8080/amf3osgi • Destination: OSGi™ service class name <s:RemoteObject id="myService" endpoint="/amf3osgi" destination="com.zenika.service.MyService"> <s:method name="doSometing" result="onResult(event)" fault="onFault(event)" /> </s:RemoteObject> 23ApacheCon NA 2010 - François Fornaciari
  • 24. Producer / Consumer (1/2) • Bridge between Flex® events and EventAdmin service • Elements attributes • Consumer: callback when a message is received • Consumer and producer: destination <s:Consumer message="onMessage(event)" destination="events" fault="onFault(event)" /> <s:Producer destination="events" fault="onFault(event)" /> 24ApacheCon NA 2010 - François Fornaciari
  • 25. Producer / Consumer (2/2) • Destination configuration • Set of channels used to send messages to a target destination • QoS: many channels for network failure tolerance var channelSet:ChannelSet = new ChannelSet(); var channel:AMFChannel = new AMFChannel("events","/amf3osgi"); channel.pollingInterval = 5000; channelSet.addChannel(channel); consumer.channelSet = channelSet; 25ApacheCon NA 2010 - François Fornaciari
  • 26. Sending messages (1/2) • From OSGi™ • PublishedObjectEvent (channelID, object) • Extends org.osgi.service.event.Event @Bind public void bindEventAdmin(EventAdmin eventAdmin) { this.eventAdmin = eventAdmin; } private void sendMessage() { eventAdmin.postEvent( new PublishedObjectEvent("events", object)); } 26ApacheCon NA 2010 - François Fornaciari
  • 27. Sending messages (2/2) • From Flex® • Sending AsyncMessage through the producer • Body: object to send var message:AsyncMessage = new AsyncMessage(); message.body = messageObject; producer.send(message); 27ApacheCon NA 2010 - François Fornaciari
  • 28. Receiving message (1/2) @Component(name="FlexEventHandler") @Provides public class FlexEventHandler implements EventHandler { @ServiceProperty(name="event.topics") private String eventTopics = ".../amf3/flex/remoting/events/PublishedObjectEvent"; @ServiceProperty(name="event.filter") private String eventFilter = "(channel.id=events)"; public void handleEvent(Event event) { if (event instanceof PublishedObjectEvent) { ...} } } 28ApacheCon NA 2010 - François Fornaciari
  • 29. Receiving message (2/2) private function start():void { consumer.subscribe(); } private function stop():void { consumer.unsubscribe(); } private function onMessage(event:MessageEvent):void { var msg:MyMessage = event.message.body as MyMessage; ... } • Start / cancel subscription • Message: typed-object 29ApacheCon NA 2010 - François Fornaciari
  • 30. Flex ® modulary • Flex® modules • SWF files that can be loaded and unloaded at runtime by an application • Free up memory and resources if needed • Better encapsulation • No need to load all modules at startup • Smaller initial download size • Cannot be run independently 30ApacheCon NA 2010 - François Fornaciari
  • 31. Main goal • OSGi™ is the Java modularity • Flex® supports modules • How can we build a complete modular application? 31ApacheCon NA 2010 - François Fornaciari
  • 32. Creating modules • “Module” as root element <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" implements="...api.ModuleInterface" creationComplete="start()"> <fx:Script> <![CDATA[ public function start():void {...} public function stop():void {...} ]]> </fx:Script> <s:Label text="Label" /> </mx:Module> 32ApacheCon NA 2010 - François Fornaciari
  • 33. Module lifecycle • Start method is called when the module is loaded • Stop method is called before unloading the module • Common interface between the application and the module package com.zenika.systemmanager.api { public interface ModuleInterface { function stop():void; } } 33ApacheCon NA 2010 - François Fornaciari
  • 34. Module Bundle Packaging Application Bundle UI (SWF) JAVA (OSGi™ ) • Each bundle contains • Business logic • OSGi™ services • User interface • SWF file • Building tools like Maven, Ant or Gradle can ease the packaging phase manifest manifest 34ApacheCon NA 2010 - François Fornaciari UI (SWF) JAVA (OSGi™ )
  • 35. Application bundle • User Interface skeleton • Able to retrieve list of available modules • OSGi™ service for getting module URLs • Flex® client notified when a module appears or disappears • Flex consumer is aware of events posted by the EventAdmin 35ApacheCon NA 2010 - François Fornaciari
  • 36. Technical view (1/4) • At startup, registers bundle resources by using the HTTP Service • Main SWF, HTML files, … • Gets registered modules and listens to bundle arrival / departure • Implementation of the extender pattern 36ApacheCon NA 2010 - François Fornaciari
  • 37. Technical view (2/4) • Extender pattern • Use of a BundleTracker in order to be notified of ACTIVE bundles declaring Flex® modules • MANIFEST.MF : • SWF-Modules: [path]=[SWF name] • Register / unregister SWFs into path • Creation of a resource-aware context • Post event to notify Flex® client 37ApacheCon NA 2010 - François Fornaciari
  • 38. Technical view (3/4) var modules:ArrayCollection = event.result as ArrayCollection; for each(var module:SWFModule in modules) { var loader:ModuleLoader = new ModuleLoader(module.url); // Register event listeners loader.addEventListener(ModuleEvent.READY, handleModuleReady); loader.addEventListener(ModuleEvent.ERROR, handleModuleError); // Start the module loading loader.load(); } 38ApacheCon NA 2010 - François Fornaciari
  • 39. Technical view (4/4) • After bundle undeployment • Call the stop method • Stop properly on-going processes • Warning: OSGi™ services have already been unregistered • Unload associated modules • Free-up memory and resources 39ApacheCon NA 2010 - François Fornaciari
  • 40. Module bundle • Autonomous module • Contains its own UI and logic • Good isolation • Flex® modules have to be based upon their own OSGi™ services • Avoid using unregistered services or managing service dynamicity on the client- side 40ApacheCon NA 2010 - François Fornaciari
  • 41. Demo
  • 42. Conclusion (1/2) • Flex® • Development of rich interfaces • Native support of modules • Loading / unloading modules at runtime • OSGi™ • The Dynamic Module System for Java™ • Service Oriented Architecture • Service availability to Flex® 42ApacheCon NA 2010 - François Fornaciari
  • 43. Conclusion (2/2) • Seamless communications • Asynchronous remote calls • Notifications • Integration • Application: set of autonomous bundles with their own interface and business logic 43ApacheCon NA 2010 - François Fornaciari
  • 44. References • OSGi™ : www.osgi.org • Apache Felix: felix.apache.org • Adobe Flex® : www.adobe.com/fr/products/flex • AMF3 for OSGi™ : www.arum.co.uk/amf3osgi.php 44ApacheCon NA 2010 - François Fornaciari
  • 45. Questions 45ApacheCon NA 2010 - François Fornaciari francois.fornaciari@zenika.com www.zenika.com