There was a panel I attended at SxSW 2005 that was put together by a bunch of folks from the University of Texas. They developed a learning product based on ASP.NET and Flash. The title of the panel was Low-Resource Rich-Application Development: Flash, .Net & CSS. Being intrigued by the title I simply had to attend it.
To give you an idea of what it was about I’ll quote the panel’s abstract:
The University of Texas System TeleCampus was asked to build a learning application…
Multiple established technologies were employed: an XML-driven Flash module for test delivery; Flash WebServices connecting through .NET (JSP can be substituted in Linux environments) for storing test results and manipulating session variables; FlashVars and HTML submission for menu state storage; and employing CSS throughout for accessibility.
The idea to put Flash to work on the client and use .NET for heavy lifting was very fitting. Both technologies were utilized for what they did best.
As soon as I got back I picked up a copy of Flash.NET: Dynamic Content with Flash Remoting MX and ASP.NET to learn some more about the topic. So, on to the book review…
What to Expect
As you might’ve guessed from the book’s title, the book discusses how to pair Flash and .NET. I believe the six authors of this book very facing a difficult question, “Who are the target audience?”
An extensive discussion of Flash would merit a big thick book. Same goes for ASP.NET. Forging a novice developer into a Flash and .NET expert in only 325 pages is impossible. Therefore the book teaches neither Flash nor ASP.NET. It merely scratches the surface of both and assumes you are proficient either in Flash and want to learn what ASP.NET is and how to make the two technologies talk, or you’re a knowledgeable ASP.NET developer who wants to get his/her hands dirty with Flash.
Jumping Hoops
ASP.NET samples and database scripts in this book are very simple. In fact, they are so ridiculously simple that you would never use them in real life (you would not store the counter of visitors to your web site in a file and update it on every page hit), but hey—they get the point across. Good enough. Flash designers, who are new to .NET, will appreciate this simplicity.
Note: Visual Studio.NET is not required to run samples! You can use a text editor of your choice.
On the other hand, since I’m totally new to Flash, I felt many a time bewildered about what was going on. I’ve never worked with the Flash MX environment before. I tried to follow Flash samples, but couldn’t get my ducks in a row. Movie clips, layers, scenes, multiple frames on a timeline, etc—you need to know how to navigate around the IDE to find your way around. This will definitely take a learning curve.
It was a pleasant surprise, though, that ActionScript is a lot like JavaScript (and hence Java and C#) in many ways. Aside from the Flash MX IDE, learning ActionScript shouldn’t be bad at all should need arise.
The book starts out with simple ASP.NET pages that simply produce crude output with Response.Write while a Flash movie loads it into variables. Quite simple.
Then, in Chapter 5: Flash Remoting, you learn how to install the Flash Remoting service for .NET. I found this chapter quite confusing, especially the part about service functions. It felt more like a hot fudge than bona-fide integration of the two technologies. It is cool, though, how you can invoke a .NET web service right from ActionScript and load its response into an “object” (see case studies).
There’s a chapter on database access. If you are familiar with ADO.NET, there’s nothing new there for you. The book concludes with case studies.
Flash and XML
Several samples demonstrate how to load and parse XML fragments. Quite honestly, I find XML traversal in Flash ludicrous. Please pardon my ignorance, but I got so used to the giant XML library in .NET with all kinds of readers, parsers, XPath, XSLT, etc, that the scant XML traversal syntax in Flash looked sorry. Or so it seemed from the samples.
Conclusion
If you want to read this book, you’d have to buckle up real tight because there will be some things you will probably not understand whether you are a Flash designer or a .NET developer. The book has two case studies in the back: Airport Weather and PenPad. Both are more or less real-life projects with interesting scripts.
There’s so little reading on both Flash and .NET that this book is a good start. The authors know what they are talking about, and that’s always a very good sign!