Skip to content

Features

  • One Tag configuration (SwizConfig) – Initialize the Swiz framework and define framework settings in a single MXML tag. There’s no need to add event handlers to set up Swiz, just place this tag in your Application component and you’re off and running.
  • Inversion of Control Container (IoC) (BeanLoader) – Using the Inversion of Control principle, you can decouple your classes and define core application elements in configuration data rather than within the code itself.
  • Dependency Injection (Autowire metadata) – Tightly related to the idea of IoC is Dependency Injection, which allows the framework to manage the dependencies between your objects. Just add some simple autowire metadata to your class, and Swiz handles the rest. When an object is created, any other objects that it depends on will be provided to it automatically. No more worrying about what order to create things in, and no more editing source code to swap out implementations!
  • Event handling (Dynamic Mediator with Mediate metadata) – With a bit of event mediation metadata, Swiz will automatically locate and invoke any event handlers that express interest in a given event. No more manual addEventListener() or removeEventListener() calls, and no more methods that need to be exclusively used to handle events. You can just write standard methods, that take standard parameters (not Event objects as parameters), and move on. Swiz will automatically locate the right methods to call, and pass the right event properties into the method as parameters. And best of all, there are no Swiz-specific events. You can just create standard Flex events, announce them using normal dispatchEvent() calls, and Swiz transparently captures and redispatches them.
  • Dynamic Responder for easy RPC service calls – No need to deal with AsyncTokens and Responders. Just specify the success or fault handlers and call your service.
  • Dynamic URLRequest for easy HTTP/REST service calls – Similar to the dynamic responder, you can easily create URL requests without an addEventListener() in sight!
  • Prototype Factory – Standard Swiz beans are great for singletons like controllers or delegates, but what about objects that have many instances, like ItemRenderers? Swiz covers this too, allowing you to define a prototype bean. All the advantages of Swiz, like autowiring and event mediation, are available to each instance that Swiz creates.
  • View Mediator (Autowire view) – UI-based components don’t have to miss this party either. Swiz will autowire UI components and handle mediated events whenever a component is added to the stage. And if you have a use case where a controller needs to have direct access to a view, you can have Swiz autowire a view directly into a controller.
  • Command Chain – If you need to execute a series of service calls, the command chain simplifies the creation and handling of these chained calls.
  • SharedObject storage bean for easy client side persistence – Easily store data in SharedObjects.
  • Mock Utils – A handy set of mocking tools are available to aid in testing. When combined with Swiz’s IoC capabilities, this helps makes testing a breeze! For example, just substitute a mock delegate to your controller during testing, and you can test your Swiz application without a live server.
  • Unintrusive Framework – Perhaps the best feature of Swiz is also the most hidden: the unobtrusive nature of the framework itself. It’s very easy to create a Swiz application that has virtually no explicit dependencies on the framework itself. By placing metadata into your code to handle autowiring and event mediation, the bulk of your application may not have a single import statement for any Swiz classes!