using web services in flash mx 2004 pro
Skip this Video
Download Presentation
Using Web Services in Flash MX 2004 Pro

Loading in 2 Seconds...

play fullscreen
1 / 23

Using Web Services in Flash MX 2004 Pro - PowerPoint PPT Presentation

  • Uploaded on

Using Web Services in Flash MX 2004 Pro. in 60 Minutes or Less. Theo Rushin Jr Web Application Developer/Trainer.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Using Web Services in Flash MX 2004 Pro' - elia

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
theo rushin jr web application developer trainer
Theo Rushin JrWeb Application Developer/Trainer

I am an avid snowboarder and skier always looking for the deep powder. When I’m not carving my way through the trees or dreaming of the next big snowfall, I work as a consultant at the National Institutes of Health (NIH) where I lead the design and development of many web-based solutions.

I have spent the past 6 years establishing myself as an expert Coldfusion and Flash Rich Internet Application Developer and Trainer. During my 6 years of web application development I have created and supported many enterprise-wide web-based applications.

I can be reached at [email protected] on the snow

presentation agenda
Presentation Agenda
  • An introduction to Web Services
  • Flash MX 2004 and Web Services
  • Six Easy Steps
  • Now It’s Your Turn
what is a web service
“What is a Web Service?”

According Wikipedia, the free (and mostly accurate) online encyclopedia;

A web service is a collection of protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer.

why should i consume web services
“Why should I consume web services?”

The major reasons for using Web services are to gain:

  • Interoperability among distributed applications that span diverse hardware and software platforms.

2. Accessibility of applications through firewalls using Web protocols.

3. A cross-platform, cross-language data model (XML) that facilitates developing heterogeneous distributed applications.

i think i know what xml is
“I think I know what XML is”

Extensible Markup Language (XML) is a general-purpose markup language for creating special-purpose markup languages. It is capable of describing many different kinds of data. Its primary purpose is to facilitate the sharing of data across different systems, particularly systems connected via the Internet.

so what is soap
“So what is SOAP?”

SOAP (Simple Object Access Protocol) defines the XML based message format that applications use to communicate and inter-operate with each other over the internet. The heterogeneous environment of the internet demands that applications support a common data encoding protocol and message format. SOAP makes object access simple by allowing applications to invoke object methods, or functions, residing on remote servers. A SOAP application creates a request block in XML, supplying the data needed by the remote method as well as the location of the remote object itself.

and what is wsdl
“And what is WSDL?”

WSDL (Web Service Description Language - often pronounced "Whiz-Dull".), the proposed standard for how a Web service is described, is an collection of metadata about XML-based service used for describing what business do and how to access their services electronically. We can say WSDL is a XML- Based service IDL (Interface Definition Language) that defines the service interface and its implementation characteristics. WSDL describes the SOAP messages that define a particular Web service.

what are some of the advantages of using web services
“What are some of the advantages of using web services?”
  • Web services provide interoperability between various software applications running on disparate platforms.
  • Web services use open standards and protocols. Protocols and data formats are text-based where possible, making it easy for developers to comprehend.
  • By utilizing HTTP, web services can work through many common firewall security measures without requiring changes to the firewall filtering rules.
  • Web services easily allow software and services from different companies and locations to be combined easily to provide an integrated service.
  • Web services allow the reuse of services and components within an infrastructure
what are some of the disadvantages of using web services
“What are some of the disadvantages of using web services?”
  • Web services standards for features such as transactions are currently nonexistent or still in their infancy compared to more mature distributed computing open standards such as CORBA.
  • Web services suffer from poor performance compared to other distributed computing approaches such as RMI, CORBA, or DCOM. This is a common trade-off when choosing text-based formats.
  • By utilizing HTTP, web services can evade existing firewall security measures whose rules are intended to block or audit communication between programs on either side of the firewall.
where can i find some publicly accessible web services
“Where can I find some publicly accessible web services?”
flash mx 2004 and web services
Flash MX 2004 and Web Services

Macromedia Flash MX Professional 2004 provides a powerful, rapid development tool for building web service consumers. New tools and components in Flash MX Professional 2004 simplify and speed the development of web service-based applications.

flash mx 2004 and web services continued
Flash MX 2004 and Web Services continued

Flash MX 2004 comes with two client side methods for connecting to web services. The first is by using the WebServiceConnector component, the second is by using the web service classes and actionscript.

are there any disadvantages to consuming web services within flash
“Are there any disadvantages to consuming web services within Flash?”

Both of the methods for connecting to web services in Flash MX 2004 have a couple of disadvantages.

  • Can be slow when returning large datasets …
  • The security features of Flash could prevent access to web service …
when returning large datasets
When returning large datasets

It can be really slow when returning larger datasets (1000+). The reason for this is that, even with the MX 2004 speed improvements, it can take a lot of processor power to convert the returned xml into flash actionscript objects. When returning large result sets from a web service it is a far better solution to go with Flash Remoting. Flash remoting will return the result set as AMF instead of XML which has a much faster transfer speed (much more compressed) and does not need to be converted to flash actionscript (as it already is).


In a nutshell …

The AMF protocol, which is proprietary to Macromedia, is a very lightweight binary format that cuts the bulk out of packets, meaning data exchange is a lot faster than with XML.

security cross domain policy
Security – Cross domain policy

The second disadvantage of using the new built in client side web service features of Flash MX 2004 are the security features. In order to use a web service that is not located on the same server, the owner of that service would need to place a cross domain policy file allowing the flash movie access to it's service.

cross domain policy
“Cross domain policy?”

Since you asked …

For security reasons, a Macromedia Flash movie playing in a web browser is not allowed to access data that resides outside the exact web domain from which the SWF originated. A cross-domain policy file is a simple XML file that gives the Flash Player permission to access data from a given domain without displaying a security dialog. When placed on a server, it tells the Flash Player to allow direct access to data on that server, without prompting the user grant access.

(Macromedia TechNote tn_14213)

so why should i even use flash instead of coldfusion asp net etc
So why should I even use Flash?(instead of ColdFusion, ASP.NET, etc.)
  • Greater degree of interactivity.
  • Combine audio and video to produce a richer experience.

You don’t have to choose!

You can leverage your existing server-side code, written in Coldfusion, .Net, PHP, etc., to consume web services using Flash MX 2004!

what do i need to do to get started
“What do I need to do to get started?”
  • Discover the web service.
  • Deploy the user interface components.
  • Register the web service in Flash.
  • Configure the WebServiceConnector.
  • Bind the user interface components to the WebServiceConnector.
  • Trigger the WebServiceConnector.

And That’s It!

additional reading
Additional Reading
  • Macromedia Flash MX Professional 2004 Application Development: Training from the Source
  • Macromedia Flash MX 2004 Professional for Server Geeks