Flash Remoting with Java and .NET BLOG
        

MMBUG Slideshow Demo - Flash Remoting with Java and .NET

Untitled Document

The MMBUG Slideshow Demo

(Flash Remoting with Java and .NET)

Why Flash Remoting Matters

Macromedia's MX product line makes it possible to create Rich Internet Applications (RIAs) using Flash. We won't attempt to go into detail about why RIAs are important here - Macromedia has a fair amount of information on the subject. Suffice to say that Flash is maturing into a true application development platform, with substantially better ease-of-use than standard web pages, and a larger installed base than Windows, Java, or any other platform (Flash has 98% penetration).

Flash Remoting is a key MX feature because it makes it easy for Flash applications to access and interact with server-side data. Using Flash Remoting, your application can do all of the following:

  • Easily access web services. If you aren't already familiar with web services, and define yourself as a geek, you need to learn about them. They're becoming the standard technology for sharing information between applications over the internet. This article at Web Services Architect provides a good general overview.
  • Easily access server-side databases. As this article is targeted at geeks, we'll assume that you already understand the myriad of ways in which this can make your applications more useful.
  • Pass complex objects from server to client, and vice versa. Yes, you too can take a complex Java or .NET object and pass it into Flash with all its properties intact. (Methods are another matter, but let's ignore that for now.)

In short, Flash Remoting will make it much easier for you to create powerful, useful applications.

Available Server-Side Platforms

Flash Remoting assumes a Flash client. What's available on the server end?

  • You can connect to ColdFusion or Java if you have ColdFusion installed on the server.
  • You can connect to Java if you have JRun (Macromedia's J2EE Platform).
  • Macromedia is developing a version of Flash Remoting that will install in .NET and in other (non-Macromedia) J2EE platforms. This version is still in Beta, but is available here.

Goals Of The Demo

Our primary goal in creating this demo is to help you start creating Flash Remoting applications. Macromedia offers lots of resources that will help you to do this with ColdFusion on the server, so we're focusing on Java and .NET.

We provide a sample application that will run with all three server-side platforms. The application demonstrates accessing a server-side database and accessing the Google web service. In both cases we keep the functionality quite simple and leave it to you to imagine more complex applications. You should be able to get it up and running on your platform of choice, then play with it and extend it.

After that it's up to you. As you make exciting discoveries please consider submitting them to this blog at FRJNblog@mmbug.org.

A Live Version of the Demo

You'll note that the demo is quite simple. It consists of:

  • A dropdown list
  • An image area
  • Description text
  • A listbox with URLs

When an image name is selected in the dropdown three things happen:

  • The image changes
  • The description changes
  • The URLs change

The URLs consist of the top ten websites found by Google, based on the selected image name. Clicking on a URL will open another window with that website.

Behind the scenes, we make a database call at startup which provides image names, descriptions, and an image filename. Each time we select a new image we make a call to the Google web service and retrieve URLs. That's all there is to it - we'll let you check out the code for details.

History and Credits

This demo is an extension of Macromedia's Slideshow demo at

    http://www.macromedia.com/desdev/mx/coldfusion/articles/slideshow/slideshow.html

We've extended it in various ways:

  • The Macromedia version dummies database access, we access real databases
  • Our version also accesses a web service
  • Our version works with Java and .NET, in addition to ColdFusion

Primary contributers to this project were:

General Installation Issues

The source files for our extended version of the demo can be found at:

You'll need to have Flash and the Flash Remoting Componants installed before you can run the demo. Trial versions are available at:

Platform-Specific Installation Instructions

ColdFusion: here

Java: here

.NET: here

The Google Web Service

This demo accesses the Google web service. In order to run the demo you'll need to get your own Google Key. Both the key and a copy of the Google API can be obtained here.

Macromedia has an excellent demo on using the Google web service here. The demo uses the web service in a remoting enabled Flash application, so it's very similar to what we're doing in this demo. It assumes that you'll use ColdFusion on the server, but has a lot of material that will be useful to you regardless of server platform.

Check Out the Code

All the other information you need should be contained in the source files, either in the code itself or in the code comments.

Questions?

It is entirely possible that we've left something important out of this article. We expect this document to evolve, and rely on your questions and feedback to let us know what is needed. Please send them to slideshowDemo@mmbug.org. Thanks!



© Copyright 2002 Macromedia Boston User Group. Click here to send an email to the editor of this weblog.
Last update: 9/27/2002; 9:09:27 AM.