Winton DeShong
Web / Flash Development

Archive for the 'Adobe Flex' Category

FlexFormatter Eclipse Plug-in

If you are a MXML and/ or ActionScript developer using Eclipse, you must use FlexFormatter. Head over to sourceforge and grab this eclipse plug-in NOW! Finally, an end to the war between new-liners and same-liners.

No comments

ActionScript Message Format Presentation

A few weeks back I gave a presentation at the Central Pennsylvania Flash User Group (CPFUG) on the ActionScript Message Format, or AMF. Below is a screen capture of the presentation along with audio. You can also download a higher quality 800×600 version here.

Adobe Flash Player version 9 or higher is required.

4 comments

PureMVC Debug Console by Kap Lab

I recently stumbled upon a pretty cool project released by Kap Lab called PureMVC Console. The debugging console allows you to track various aspects of your single/multi-core PureMVC applications in a convenient manner. Setup is simple and the developer guide shows you how to easily switch your project between production and debug mode via compiler directives. During run-time of your application, you can hit a simple key command to bring the debug console up. This project is definitely worth a look!

No comments

File uploading in a PureMVC application

Problem Summary

File browsing/uploading/saving is a common task. What is the best way to implement file handling while using the PureMVC framework?

Solution Summary

Below I propose a foundation for handling file browsing/uploading/saving in a single-core PureMVC application.

Explanation

In both single-core and multi-core PureMVC applications, I tend to keep all of the FileReference/FileReferenceList event handling in a Proxy. This allows for application/module -wide handling/presentation of errors related to file uploading. It also abstracts the code for re-use in all of your components in the application.

For more, check out my Flex Cookbook post at http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postid=12706&loc=en_US&productid=2.

Project source files

No comments

Managing your code with Git and the EGit plug-in

January 25th, 2009 | Category: Adobe Flex, Eclipse, Flex Builder, Source Control, Workflow, git

Problem

I’ve been migrating to Git for my SCM needs. Using the command line is fine and all, but it would be nice to have a more accessible and streamlined approach. One that works with eclipse/flex builder?

Solution

The EGit project is an eclipse plug-in for managing projects that use Git. Though the project is somewhat new, it has come a long way. It is simple to use and the project is constantly being improved.

Explanation

For more information, see my flex cookbook article at http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postid=12606&loc=en_US&productid=2.

No comments

Using AMF and RemoteObject without services-config.xml

Problem Summary

The most common approach to configure your environment to talk to amf services is through a file called services-config.xml and RemoteObject. The problem is that services-config.xml is used at compile-time. This creates annoyances when using multiple developers and/or multiple platforms for development, deployment, etc…

Solution Summary

In my case, I decided to migrate the endpoint-uri from the services-config.xml file into a configuration XML file that is used at run-time. Each site can then have it’s own config file and I only need to compile the application once.

Explanation

For this example, I’m going to assume you already know how to create, load, and parse XML files and feed that data throughout your application. In my case, I created a singleton with a static property of ‘endpointURI’ that can be referenced through the application.

See my post on the Flex Cookbook for more details.

No comments

Using the FluorineFx AMF3 package to communicate with Flex.

Problem

Utilizing SOAP web services to communicate with Flex has many benefits, but it’s slow. Using custom XML can be light-weight, but it’s not standard. What is the best route for someone using ASP.NET?

Source

ASP.NET and Flex Source Code [1.8 MB]

Explanation

Instead of using SOAP or your own custom XML solution, I recommend giving AMF a try. Visit http://osflash.org/documentation/amf.

Read more

9 comments

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

Next Page »

google

google

asus