Tracing the evolution of the Cairngorm framework reveals a great effort to isolate business logic. A coup of the framework has been to shift event flow from exclusively the display list towards a simple, efficient non-UIComponent propagation within an application architecture.
Specifically, the native event flow in Flex works hierarchically within the display list. Since display objects are by definition hierarchical, events flow through them from impetus to the bottom node and, if so configured, back again. This ensures full propagation of the event. A reasonable supposition on behalf of Cairngorm engineers is the difficulty of performing business logic apropos of a display hierarchy. Business logic requires a unique non-display set of delegates, services and model managers. The Cairngorm framework places events at the behest of these classes.
How then to bridge the new events and the old? This is where flexcairngorm takes the reins.
There is a very handy explanation of this, supplemental graphics and all, by Thomas Burleson on Gridlinked.info. He describes the process by which notification returns to the view following the propagation to business logic and the response back. It involves IResponders and a callback parameter. Browse gridlinked.info to learn all about it.
Once you've read it, the next step is coordinating flexcairngorm with Mate dependency injectors, using Mate EventMaps.
Showing posts with label cairngorm. Show all posts
Showing posts with label cairngorm. Show all posts
Tuesday, December 22, 2009
Flex MVC options
The set of instructions in rich applications tends to get quite complex. Thus, RIA code needs to be divided up into smaller components to manage complexity. Design patterns such as MVC are loose methodologies for doing this, with limitless implementations in practice. In Flex, MVC are often referred to as microarchitectures. They manage business logic for a client application, allowing decoupling between logic and UI.
The prominent first generation of mature MVC framework for Flash and Flex is called Cairngorm. It is now up to 2.2 with version 3 hovering indefinitely in beta. Cairngorm introduces a new system of event management called the CairngormEvent. It is more analog than extension of a Flex Event, since it has unique dispatch and propagation attributes.
The pros and cons of isolated event management, MVC and FlexEvent, have been largely considered in the developer community, resulting in some rethinking of Cairngorm event methodology. A prominent advance is UniversalMind's UM Cairngorm Extensions. This represents first and foremost an enrichment of the Cairngorm framework. If you plan on going down this path, UM Extensions may allow you to do more with it.
Otherwise, Flex is reaching the second iteration of third party frameworks, as Cairngorm gets more competitors. Mate and Swiz lead the pack, with retooled and reconsidered architectures for events and business logic structures. In some cases, microarchitectures are fully MXML in the second iteration.
By no means is the solution one-sided, as many groups have invested heavily in their extant codebase. In any case, all the options deserve a thorough look see. Some orientation will allow you to consider the best for your project.
The prominent first generation of mature MVC framework for Flash and Flex is called Cairngorm. It is now up to 2.2 with version 3 hovering indefinitely in beta. Cairngorm introduces a new system of event management called the CairngormEvent. It is more analog than extension of a Flex Event, since it has unique dispatch and propagation attributes.
The pros and cons of isolated event management, MVC and FlexEvent, have been largely considered in the developer community, resulting in some rethinking of Cairngorm event methodology. A prominent advance is UniversalMind's UM Cairngorm Extensions. This represents first and foremost an enrichment of the Cairngorm framework. If you plan on going down this path, UM Extensions may allow you to do more with it.
Otherwise, Flex is reaching the second iteration of third party frameworks, as Cairngorm gets more competitors. Mate and Swiz lead the pack, with retooled and reconsidered architectures for events and business logic structures. In some cases, microarchitectures are fully MXML in the second iteration.
By no means is the solution one-sided, as many groups have invested heavily in their extant codebase. In any case, all the options deserve a thorough look see. Some orientation will allow you to consider the best for your project.
Labels:
actionscript,
cairngorm,
cairngorm extensions,
flex,
mate,
MVC,
mxml,
swiz,
universalmind
Subscribe to:
Posts (Atom)