My favorites | Sign in
ctx
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

Update Please read my blog post that could serve as an introduction to Ctx flex framework http://ewa.sg/2009/07/thoughts-on-ideal-flex-framework/

I'm updating documentation constantly but it's always behind the source code, So please feel free to check out source code. It's easy to start with Ctx framwork so lack of detailed documentation shouldn't be a problem.

Please contact me if you have any questions regarding the framework andriyo at google.com (Andrii Olefirenko)


Ctx is a dependency injection Adobe Flex framework with additional functionality needed for almost every Enterprise Rich Application (ERIA) (e.g. the application that needs client-server interaction)

Ctx framework features

  • Dependency injection: autowire by type and by id, just-in-time autowire by type, lazy and eager initialization, singleton and prototype scopes, simple beans (could be any type), multiple contexts, hierarchical contexts.
  • Asynchronous calls support: handling results and failures, chaining calls (one by one or in parallel), and support for artificial asynchronous calls.
  • Command event support using event bus.
  • Extensibility via event mechanism.
  • Server calls cache.
  • Mock remote objects.
  • Quasi-multithreading.
  • Bean utils (copying properties of one bean to another, from XML to a bean)

Beans

Any object could be a bean. The framework manages dependencies for beans. You just register a object with register() method of the Ctx class.

Here is how you add beans

var c:Ctx = new Ctx;
c.register(MyBean, "myBean");
//or
c.myBean = MyBean;
//to access the bean
trace(c.myBean) // these beans are bindable

you could create instances of Ctx class wherever you need them. They will reference the same beans. You could have code in your MXML like this (and therefore no need for ugly 'getInstance()' calls in Script section)

    <framework:Ctx id="c"/> 

Commands

Command patters could be implemented using beans with public methods

   c.myBean.doSomething();

Please read on the Getting started guide and check out the examples.

The feedback is really appreciated

Powered by Google Project Hosting