Swiz Framework (Short Review)

    Swiz is a framework for Flex, AIR, and Flash that was created to quickly develop RIA applications. The main features of swiz are:

    Compared to other Flex frameworks:
    • No need for JEE patterns
    • No need for a bunch of duplicate folders
    • No heap of copy-pasted pieces of code
    • It is not necessary to inherit framework classes


    The two main principles of the framework describe these two diagrams:



    Dependency Injection

    image
    1. The controller using meta tags indicates the dependence on a service
      [Inject]
      public var userDelegate:IUserDelegate;

    2. Swiz finds an appropriate implementation of this interface
    3. Swiz inject necessary service into controller

    Event mediation

    image
    1. The controller using meta tags indicates interest in any event
      [Mediate(event="LoginEvent.LOGIN", properties="user")]
      public function login(user:User):void

    2. UI dispatches a regular event with the bubble enabled
      (Best Practices implies the use of a Presentation Model which dispatches events)
    3. Swiz automatically executes commands in the controller that are interested in events


    The main documentation is available on the developer's site.

    In the next post I will talk more about the structure of a simple application, and then about the structure of a more complex application.

    Next post: Swiz Framework (simplest application)

    Also popular now: