|
Project Information
Members
Featured
Downloads
Wiki pages
|
Legato Framework for FlexSimple, lightweight application framework for Adobe Flex (ActionScript 3) based on some design patterns used in J2EE and Java Swing Application Framework. There are two separate modules:
Legato ActionsActions framework solves some common tasks and problems that exist during rich application development:
An example and see the source. Features: Multilingual supportNames, icons, tooltips are loaded from resources file addAction.label=Add
addAction.tooltipText=Add task
addAction.icon=Embed('../../icons/add.png')Changing language on runtime changes actions and visual components language. Actions aware visual componentsJust add your action to button, menu or context menu - visual components will take the look from action and execute it on click. <actionui:ActionButton id="button1" action="{someAction}">
</actionui:ActionButton>Read more on LegatoActions Legato InjectionIt's an implementation of the pattern as described by Martin Fowler in “Inversion of Control Containers and the Dependency Injection pattern”. It contains setter injection and constructor injection implementations. Main ideas are to : connect simple components in depedency injection container, make use of Flex features e.g. use MXML files (with code completition etc.) rather than external XML files for depedency injection configuration, This container can be used also as a service locator. Features: Simple MXML configurationfor both setter injection and constructor injection <DIComponent id="component1" scope="application" componentClass="{ExplicitCommandImpl}"
>
<constructorParams>
<mx:Array>
<mx:String>string parameter</mx:String>
<mx:Number>2</mx:Number>
<mx:Object>{component2}</mx:Object>
</mx:Array>
</constructorParams>
</DIComponent>
<DIComponent id="component2" scope="application" componentClass="{SimpleComponent}" />
<actions:AbstractAction id="action1" name="addAction" />
<actions:AbstractAction id="action2" name="copyAction"/>Metadata InjectionExample: //Injection by id
[Inject(id="component1")]
public var a:Object ;
//injection by id simpler
[Inject("component2")]
public var b:Object;
//injection by type
[Inject(type="poc.SimpleComponent2")]
public var c:SimpleComponent2;
//Injection by type guess
[Inject]
public var d:ExplicitCommandImpl;
//Injection by type works with interfaces, basic classess too
[Inject]
public var e:IExplicitCommand;Read more on LegatoInjection. |