1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Friday, June 12, 2009

How do I learn Flex?

Sean Moore - Flex Developer, AIR Developer, ActionScript Programmer

The world of Flex development is pretty big and it's expanding all the time. There are many types of applications that can be built with Flex from dashboards to widgets, media playback utilities to Enterprise RIAs and don't forget interactive kiosks and Internet aware desktop applications. One of the most common questions that I get asked is: How/Where do I learn Flex? I think one of the keys to mastery is a successful learning path. I also think that a solid foundation goes a long way. We've all heard the phrase: "crawl, walk, run…"

Here are some resources that helped me learn Flex. They are organized in a somewhat sequential fashion.


Beginner

Lynda.com

O'Reilly Programming Flex 3

Adobe.com

DClick Adobe Flex Coding Guidelines

CFlex, Community Flex

Using ASDoc


Intermeditate

AtTest (practice exam engine for Adobe Flex Developer Certification)

Flex Certification

Flexlib (open source user interface components)

Flex Unit

Subversion

Creating Flex components

Developing Flex RIAs with Cairngorm (Steven Webster, Adobe Consulting)

David Tucker

Mate Framework

Adobe Flex Community Expert program

Papervision / Away3D

MXMLC

Flex and SWC files

Degrafa


Advanced

Livecycle

Flash Media Server

Flex Charting

ILog Charts

Particle Systems

Flint (more particles)

Paul Ortchanian (scripted 3D, particles, bezier)

Flex Modules

Flex Profiler

Flex Ant Tasks

BlazeDS

Misc. Resources:

Mike Chambers blog

Ryan Stewart blog

Kevin Hoyt

Eric Feminella blog

Ted Patrick blog

Lee Brimelow blog

Flex Show

Adobe Developer Connection

Adobe Edge Magazine

Flex.org

Adobe Feeds

Flex Camp

Farata Systems Training

Comtaste (Flex training)

Beyond Flex

Spring

Hibernate

MySQL

Oracle

JPA

Ant

Java

Design Patterns: Elements of Reusable Object-Oriented Software

VTC - Design Patterns videos

Continuous Integration

Agile software development

SCRUM

UML

TDD

Test Driven Development by Example

How To Design A Good API and Why it Matters

Choosing a Flex Architectural Framework

Bill Gloff » Cairngorm
Friday, January 30th, 2009

If you're working on a moderate to complex Flex/Air application I hope you are using some kind of MVC style framework to help with organizing your components and the interactions between them. If you do not use a framework, you will unknowingly be creating your own. This, consequently, makes it harder for others to get up to speed with any maintenance that will need to be completed, and you will be on the hook to create all the related documentation. Also, why re-invent the wheel when pre-existing frameworks, such as Cairngorm, PureMVC, Swiz, or Mate, already implement best practices and are field-tested? All you need to do is set aside a little time to learn them.

I'm currently working on a greenfield project where I have a Flex/AIR front-end talking to RESTful services provided by Groovy on Grails. I'm a few weeks into the project, but my latest challenge has been deciding on what MVC ActionScript/Flex framework to use. Let me attempt to tell you a little about my process thus far, in case you're going through this yourself.

If you've done any Flex at all I'm sure you've heard about the market-leading framework Cairngorm. It's currently the most popular choice for enterprise worthy applications. It took its inspirations from the Sun J2EE Blueprint Catalog and implemented all the Java based patterns in ActionScript (AS). Some of these well-known patterns are the Command, Front Controller, MVC, Singleton, Value Object, and the Delegate. I believe some reasons for the success of Cairngorm is because AS is very similar to Java with a little mix of JavaScript thrown in for good measure. Then, you add the fact that Adobe (and previously Macromedia) likes targeting server-side Java guys (LiveCycle Data Services anyone?), which should make them comfortable with Cairngorm once they get up to speed on Flex and AS. Since it's been around for a long time there's quite a bit of documentation on it (in blogs, as well as books), and even code generators, which attempt to speed up development time. In Flex Builder 4, which will be released later this year, Adobe will be integrating Cairngorm support into Flex Builder out of the box. Very appealing indeed!

I know PureMVC is getting a lot of hype lately as it enforces a strict MVC and has been ported to a lot of different platforms such as Java, AS, and even Objective C and Ruby. I haven't used it, but I read up on it quite a bit. It seems a little awkward to me since it doesn't take advantage of Flex binding. I know this is because it remains a language/platform independent framework that focuses on giving you a way to do MVC. I'm sure PureMVC has its merits though, and I believe I would enjoy it if a project I was working on already had it… same for Cairngorm. The only things I would look to add to each of those would be some good ole Inversion of Control Prana style (now called Spring ActionScript) to spice things up, and simplify some of the code.

The next framework I read up on was Swiz. This seems like a great combination of MVC and IOC, and it's the only framework to use AS3 Metadata to wire up all your components. It is a very innovative approach with the only concern being maturity compared to Cairngorm and PureMVC. I probably would look into this one a bit more if it wasn't for my first choice…

I started my project thinking that I'll go with Cairngorm, but as you probably figured out, I changed my mind. This happened after I saw a demo of a Flex-based framework called Mate. In my opinion, Mate is one of the more lightweight frameworks out there. I say lightweight because it attempts to use native Flex events whereas in Cairngorm you are forced to have your events implement a Cairngorm interface. This is a dependency I do not care much for. Mate's philosophy is to make your views oblivious to what is going on in the backend… from getting some data from your server to injecting those values into your model. You can have all your custom components be free of any references to any Mate related classes, which is a good sign for an MVC oriented framework. Mate has a concept that none of the other frameworks have that I find intriguing… maybe because its different from the J2EE inspired frameworks, and I am digging how it takes advantage of MXML, whereas the others use more ActionScript. Basically, the main concept of Mate is to define an Event Map, which is just a switchboard of what actions to invoke when a specific event is fired. This is where most of your server calls come into play and injecting the values into your Managers which are singleton based models for your views and also take advantage of bindings. This Event Map is all tag based, which I like, but since it's all AS under the covers, you probably can implement your Event Map in a regular class if you prefer.

I've just begun really using Mate and I'm enjoying the process of wiring everything together. It seems well thought out and simple, but also elegant. I'm also enjoying the fact that I'm programming in more of an event-based language, which these frameworks promote, especially Mate. As I get further into my project I'll try to give updates about how my experiences with Mate are transgressing.

To get a better comparison of these frameworks you should read the 5 part article "FrameworkQuest 2008". It's a great read seeing how Tony Hillerson went and developed the same Twitter application using these 4 different frameworks and discusses the benefits and weaknesses of each.

So go and find yourself a framework to use. I'm sure whichever one you pick will work out for the best… if not, well then there's other options as you can see.

Top Ten Flex Tools and Resources

Sean Moore - Flex Developer, AIR Developer, ActionScript Programmer

When developing Flex and/or AIR applications there are a handful of tools that really make the difference between a good project and a great project. They are all very valuable and provide stability and clarity for the RIA development process; or at least they have for me. From Unit Testing to SVN utilities to frameworks and libraries I've found the following ten items to be very useful and helpful. I'd even go so far as to say these are critical for quality Flex RIA development; but as Les says: "It's just a matter of opinion." ;)

Cairngorm
Cairngorm is the lightweight micro-architecture for Rich Internet Applications built in Flex or AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages best-practices for RIA development advocated by Adobe Consulting, encourages best-practice leverage of the underlying Flex framework, while making it easier for medium to large teams of software engineers deliver medium to large scale, mission-critical Rich Internet Applications.
http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm

Download:
http://download.macromedia.com/pub/opensource/cairngorm/cairngorm2_2_1-bin.zip

Flex Unit
FlexUnit is a unit testing framework for Flex and ActionScript 3.0 applications and libraries. It mimics the functionality of JUnit, a Java unit testing framework, and comes with a graphical test runner.
http://opensource.adobe.com/wiki/display/flexunit/FlexUnit

Download:
http://download.macromedia.com/pub/opensource/flexunit/flexunit0_9.zip

Subclipse
Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE. The software is released under the Eclipse Public License (EPL) 1.0 open source license.
http://subclipse.tigris.org/

Eclipse update site URL:
http://subclipse.tigris.org/update_1.6.x

Eclipse
Eclipse is a multi-language software development platform comprising an IDE and a plug-in system to extend it. It is written primarily in Java and is used to develop applications in this language and, by means of the various plug-ins, in other languages as well - C, C++, COBOL, Python, Perl, PHP and more.
http://www.eclipse.org

Download:
http://www.eclipse.org/downloads/

ASDoc
ASDoc is a command-line tool that you can use to create API language reference documentation as HTML pages from the classes in your Adobe® Flex® application. The Adobe Flex team uses the ASDoc tool to generate the Adobe Flex Language Reference.
http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_1.html

Flex Ant Tasks
The Adobe® Flex® Ant tasks provide a convenient way to build your Flex projects using an industry-standard build management tool. If you are already using Ant projects to build Flex applications, you can use the Flex Ant tasks to replace your exec or java commands that invoke the mxmlc and compc compilers. If you are not yet using Ant to build your Flex applications, you can take advantage of these custom tasks to quickly and easily set up complex build processes for your Flex applications.
http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html

Installation:
http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_2.html#224215

Degrafa
Degrafa is a declarative graphics framework open source licensed under MIT.
http://www.degrafa.org

Download:
http://www.degrafa.org/code/

as3corelib
The corelib project is an ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript 3. These include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs.
http://code.google.com/p/as3corelib/

Download:
http://as3corelib.googlecode.com/files/as3corelib-.92.1.zip

Flex SDK coding conventions and best practices
Coding standards for writing open-source Flex framework components in ActionScript 3. Adhering to these standards makes the source code look consistent, well-organized, and professional.
http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions

Flex Language Reference
The Flex 3.3 Language Reference provides syntax and usage information for every element in the ActionScript™ language. It documents all elements in Adobe® Flash® Player and Adobe® AIR™ that are officially supported by Adobe.
http://livedocs.adobe.com/flex/3/langref/

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...