Categories
Featured jobs
» More ActionScript, Flash and Flex jobs.
» Advertise a job for free
Our network
Advertisement

 »  Home  »  Articles  »  Best Practices  »  Flash Remoting Best Practices
 »  Home  »  Tutorials  »  Flash  »  Intermediate  »  Flash Remoting Best Practices

Flash Remoting Best Practices

By Tom Muck | Published 01/3/2007 | Best Practices , Intermediate | Rating:
Tom Muck

Tom Muck is coauthor of six Macromedia-related books including O'Reilly's Flash Remoting: The Definitive Guide, and the bestseller, Dreamweaver UltraDev 4: The Complete Reference. He is an extensibility expert focused on the integration of Macromedia products with ColdFusion, ASP, PHP, and other languages, applications, and technologies and is a founding member of Community MX (http://www.communitymx.com). When not in front of the computer, Tom works on his Hong Kong movie collection. Once an aspiring heavy-metal musician, Tom is now content in his old age to sit on the porch playing the blues on his harmonica and banging out Robert Johnson songs on his beat-up acoustic guitar.

Excerpted from http://www.oreillynet.com/pub/au/1183

 

View all articles by Tom Muck
Flash Remoting Best Practices

Copyright © 2003 O'Reilly Media, Inc. All Rights Reserved.
Flash Remoting: The Definitive Guide
By Tom Muck
September 2003
ISBN: 0-596-00401-X
http://www.oreilly.com/catalog/flashremoting/
Available from booksellers or direct from O'Reilly Media, www.oreilly.com.

Cover image
This content is excerpted from the above-named O'Reilly publication, with permission, by agreement with ActionScript.org.

The issue of best practices is a subjective topic. One person's idea of a best practice may be someone else's idea of a worst nightmare. As in all forms of programming, there is no single right way to perform a given task. For that reason, this chapter presents some of the common tactics employed by Flash Remoting developers. It is up to the developer to measure the options carefully and decide on the best course of action for a particular application.

We've touched on numerous best practices throughout the earlier chapters (see "best practices" in the index). Here we look at the big picture and cover additional best practices you should seriously consider. Refer also to the Macromedia white papers and articles on best practices cited in Appendix B.

Separation of Tasks

A Flash Remoting application can be constructed by one person or a team of designers and programmers. If working in a team environment, Flash Remoting utilizes several different technologies that can be easily broken down into tasks for different types of developers. In your team, individuals might wear different hats at different times, so there will be some overlap, but the division of tasks is fairly clear.

Designer

The designer concentrates on the visual and audio design of the application and deals with the look and feel of the application. He creates all the interfaces; he chooses the fonts, colors, graphics, and other elements of the application. He may know ActionScript and be able to program some functionality, or he may not. He should be able to create an application interface from specifications and be flexible enough to change visual elements easily.

Client-Side ActionScript Programmer

The client-side ActionScript programmer is responsible for all of the interaction in the application, and she works with the designer to implement this functionality. She might create the code that calls the various interface elements to display in the movie, and she would also create any code that is related to user input. The ActionScript programmer should know the Flash programming environment inside and out and be able to bring the project specifications to life.

If the designer has not completed a particular section, the interface should work as it stands, using dummy methods where user interactions or remote service calls might be (for example, if a user clicks "Login," an alert message might say "User logging in").

Flash Remoting ActionScript Programmer

The Flash Remoting programmer is also an ActionScript programmer, but he is responsible for connecting to the remote services and providing hooks for the client-side ActionScript programmer in the form of an API. He should work closely with the server-side developers to build the client-side code that calls remote services accurately. He should be able to test his service calls at all points, using dummy methods on the server that the server-side programmer has set up.

Database Programmer

The database programmer is responsible for setting up the database, including table definitions, relationships, and all stored procedure code necessary. She should also work closely with the server-side programmer. Typically, in an application that uses a database, the database needs to be in place before the server-side services are developed. The database is frequently the first part of the application to be built. All parts of the application revolve around the database.

The database programmer is also responsible for exposing items to the server-side programmer. From an ActionScript perspective, this is the equivalent of exposing methods or functions to the team. The database programmer exposes views, stored procedures, and possibly tables (in a MySQL environment) to the server-side programmer.

Server-Side Programmer

The server-side programmer might be versed in CFML, SSAS, Java, C#, VB.NET, or PHP. He should be able to create the remote services that can be accessed from the Flash movie. He should also be able to create HTML interfaces (test harnesses) for testing the remote services so that the server-side services can be completed before bringing Flash into the equation.

The server-side programmer exposes methods for the Flash Remoting ActionScript programmer to utilize.

HTML Developers

The HTML developer ties the whole application together on the HTML page and provides necessary code for alternate pages (if needed) and Flash detection. She also must create the HTML pages in such a way that they blend seamlessly with the Flash application. The HTML developer should work closely with the designer.



Spread The Word / Bookmark this content

Clesto Digg it! Reddit Furl del.icio.us Spurl Yahoo!


Search Entire Site
Add to Google
Advertisements
Article Options
Latest New Articles
Set up a simple IIS Server for Flash
by Peter McBride

Day 1 at FITC Toronto 2008
by Anthony Pace

Simple reflection effect with AS2
by Jean André Mas

ActionScript.org Meets Josh Tynjala (aka dr_zeus)
by ActionScript.org Staff

Rapidly Create Online Flash Movies to Help Users Market, Sell and Support Software and Hardware
by Sabrina F

mailing list
Enter your email address:
mailing list
Subscribe Unsubscribe
© 2000-2007 actionscript.org! All Rights Reserved.
Read our Privacy Statement and Terms of Use...
Our dedicated server is hosted and managed by WebScorpion Webhosting.