ABC of Swiz Framework

Posted: September 16, 2011 in API, Flex, RIA, Technology
Tags: , , , , ,

I am currently looking into a Flex application framework for my upcoming Flex Enterprise project. In Flex application development Cairngorm and PureMVC framework is a de facto standards. For my project we are looking into a possibility to introduced Swiz framework for application architecture.

Swiz official website stated this as “The brutally simple micro-architecture for Enterprise ActionScript development”. This tagline is very catchy and promise to cater key requirement of any application i.e. simple framework for enterprise level application. While judging this statement I have migrated some of the small apps into Swiz framework and reduced 30-40% of codebase, it is interesting.

Here I am giving you simple steps to give a start Swiz based application:
Create a context file for configuring Swiz framework. In this configuration we are providing the Beans and configure the Swiz framework.

  1. Create a Bean factory as repository for Bean classes.
  2. Injecting the bean where it needed using [Inject] tag. After injecting the bean you are able access the bean object.
  3. Register handle for flash event using [Eventhandler(event=”EventClass.EVENT_NAME”)] for event handling.
Swiz Context Configuration

swiz_part1

Swiz Bean factory

swiz_part2

Injecting Bean and register event handler

swiz_part3

Dispatching event

swiz_part4

Now after this simple step we can give a start to Swiz based application development. This is really a very simple as stated in Swiz website. One key point here is all metadata tag related function and properties should marked as public. Swiz framework developer’s team are also ready with Swiz AOP version (Aspect Oriented Programming). Swiz AOP gives you the powerful ability to easily configure new functionality into existing code, instead of muddying up your fundamental business logic. It is an extremely powerful methodology that Swiz makes very easy to work with.

Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s