📜 ⬆️ ⬇️

Swiz Framework (quick tour)

Swiz is a framework for Flex, AIR and Flash that was created for the rapid development of RIA applications. The main features of swiz are:

Compared to other frameworks for Flex:

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

Dependency injection

  1. The controller using meta tags indicates the dependence on any service
    public var userDelegate:IUserDelegate;

  2. Swiz finds the corresponding implementation of this interface.
  3. Swiz inject required service to controller

Event mediation

  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 Displays a regular event with bubbling enabled
    (Best Practices imply the use of the Presentation Model which will dispatch events)
  3. Swiz automatic executes commands in the controller that are interested in events.

Basic documentation is available on the developer’s website.
In the next post I will talk more about the structure of a simple application, and then also about the structure of a more complex application.

Next post: Swiz Framework (simplest application)

Source: https://habr.com/ru/post/100469/

All Articles