What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Sep 21, 2008 by Chris.Scott.One
ProjectSetup  

Project Setup

To get started with Swiz, first make sure you have downloaded the latest version of the swiz.swc library from http://code.google.com/p/swizframework/downloads/list. Alternately you can check out the Swiz source code through svn and compile it yourself. Once you have obtained Swiz, you need to create a new project in Flex Builder and add the swiz.swc library to your project. Create a new project in Flex Builder and choose either a Web or Desktop application. You can leave the Application Server Type set to 'none'. Swiz comes with a convenient utility class, DynamicChannelSet which enables you to compile your application without pointing it at flex-services.xml. If you are using Flex Builder 3, you should already have a libs directory in your project root. Just place the swiz.swc there and refresh or clean your project. If the libs directory does not exist create it, then right click on your project, select Properties > Flex Build Path > Library Path, select 'add SWC folder' and select the libs directory you just created. Alternately, you can open .actionScriptProperties and add a new element under <libraryPath defaultLinkType="1> such as the following:

<libraryPathEntry kind="1" linkType="1" path="libs"/>

Place swiz.swc in the libs directory and your ready to go! Swiz uses custom metadata, which is compiled into swiz.swc. As long as you are using the Flex 3 SDK, there is nothing else that needs to be done. However if you are using an earlier SDK, you will need to enable the metadata.

For Flex 2 and earlier users only!

Right click on your project in Flex Builder, and select Properties > Flex Compiler. Under 'Additional compiler arguments' add '-keep-as3-metadata+=Autowire' to the existing values. If you created a basic project your compiler arguments should read:

-locale en_US -keep-as3-metadata+=Autowire

Alternately, you can open the .actionScriptProperties file located in your project's root directory and add '-keep-as3-metadata+=Autowire' to the 'additionalCompilerArguments' element on line 2.

Now Swiz's metadata is enabled and will be properly compiled into your application.

You're now ready to start working with Swiz! The next sections describe defining your application components to Swiz, creating Controller objects, working with asynchronous service calls, dynamically creating chained command objects, and handling events through Swiz. I would suggest reading through all the following sections to get a good overview of Swiz, but if you have a short attention span, you can download the swiz-test-examples.zip from http://code.google.com/p/swizframework/downloads/list and pick through the flex code. Hopefully, you'll find Swiz surprisingly simple and easy to work with.

Next: DefiningApplicationComponents


Sign in to add a comment