【】SWF的进化,5种开发方法

来源:互联网 发布:刘诗雯禁赛知乎 编辑:程序博客网 时间:2024/04/28 20:33

Evolution of SWF : 5 approaches to RIA development




2008, the Flex-Flash world is at its maturity and developing rich Internet applications (RIAs) has become an official web 2.0 buzzword. In the past week, I looked back and noticed how much SWF has evolved. There now exists 5 approaches to SWF development and most importantly it seems a bit awkward that there only are two titles attributed to their authors.  This post is an explanation of what applications can now produce SWF and how-to-call-that-guy-who-compiles-swf's.

Here's a quick diagram of applications producing SWF's.  Needless to say ActionScript 3 is the common thread among all.  Fact remains that each application gives access to a different levels of control over AS3 and necessitates a different skill set and background.



And here are the 5 approaches to SWF development:

SWF through the Flash IDE
: this is the simplest way of producing swf's.  Using the Adobe flash application one uses concepts such as the Timeline, animation frames, and layers for organizing and controlling an application's content over time. This approach to swf development uses sequential programming a linear sequence of commands (stop-play…) and can use procedural programming with subroutines (also known as functions) to partially compartmentalise code block for more efficient use. This is the most popular way of creating swf's. Code is written in AS1, AS2 or a less strict version of AS3. These developers are often referred to as flash designers or developers.

SWF thorough flash IDE using the Document class
:  This is an evolution to the previous development technique although the use of the document class makes the developer adopt an AS3 Object Oriented approach.  Code is encapsulated into logical Classes and the developer uses the flash library to extend movieClips and symbols to create interactivity.  Developers using this approach often rely on third party components or class libraries to facilitate development. These swf creators are often referred to as flash developers.

SWF through MXMLC : Using the command-line compiler (also known as the Flex SDK and freely available), the developer adopts an Object Oriented approach coding using applications such as notepad, flash develop, FDT or SEPY. The source files are just ActionScript text and they then pass argument to the mxmlc.exe command line compiler which in turn creates an SWF.  This approach is similar to coding within the flash IDE using the Document class although there is no library of symbols and the [embed] tag is used to embed assets within the swf.  Developers using this approach code in AS3 and often use MXML code to add flex components to their application.  This approach does not use the flash nor flex, yet it is the most powerful and versatile way to create SWF's. These swf creators are often referred to as flash or flex developers....depending on their mood.

SWF through Flex builder : Flex Builder is an Eclipse based IDE for developing rich Internet applications (RIAs) with the Adobe Flex framework. In some ways its notepad on steroids, filled with components and features to facilitate SWF development and deployment. It's uses the same command-line compiler as MXMLC although the IDE makes the process more programmer friendly and easier to install (after all you are buying the expensive software). The developer adopts an Object Oriented approach and the [embed] tag is used to embed assets within the swf. Developers using this approach code in AS3 and often use MXML code to add flex components to their application.  Drawbacks are that applications often don't look the way the designer wants..."looks like a flex app", no branding. These developers are often referred to as flex developers.

SWF through MXML code : Not to be confused with MXMLC, MXML is the XML-based markup language introduced with Flex. Just by using a few MXML tags, you can create a useful application with built-in behavior. In a nutshell coding MXML is often compared to coding in HTML. Developer use Flex builder to write the MXML code and link multiple components together in order to generate SWF's. There also is the possibility to use the Flex design view to visually place component on the stage, much like Dreamweaver uses its WYSIWYG editor to generate HTML. Although this approach often implicates the creation of a component cocktail through the use of powerful third party components, it is the least versatile way to create custom interfaces.  Components can be skinned and parameters changed, but they do have their limits. These developers are often referred to as flex developers even though they might not code in Action Script.


OK recap :


Flex Isn't Flash : Flex has no timeline, Flex has no library, Flex has no drawing tools.


Flash Isn't Flex : Flash has no MXML, better animation, better integration of design, Flash does not have flex components.


MXMLC combines flash and flex features : it does not use any of the above mentioned applications and is a bit of a hack. May necessitate some setup time before giving it a go.


If you read through the above list, you might have noticed my sarcasm towards the name we give our RIA creators.  Seems the market has not caught up yet with this evolution.  On a daily basis I meet brilliant flash designers who code AS3 using MXMLC and clumsy flex developers who  use WYSIWIG MXML editors and command 3 times a higher salary. It seems a bit awkward that there are 5 approaches to SWF development yet two titles attributed to their authors. 


My next post will look deeper into the how-to-call-that-guy-who-compiles-swf's. In order to stimulate debate,  I invite you to leave a comment  on which one of the 5 approaches you use and what title you most often use.  Do you find it fairly represent your skills? Here is my example, my name is Paul Ortchanian I use the MXMLC compile approach to code AS3 while having the versatility of flash at my disposal and I go by the title of flash programmer....and yeah I don't think it represents my skills well enough, especially since it does not mention that I do flex even though I don't use the software.


Feel free to leave comments, although remember that these are my personal opinions and might be a bit biased towards Flex.



原创粉丝点击