Flex360 Milan 2008 - Flex & Webservices

  • 52 views
Uploaded on

The presentation on Flex Builder's integration with SOAP webservices. Presented in 2008 at Flex360 Milan

The presentation on Flex Builder's integration with SOAP webservices. Presented in 2008 at Flex360 Milan

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
52
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Flex 3 & Webservices Cristian Ivascu :: Adobe 360 Flex, Milan 08 – APR - 2008 Copyright 2008 Adobe Systems Incorporated. All rights reserved. 1
  • 2. Agenda  Introduction to Flex and web services  Building a SOAP-based app  REST services  Building a del.icio.us based app  Q&A Copyright 2008 Adobe Systems Incorporated. All rights reserved. 2
  • 3. One server, multiple, disparate clients Copyright 2008 Adobe Systems Incorporated. All rights reserved. 3
  • 4. What are webservices? W3C says: “a software system designed to support interoperable Machine to Machine interaction over a network” (W3C) In practice: web apis that are accessed remotely Practice matters! Copyright 2008 Adobe Systems Incorporated. All rights reserved. 4
  • 5. Web services – which one?  SOAP & WSDL   Verbose   Machine usable Enterprise REST  Light-weight  No encoding  popular! Copyright 2008 Adobe Systems Incorporated. All rights reserved. 5
  • 6. Flex and Webservices  Flex creates rich clients;  Web services bring data to the client  Flex works with web services in an easy manner Copyright 2008 Adobe Systems Incorporated. All rights reserved. 6
  • 7. WSDL sample - VideoSearch • Only one operation • Simple request parameters • Slightly complex response • Link: http://localhost/video.wsdl Copyright 2008 Adobe Systems Incorporated. All rights reserved. 7
  • 8. How to access the service?  At runtime  At development time (via tool support) Copyright 2008 Adobe Systems Incorporated. All rights reserved. 8
  • 9. Runtime Demo  Let’s see it in the Builder! Copyright 2008 Adobe Systems Incorporated. All rights reserved. 9
  • 10. When to use it • Dynamic scenarios • Discovery of services at run-time • Services that may change more often Characteristics • Not tied to a particular implementation • Very flexible • Adapts easily to changes, without messing with the code Copyright 2008 Adobe Systems Incorporated. All rights reserved. 10
  • 11. What about this? Copyright 2008 Adobe Systems Incorporated. All rights reserved. 11
  • 12. Dev-time way Why? • For the more static scenarios – build and forget • For increased productivity • To make it easier How? • Added classes to model the wsdl contents • Added a way to link types in wsdl to AS classes • Tool support & code generation Copyright 2008 Adobe Systems Incorporated. All rights reserved. 12
  • 13. Video Search Demo redone  The same Video Searching app re-done to take advantage of the new features.,  Let’s see how it’s made. Copyright 2008 Adobe Systems Incorporated. All rights reserved. 13
  • 14. Generated code – is this spaghetti? Copyright 2008 Adobe Systems Incorporated. All rights reserved. 14
  • 15. How to find and fix problems  Check if the schema is there  Breakpoints in call() and processResult()  Check type mappings & wsdl type Copyright 2008 Adobe Systems Incorporated. All rights reserved. 15
  • 16. Known issues with the generated code  We don’t support everything – only WS-I 1.0 profile; wsdl 1.0 & soap 1.1  Known issues – there are a few  Have one? Report it @ bugs.adobe.com/flex Copyright 2008 Adobe Systems Incorporated. All rights reserved. 16
  • 17. REST  Can use multiple output formats – XML, JSON, etc  Is very light-weight    Pro: performance Con: there is no typing info! Is very popular Copyright 2008 Adobe Systems Incorporated. All rights reserved. 17
  • 18. Flex & Rest services  They haven’t change much  AS allows manipulation of XML and binding to objects  But there’s a catch – httpservice.xmlDecode() + a custom model Copyright 2008 Adobe Systems Incorporated. All rights reserved. 18
  • 19. DEMO – del.icio.us API usage  xmlDecode to convert raw xml into an array of “Post.as” instances  There is also a more generic approach – using SimpleXMLDecoder & ObjectTranslator http://booleanbetrayal.com/2007/05/18/httpservice-xmldecode-objecttranslator-an Copyright 2008 Adobe Systems Incorporated. All rights reserved. 19
  • 20. Flex | Final words of wisdom  Web services are a way of getting data into your Flex app;  When building rich clients you need to use them  Web services in Flex can be better; for suggestions or bugs visit: bugs.adobe.com/flex Copyright 2008 Adobe Systems Incorporated. All rights reserved. 20
  • 21. Q&A Copyright 2008 Adobe Systems Incorporated. All rights reserved. 21
  • 22. This is (almost) the last slide • Flex can cope with both dynamic and strong-typed web service usage. • The wizard only generates some code for you. Tweak it! • Strong types are not for WSDL only. Use XMLDecode() . Copyright 2008 Adobe Systems Incorporated. All rights reserved. 22
  • 23. Go play! http://adobe.com/go/flex …and off to lunch! Buon appetito! Copyright 2008 Adobe Systems Incorporated. All rights reserved. 23