Archive

Archive for the ‘FrameWork’ Category

RobotLegs Framework Sample Application

September 5, 2010 Leave a comment

Hi  Everybody,

I have found one interesting framework  for Flex/AS3  Applications called Robotlegs[http://www.robotlegs.org/].

It helps in wiring Objects together and also it handles dependency injection with its meta tags so that it helps to organize our code well.

Here comes the Structure of a Robotlegs application

for architectural flow  diagram chkout[http://www.robotlegs.org/diagram/]

Context

Model

View

Mediator

Events

Command

Services

I have Done A Simple login page using Robot legs  here comes a short description of each part in it.

View:

The View Part Contains Main View and LoginPanel

Mediator

In Mediator the Views are Injected and listeners are added in mediators andevent is dispatched from the mediator according to the user interaction.Here the main view listens for the login complete event through the context listener

Events

Here Events are normal Flex events that can be triggered from any places.

Context

Context is a Place Where we map events with commands and views with mediators and also specify rules for dependence injection.

Command

A command is mapped with a event in context so that the execute method of command  gets called whenever that event is triggered.

Service

A service is called from the execute method of command and the results are handled in the service itself.Note that service should always implement an interface.In the result handler of the service again events are triggered to notify the arrival of data to process.

In this Application When the login complete event is triggered after service call the main view which is listening for this event updates the view.

For More Info Comment Here or Log on to http://www.robotlegs.org/

Download Sample Application

http://www.box.net/shared/rz0cz86okn

Categories: FrameWork, Robotlegs
Follow

Get every new post delivered to your Inbox.