• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Jax2010 adobe lcds
 

Jax2010 adobe lcds

on

  • 1,542 views

Slides presented at JAX2010 in Germany. Technical session on advanced communications between Java and Flex.

Slides presented at JAX2010 in Germany. Technical session on advanced communications between Java and Flex.

Statistics

Views

Total Views
1,542
Views on SlideShare
1,537
Embed Views
5

Actions

Likes
1
Downloads
37
Comments
0

1 Embed 5

http://www.slideshare.net 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Jax2010 adobe lcds Jax2010 adobe lcds Presentation Transcript

    • Advanced Communications between Java and Flex Michaël Chaize | Flash Platform Evangelist ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Feel free to contact me Michaël Chaize Flash Platform Evangelist My blog: www.RIAgora.com @mchaize ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 2
    • Flash Platform - A complete system for web innovation ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Flash Platform - A complete system for web innovation ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • 97% Flash Player 10 (March 2010)
    • ADOBE FLEX 4
    • What is Flex and how it works Flash Builder IDE Browser Flex SDK Flash Player MXML ActionScript Flex Class Library SOAP HTTP/S AMF/S RTMP/S Web Server Compile XML/HTTP LC Data Services REST SOAP Web Services J2EE Application Server Existing Applications & Infrastructure ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • RIA and technical challenges Web 1.0 application Rich Internet Application • Be er response time • Light bandwidth • Less load on the server side • Less tests on the client side <page> <page> <page> <page> <data> <page> <page> <page> <application> ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • HTTP Request ADOBE FLEX 4
    • Flex/JSP architecture UI LAYER Web browser SERVER XML on HTTP(s) Java servlet container (tomcat, WAS…) PRESENTATION /SERVICES/DAO Webapp (WAR) LAYER JAVA classes/services catalog.jsp ProductService.java public getProducts() DATABASE/ STORAGE LAYER WSDL JDBC 2008 Adobe Systems Incorporated. All Rights Reserved.
    • Flex and <HTTPRequest> ! Same with PHP, Ruby, Perl, ASP... ! Returns XML, text, tabulated text, JSON... ! Use send() to launch the request ! Result and Fault events ! New data-services wizard in Flash Builder 4 to generate a STUB on the client side © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Web services ADOBE FLEX 4
    • Flex and <Webservice> ! Web Services Description Language 1.1 (WSDL 1.1) document ! e Flex web service API generally supports Simple Object Access Protocol (SOAP) 1.1, XML Schema 1.0 (versions 1999, 2000, and 2001), and WSDL 1.1 RPC-encoded, RPC-literal, and document-literal (bare and wrapped style parameters). ! Flex supports web service requests and results that are forma ed as SOAP messages © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • crossdomain.xml ! By default, applications that are loaded from a di erent web domain are untrusted, and applications that are loaded from the same web domain are trusted. You can, however, make a cross-domain application trusted. ! To load a cross-domain application and access its data, the target server that hosts the remote sub- application must have a policy le called crossdomain.xml on it. ! NB: Using BLAZE DS as a proxy can help you to reach cross-domain services without the need of this XML le. © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Two approaches for Client/Server development Loosely coupled: Document Based Protocols (XML, SOAP, …) ! Language neutral, easy to debug + document ! Parsing and formatting code is harder to build and maintain as complexity grows ! Runtime overhead also grows with complexity ! Easier to develop server and client independently Tightly coupled: Object Model Based Protocols (RMI, AMF, …) ! Adding languages is hard ! Faster for client and server and less bandwidth required ! Easier to share code or use code gen for centralizing the domain model ! Scales to much more complicated application models e ciently ! Less design, code and fewer dependencies on the “over the wire” format ! Keeps client and server implementation in sync - if you can refresh both at the same time (easy with RIAs) © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • AMF Published in December 2007
    • REMOTING AMF XML vs AMF !® !Copyright 2008 Adobe Systems Incorporated. All rights reserved.
    • Remoting AMF ADOBE FLEX 4
    • LiveCycle Data Services ES LiveCycle Data Services ES LiveCycle Data Services is a set of Java EE Service components and APIs used to: Data Management Adapters Data Synchronization LiveCycle Create data-intensive RIAs with less code, less risk, and O -line Applications accelerated time to market due to an innovative client- Data Paging ColdFusion server programming model RPC Services Integrate RIAs with existing applications, back-end data, Hibernate Web Service and JEE infrastructure HTTP Service SQL Easily integrate RIAs with LiveCycle document and Remote Object Service process services JMS Messaging Enable collaboration, o ine AIR and real-time data Publish & Subscribe Java streaming applications to be built in a scalable and Collaboration reliable manner with robust publish and subscribe Custom… Real Time Data Push messaging Proxy Service Generate PDF documents from RIAs that include graphical assets Web-tier Compiler Portal Deployment RIA-PDF Generation © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Blaze DS LiveCycle Data Services ES BlazeDS is a set of Java EE components and APIs, and Service a subset of LiveCycle Data Services: Data Management Adapters Data Synchronization LiveCycle - Free and open source. O -line Applications - High performance data transfer for more responsive Data Paging ColdFusion applications using AMF RPC Services Hibernate - Real-time server push over standard HTTP Web Service - Full pub/sub messaging that extends existing HTTP Service SQL messaging infrastructure Remote Object Service JMS Messaging Publish & Subscribe Java Collaboration Custom… Real Time Data Push Proxy Service Web-tier Compiler Portal Deployment RIA-PDF Generation © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Java and ActionScript types © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Java and ActionScript value objects Java VO ActionScript VO © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Flex/Java classic architecture UI LAYER Web browser AMF sur HTTPs SERVER Java servlet container (tomcat, WAS…) PRESENTATION /SERVICES/DAO Webapp (WAR) LAYER LiveCycle Data Services JAVA classes/services JAVA <-> AMF RPC services Messaging Data Mgt ProductService.java public getProducts() DATABASE/ STORAGE LAYER WSDL JDBC 2008 Adobe Systems Incorporated. All Rights Reserved.
    • Spring BlazeDS Integration ADOBE FLEX 4
    • Messaging ADOBE FLEX 4
    • Publish/Subscribe Messaging LiveCycle DS / Blaze DS !Client A Message Endpoint Service !Client B !RTMP !Client C !AMF Publisher !HTTP Subscriber 44 2008 Adobe Systems Incorporated. All Rights Reserved.
    • Messaging - Data Push LiveCycle DS / Blaze DS Messaging Adapter X System X Message JMS Endpoint JMS Adapter Services Provider Messaging Adapter Y System Y !RTMP !AMF Publisher !HTTP Subscriber 45 2008 Adobe Systems Incorporated. All Rights Reserved.
    • Channels of LiveCycle Data Services ES 46 2008 Adobe Systems Incorporated. All Rights Reserved.
    • Data Management Services ADOBE FLEX 4
    • Working with Data Traditional Page-Centric HTML Model data data ! Client mostly used as a data capture Persistence Solutions: and display device Hibernate ! Client doesn’t own a version of the data JDOs ! No client side data manipulation EJB 3 ! Data needs to be synchronized between middle-tier and data store Others… 75 2005 Adobe Systems Incorporated. All Rights Reserved.
    • RIA Model data data data ! Client owns a version of the data ! Rich client-side data manipulation ! Data needs to be synchronized between client-tier and middle-tier and between middle-tier and data store 76 2005 Adobe Systems Incorporated. All Rights Reserved.
    • RPC Approach RPC Services data data Developer’s Responsibilities: ! Flag changes (create, update, delete) ! Maintain original version of data for appropriate locking strategy ! Make Remote Procedure Calls for creating, updating, deleting items ! Identify and handle con icts / concurrency issues 77 2005 Adobe Systems Incorporated. All Rights Reserved.
    • Data Services Approach Data Service data data Client-Side API: ! Flags changes (create, update, delete) ! Maintains original version of data for appropriate locking strategy ! Sends list of changes to Data Service as a set of messages ! Handle con icts / concurrency issues 78 2005 Adobe Systems Incorporated. All Rights Reserved.
    • Data Services Approach Object Hibernate Data Service JDBC ColdFusion data data Custom Data Service: ! Deserializes list of changes coming from client ! Serializes data before sending to client ! Passes list of changes to con gured adapter ! Noti es clients who subscribed to destination Adapter: ! Processes changes ! Identi es con icts ! Passes results to Data Service 79 2005 Adobe Systems Incorporated. All Rights Reserved.
    • Data Services Flex Enterprise Services JDBC Client A RDBMS Adapter Endpoint Data Object DAO Service Adapter Client B Hibernate Hibernate Adapter CFC Client C Adapter ColdFusion 80 2005 Adobe Systems Incorporated. All Rights Reserved.
    • Data Management Bene ts 1. Automatic Client to Middle-Tier Synchronization ! Change Tracking ! Automatic invocation of remote services 2. Highlander Principle: there is only one instance of a given entity in memory at any given time 3. Con ict resolution 4. O ine Synchronization 5. Lazy loading 6. Paging 7. Cross-client synchronization !® !Copyright 2008 Adobe Systems Incorporated. All rights reserved.
    • Model driven development ADOBE FLEX 4
    • Code-Driven Development Code •UI controls / formatters / styles • Calculated elds • Validation Rules • Variants (conditional properties) • Localization • Security • Data Retrieval Logic (paging, lazy loading) • Data Synchronization Logic Model •Basic Data Description Model Server-side code Client-side code ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
    • Fiber: LCDS Model-Driven Development Code • Ad-hoc customization • View composition • External business/validation logic Model • Rich data model (data and behaviors) • Calculated elds • Validation Rules • Variants (conditional properties) • Localization • Security • UI hints/defaults: controls, formatters, styles Model includes enough information to derive data retrieval, persistence, and synchronization logic Model Server-side code Client-side code ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
    • LCDS Model-Driven Development !"#$%*'+-7").,5*',#*#$1%"2/$,- !"#$%&'(')$*5$0-+)$0*',#*')-.8'3-0*4.$9* !"#$%&#).:$,*8")/06 ;"#$*5$,*"8*<".%$)1%'-$*3"#$*4:'%+$* !"#$%&'(')$*)+,-./$0*0+11")-*#2,'/.3* "<=$3-0>*0-+<0>*$-396 /"#$%*.,-$)1)$-'-.",*4,"*3"#$*5$,* ,$$#$#6 ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
    • LCDS Model Driven Development Bene ts Productivity: Less code to write ! No persistence code or data sync code ! Value objects and service stubs are automatically generated Maintainability: Less code to maintain ! Changes to the model are automatically propagated Consistency ! Between client and server (for example, constraints and validation rules are de ned in the model, not duplicated using di erent languages in the client and the server) ! Across views (for example, UI controls, styles, and validation rules are de ned in the model, not duplicated across di erent views) Approachability ! No code to write to implement complex capabilities such as persistence, synchronization, paging, lazy loading, o ine, etc. Innovation: ! O ine and client synchronization capabilities ! Model is language independent and can be leveraged by di erent client technologies and tools (Flex, PDF, etc) ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
    • Christophe Coenraets http://coenraets.org/ Flex & Java tutorials & http://www.adobe.com/devnet/ flex/flex_java.html Start with Flex http://www.flex.org
    • Flash Platform - A complete system for web innovation ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
    • Feel free to contact me Michaël Chaize Flash Platform Evangelist My blog: www.RIAgora.com @mchaize ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 44