Example project workflow using SWCs

June 26th, 2010

It’s more than a half year since my discovery that revolutionized my work – a MovieClips linked as non existing classes compiled to SWC ..not only my:

avocado.fi/tag/swc
blog.nightspade.com/flex/2010/02/embedding-asset-at-compile-time-in-pure-as3-project/
www.airtightinteractive.com/news/?p=327
blog.geewa.com/post/2009/03/16/Integrating-Flash-Professional-and-Flex-Builder-Using-SWC.aspx
shaun-oconnor.com/2009/01/15/flash-development-design-work-flow/
richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asset_workflows
blog.iainlobb.com/2009/05/could-flash-autogenerate-classes-from.html
blog.marchibbins.com/2008/12/
troyworks.com/blog/2010/03/04/how-to-create-swc-actionscript-libraries/
www.indieas.org/2009/09/another-flash-flexbuilder-workflow-the-draft/
stackoverflow.com/questions/1746373/actionscript-3-workflow-using-swcs-with-linked-external-classes
www.fdt.powerflasher.com/forum/viewtopic.php?f=21&t=6752&start=0
blog.alanklement.com/2009/08/09/fdt-customize-your-workflow/

Here’s my 3 cents to this topic. I’ve created video that shows on very simple example how I deal with graphics from SWC. Final effect:

The Flash plugin is required to view this object.

Very easy, but it’s only example. Currently I work on project, created with such workflow, that reached 500 classes created for that project, >100 separated test swf’s, 25 fla files, everything is very stable and I still don’t afraid to add new features!

Dealing with SWC is just one of few topics showed in video. Presented workflow show how to create project starting from smallest parts, test them, and join them in a larger parts. I think such “inverted order”, force you to create higher quality code because every part is produced and tested in completely separate environment. All swf files is created by Flex compiler. Flash IDE is used only for exporting SWC.

And “couple” of other cool things in such workflow in my opinion:
bug fixing is a lot faster (don’t need to compile whole application, and click trough app to reach that module, wait for animations to end etc.), just select specified module compilation (auto created)
it’s easier for someone new to join to the project (no need to learn whole project since there’s ready to expand or fix separated test of specified module)
a lot higher number of developers can work on one project (normally that number is determined by number of exported swf files)
final application can be compiled in few variants (that need also good experience with dependency injection)
every part can be compiled as separated application

Also checkout those fantastic Miško Hevery presentations. Miško talks about why tests is so important, why beware of Singletons, how to use dependency injection. I must admit that those presentations were, and still are a big inspiration in creating my workflow.

Here’s tests created during that project in chronological order:
content view

The Flash plugin is required to view this object.


menu button

The Flash plugin is required to view this object.


menu

The Flash plugin is required to view this object.


application

The Flash plugin is required to view this object.

And finally ;) video itself:

Example project workflow using SWCs from Marek Brun on Vimeo.

Sources for XApp.

There’s used JSFL commands during presentation. I think for now they are too messy to show, maybe in next post I will show some JSFL library ;)



Related posts:

Leave a Reply.


To write ActionScript code please use [as][/as] tags.