Top 10 things new Flex developers should know
Top 10 things new Flex developers should know
By Michael Portuesi | Published: November 27, 2009
While helping a coworker get started with Flash and Flex development, I thought it would be a good time to cover the list of things that I have found pretty essential to know about Flex development, coming into it as a new developer.
Some of these items are simple details that you need to know. Others point to profound differences between Flash/ActionScript/Flex and other development environments.
Before you start
If you know HTML/CSS development, and some JavaScript, but nothing about ActionScript or Flex, you should really take the time to understand what object-oriented programming means, as ActionScript is a true object-oriented language, and Flex is an object-oriented framework. The same advice applies if you have been doing pure timeline-based Flash development without getting much into the ActionScript stuff.
Doug Winnie of Adobe has produced an excellent article addressing this topic. Additionally, he offers a series of free online video tutorials to get you started with ActionScript development from the perspective of a Flash developer.
1. Things happen asynchronously, even the simple stuff
Flex is a very asynchronous framework. What does ‘asynchronous’ mean? Basically, it means that you can’t really depend upon something happening right when you invoke the call to it in your code. Instead, the actual consequences of an assignment, or a call to a method on an object, might happen at some arbitrary time in the future.
This is not just the case when you call a remote HTTP webservice from your Flex application; it’s also the case when you do something as simple as setting the dataProvider property for a user interface control such as a DataGrid. Behind the scenes, DataGrid performs all kinds of work that doesn’t necessarily occur at the time your code make the assignment, and you don’t neces
相关文档:
metadata最先开始于dotnet吧,叫做Attribute;然后java也紧随其后,叫做Annotaion;actionscript则叫做Metadata。其中dotnet与ActionScript的语法格式上都是相似的,如AS中的[Bindable]。在Java中则是用@XXX这样的语法,如@override。不过目的都是一个,给类或方法或属性增加meta data标记,从而实现对这些被标记的代码进行 ......
工程下的history文件夹下存放三个文件:index.template.html,rightClick.js,swfobject.js
src文件夹下存放CustomContextMenu.mxml文件。
1.CustomContextMenu.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
applicati ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="initApp()">
<mx:Script>
<![CDATA[
public var pageRecordes:uint = 8;
public var totalPages:ui ......
Flex vs Flash
Flex是一个针对企业级富互联网应用的表示层解决方案;
Flex是 RIA(rich internet applications,即富客户端)的一种技术实现
Flex是一种应用程序框架;
Flex序列产品包括编译工具和IDE,通过编写MXML(一种类XML标记语言)和ActionScript(AS,Flex的脚本语言,从Flash移植过来)代码,用编译器来生成SWF文 ......
PureMVC实现了简单的MVC框架,将应用分为model、view和control三部分。
好处很多了,降低了模块之间的耦合性、提高了程序的可维护性和可扩展性。
fabrication在PureMVC基础上做了扩展,简化了pureMVC的开发难度,下面简单介绍一下fabrication的开发过程。
首先,根据需要实现org.puremvc.as3.multicore.utilities.fabric ......