Winton DeShong
Web / Flash Development

Archive for December, 2008

OpenInGit and OpenInTextMate

December 31st, 2008 | Category: Apple, Software, Source Control, Workflow

For those of you using Textmate and/or Git on the Mac, check out OpenInGit and OpenInTextMate.

For those of you who aren’t…convert now!

1 comment

Authentication using Flex and the PureMVC Framework

Problem Summary

Almost all of the projects I work on in Flex utilize some form of authentication. So I needed a base flex project that had an authentication wrapper built with the PureMVC Framework.

Solution Summary

Being that I use PureMVC in all of my flash/flex development, I have several base projects on hand to get a project rolling. If you use PureMVC or are interested in getting your feet wet, here you go!

Explanation

For this example, I am going to assume some underlying knowledge of OOP, Flex, and PureMVC. For simplicity sake, I removed any flex remoting specific code (ex. SOAP, XML, AMF, etc…). In another example I’ll demonstrate how to setup projects using both SOAP and AMF based web services.

Requirements:

1. Flex Builder / Eclipse
2. PureMVC Framework (source or SWC) http://www.puremvc.org
3. Understanding of Object-oriented principles.


In support of the Flex Cookbook, the source code and further explanation will be provided on the Adobe Developer Connection website.
Source code - ADC Flex Cookbook

1 comment

ADC Flex Cookbook

December 15th, 2008 | Category: Adobe Flex, Eclipse, Flex Builder, Workflow

For anyone using the Adobe Developer Connection flex cookbook, check out the flex builder/eclipse RSS plug-in at http://flex.actionscript.it/index.php?title=RssPanel_En. If you don’t know what I’m talking about, definitely head on over to the ADC and check it out!

Install path: http://flex.actionscript.it/plugins/RssFlex/

No comments

AMF versus SOAP

AMF Logo

What is AMF?

AMF is a binary format based loosely on the Simple Object Access Protocol (SOAP). It is used primarily to exchange data between an Adobe Flash application and a database, using a Remote Procedure Call.

Each AMF message contains a body which holds the error or response, which will be expressed as an ActionScript Object.

AMF was introduced with Flash Player 6, and this version is referred to as AMF 0. It was unchanged until the release of Flash Player 9 and ActionScript 3.0, when new data types and language features prompted an update, called AMF 3.

Why AMF over SOAP?

Though SOAP has become the standard for web services across the web, there are various alternatives. My full-time employer, andCulture, gave me the task of researching alternatives to SOAP for improvement of current and future client-side web applications utilizing the flash platform.

Having had previous experience with many different approaches to flex/flash remoting, I immediately turned to AMF. To make the point clear, I whipped up a quick Flex application that handled requests from two different web services. The first webservice was an ASP.NET SOAP Webservice and the second was an ASP.NET AMF3 Webservice. Each service utilized the same methods and value objects/descriptors. The results were dramatic!

AMF versus SOAP

* Take note of the payload size of AMF and SOAP at a descriptor count of 140.

How do I get started with AMF?

Being a PHP developer at heart, I have extensive experience with the AMFPHP project. From the removal of the method table to the addition of the flex service browser, the AMFPHP package is light-weight and has little overhead. At the same time, being that Adobe has moved toward Zend as the standard for AMF, the AMFPHP project has since died (R.I.P.).

Keeping AMFPHP in mind, I did research into ASP.NET solutions for AMF flash/flex remoting. After looking over the various options, I found the FluorineFx package.


FluorineFx

The FluorineFx package is an ASP.NET library for .NET 1.1, 2.0, 3.5, and Mono 1.2.4 for Flex, Flash, and Silverlight Remoting. This package combines my favorite aspects of AMFPHP, previously mentioned, and ASP.NET/Visual Studio. Here are a few highlights:

1. Flex Service browser - If included, you can simply use http://www.your-domain.com/website/Fluorine.aspx and browse your existing services, generate code, and test methods.

2. AMF0 and AMF3 support - Fluorine supports both the new actionscript 3 format and legacy formats of AMF.

3. Upcoming Flex Visual Studio wrapper - Yeah, I said it! They are developing a wrapper for VS that will enable recognition of flex projects in VS!

4. Code generation templates - The 1.0.0.15 release of FluorineFx (installed via setup.exe found on site) includes a few templates for generation of cairngorm templates and general code for the foundation of your flash projects. The version found in SVN contains support for extension of these templates (http://code.google.com/p/fluorinefx/).

Note: If you attempt to build from source, make sure to generate and assign new keys to the appropriate projects (ex. fluorine.snk).

5. New project types for Visual Studio - After installing FluorineFx, you will find new project types in your Visual Studio interface. Similar to the current workflow for SOAP services in VS.

There are many other features offered by the FluorineFx library and I encourage you to head on over to FluorineFx.com!

1 comment

google

google

asus