Skip to content
soundstep edited this page Feb 8, 2011 · 2 revisions

SomaCore | AS3 MVC Framework for Flash, Flex and AIR.

SomaCore is a lightweight event-based MVC framework written in AS3 that provides a structure, models, views management and commands.

Somacore can be used for Flash, Flex and AIR projects.

SomaCore is completely event-based and use a concept of wires and mediators to code in a efficient decoupled way.

SomaCore can be used with or without dependency injection, and provide an injector adapter for the included DI library: SwiftSuspenders.

You can use SomaCore in anything, except to include/distribute it in another framework, application, template, component or structure that is meant to build, scaffold or generate source files.

Few things to know

  • SomaCore requires the stage to be instantiated.
  • SomaCore can be used as a registry framework, dependendy injection framework, or both in the same time.
  • Another Dependency Injection library can easily be used instead of the default one.
  • Commands are normal built-in Flash events with the bubbles property set to true.
  • Commands can be used in the views as they are not framework code.
  • Wires are the glue of the frameworks elements (models, commands, views, wires) and can be used the way you wish, as proxy/mediators or managers.
  • Wires can manage one class or multiple classes.
  • Mediators are automatically created and removed when a view is added or removed from a display list (with or without injection enabled).
  • Parallel and sequence commands are built-in.
  • You can create and register customs plugins to the framework (such as the SomaDebugger plugin).
  • You can access to all the framework elements that you have registered (stage, framework instance, wires, models, views, injector, reflector, mediators and commands) from commands, wires and mediators.

Links

Demos

SomaCore Hello World (injection enabled)

SomaCore Hello World

SomaColor (Injection enabled)

SomaColor

SomaCoreCafeTownSend (Injection enabled)

SomaCoreCafeTownSend

SomaCore Twitter Search (injection enabled)

SomaCore Twitter Search

SomaCoreGC (flash player debugger needed)