First Take at Swiz Framework

On June 6, 2010, in Flex, by Anuj Gakhar

I came across a project at work that was written using Swiz so I decided to spend the weekend getting my head around Swiz Framework for Flex. Swiz is a framework that provides Inversion of Control and Dependency Injection as its killer feature. I have been using Cairngorm for too long now and I was pleased with how Swiz handles the events, handles the dependency Injections and makes life so much easier.

In order to learn something, you always have to write some code with your own hands to actually see whats going on. So I decided to re-write coldfusiondocs using Swiz. Its currently written using Cairngorm and it still is using the Cairngorm version on the live website. For those of you who want to see what I ended up doing, I have committed everything to the SVN repository. I have created a new tag called coldfusiondocs_swiz which has all the code. You are more than welcome to review the code and suggest any improvements or changes. The project is open source anyways and its always good to have extra pair of eyes looking over. 🙂

Anyways, back to Swiz, here are a few things I learnt while doing this mini-project. :-

  • All Swiz expects you to do is define the Bean Config in the main Application file. After ofcourse dropping the .swc library in the ‘libs’ folder. There is nothing else you need to do, framework wise. Everything else is pretty much framework independent.
  • There are no imports required from the Framework source and the Events are native Flex Events, which I think is, one less thing to worry about.
  • The Event handling and Mediation leaves the developer with only the application logic to worry about rather than firing events and mapping them to commands etc.

Overall, I think I could get used to this quite easily. The framework is still not as stable and mature as some of the other frameworks but I can see it going in that direction.

Tagged with:  

7 Responses to First Take at Swiz Framework

  1. Philip Bedi says:

    Good review, well done mate.
    nice, short and sweet.

    Keep the way it is going.
    🙂

    Philip

  2. Anuj Gakhar says:

    Thanks Philip. Try looking at the code and see if you have any suggestions etc

  3. Philip Bedi says:

    I will have a look mate, I forgot the SVN client you told me other day, which one was that?
    Are you on any chat client? like Skype ? I found five people on Skype with a name like yours 😉

  4. Philip Bedi says:

    I had a quick look, looks good to me with my limited knowledge of Swiz 😉
    But I was wondering about you creating an interface “IApplicationModel” and not using it in your application, what could be the reason?

    I am sorry for being critical mate 🙂

    cheers

    Philip

  5. Anuj Gakhar says:

    My skype name is on here https://www.anujgakhar.com/contact-me/ 🙂

    and you are right. IApplicationModel is redundant:) good catch 😉 

  6. Anuj Gakhar says:

    and here is the SVN client I was talking about http://www.syntevo.com/smartsvn/index.html

  7. Philip Bedi says:

    Thanks for the svn client, and you know me (about the catch) LOL

Leave a Reply to Philip Bedi Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2011 Anuj Gakhar
%d bloggers like this: