YOUR FEEDBACK
Adobe Flex 2 - Answering Tough Questions About Enterprise Development
A Correct Person wrote: Denis Roebrt commented on the 21 Aug 2006 "Tough Que...

SYS-CON.TV
TOP MICROSOFT .NET LINKS


Flash ASP.NET
Dynamic interactive medium for Web applications

Digg This!

Page 2 of 2   « previous page

FlashVars
FlashVars are a method of communicating between ASP.NET and Flash that uses tags embedded in HTML to exchange data. FlashVars only allow for one-way communication - from the server to the Flash Movie. Because of this, FlashVars aren't an alternative for applications that require data to be sent from a client-side application to a Web server, such as an e-mail form. FlashVars, however, are a very fast and efficient form of communication and are often overlooked in circumstances where small amounts of data have to be sent to a Flash Movie (see Figure 1).

FlashVars are unique among the exchange methods in that the data they contain is sent along with the .swf file when requested by a client browser instead of in a separate load after a Flash movie is loaded. This kind of exchange is less obtrusive to the user than other methods and is a good solution in certain circumstances.

LoadVars
The LoadVars object is much more versatile than FlashVars in terms of the direction and amount of data that can be exchanged. The LoadVars object is capable of either sending data to the server for processing, loading data from the server, or sending data to the server and waiting for a response back from the server in one operation. The LoadVars object uses name-value pairs to exchange data between the client and the server. The LoadVars object is best used in a scenario that requires two-way communication between the Flash Movie and server-side logic, but doesn't require large amounts of data to be passed. The LoadVars object requires that the .NET developer handle the formatting of the exchanged data - potentially a real pain, depending on the amount you intend to pass (see Figure 2).

XML Object
The Flash XML Object is another option for communicating between a Web server and Flash client. The XML object is very similar to the LoadVars object in functionality in that it can both send data to the Web server and get data from it. The difference between the XML object and the LoadVars object is the format in which the data being sent and received is formatted. Whereas the LoadVars object expects a name-value pair as a response, the XML object sends and receives a well-formatted structured XML document. Structured XML data makes the XML object much more suitable than the LoadVars object for handling larger amounts of data (see Figure 3).

Web Services
Introduced with Flash MX 2004 Processional Edition, Web Services are the newest method for communicating between Flash and ASP.NET. Web Services use SOAP (Simple Object Access Protocol), an XML-based format, to transfer data between the client and server. Web Services are an industry standard for exposing proprietary "services" for others to use in their applications. An example of a web Service is the search method offered by Google. By using this method through Web Services, it's possible for you to make a Flash application that uses the Google search engine. As mentioned earlier, Web Service creation is very easy with ASP.NET, making it an excellent choice for Flash applications. (Figure 4)

Flash Remoting (Figure 5) is the most powerful and versatile of the options for communicating between a Flash movie and a .NET Web server. Using Flash Remoting, it's possible to access data directly from an ASP.NET Web application in a secure, quick, and efficient way. Flash Remoting uses a binary message format for transferring messages between the Flash client and server-side ASP.NET code called ActionScript Messaging Format, or AMF. AMF, like any of the other methods, travels between the client and server over HTTP, so you don't have to worry about security mechanisms (such as firewalls) interfering with your communication. Although modeled on the same protocol as Web Services, AMF is much more lightweight than the other communication options, and therefore travels much more quickly than calls using the Web Service connector. AMF is also securable using SSL, so it's a great option for security-sensitive applications. Using Adobe's version of Flash Remoting does come with a price tag, however. Flash Remoting for ASP.NET is a standalone server-side component not included with Flash MX 2004, which costs $999 per Web server. Thankfully, there's an Open Source alternative to the Adobe Flash Remoting for .NET package called Fluorine. Fluorine is an Open Source Flash (www.osflash.org) project and is available for download at http://fluorine.thesilentgroup.com/.

Flash & ASP.NET Resources
www.flashasp.net

The information I've covered in this article is just a brief overview of the world of Flash development with ASP.NET. I have recently written a book published by Friends of Ed called Foundation ASP.NET for Flash, which thoroughly covers all of the Flash-ASP.NET communication methods mentioned above, as well as a step-by-step introduction to ASP.NET development with C# and Visual Studio.NET. I encourage you to pick up a copy and add yourself to the growing community of Flash-ASP.NET developers. You'll also find a growing source of Flash and ASP.NET resources, as well as a support forum on the Foundation ASP.NET for Flash homepage at www.flashasp.net.


Page 2 of 2   « previous page

About Ryan Moore
Ryan Moore is the lead software architect and a principal of Balance Studios Inc. (www.balancestudios.com) as well as epicsoft, Inc. (www.epicsoft.net) of Green Bay, WI. Ryan is a C# programmer and Certified Macromedia Flash Developer. Ryan currently maintains a weblog at http://blogs.ittoolbox.com/c/engineering/

craig wrote: There are points in this article that are inaccurate. I could be wrong, but my understanding of ACtionScript is that it is really similar to Javascript. Javascript, ActionScript and C# all do have that similar c-based syntax, but that is where the similarity ends. Where C# and Java are class based, object-oriented, strongly typed compiled languages, Javascript and actionscript are loosely typed, prototype based, languages. C# and Java are similar, but neither are very similar to ActionScript or Javascript. In fact, Javascript's name was made to sound like Java for marketing reasons only -- its philosophical underpinnings and practical usage is actually quite different. Its been a while since I did Flash development but I understood ActionScript to be more similar to Javascript. For example, does A...
read & respond »
MICROSOFT .NET LATEST STORIES
Icahn Moves To Force Microsoft & Yahoo Together
Corporate raider Carl Icahn started his proxy fight for control of Yahoo this morning, beginning with the classic Icahn opening, the letter of reproach to the Yahoo board telling them they have acted 'irrationally and lost the faith of shareholders and Microsoft.'
IBM, Microsoft & Google Eras of Computing
By now it is conventional wisdom to say that there was an IBM Era of computing, then a Microsoft Era, and now we are in the Google Era. In this post, I will explain why Microsoft was not the 'next IBM' and why Google is not the 'next Microsoft' - there are significant qualitative diffe
Book Review: ASP.NET 2.0
ASP.NET developers are bored with traditional books that outline concepts in a lengthy way. These books are good if you like to learn the features in a detailed manner. However, by the time the book is read, a new version will be released. Hence, many learners including myself prefer s
3rd International Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discussed in NYC June 23-24, 2008 by the world-class speaker faculty at the 3rd International Virtualization Conference & Expo being held by SYS-CON Events in The Roosevelt Hotel, in midtown
"RIA" vs "Rich Client Platform": The Term Is Now Up for Debate
'RIA' is slowly fading in terms of its definition. When I first started the RIA Evangelism role in Microsoft, I had this nagging feeling that the term RIA was just all over the place. Depending on which technology you are backing and which stream of alliance you uphold, the truth is th
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING NEWS FROM THE WIRES
Strangeloop Networks Selected for Red Herring 100 North America 2008
Strangeloop Networks (TM) Inc., a leading provider of solutions that accelerate dynamic web