mvcExpress is the simplest MVC architecture framework there is!
while working with mvcExpress you need to know 10 things only!
extend to create core framework class that starts it all. Represents singlemodule unit of your application
extend for executable command for your business logic.
extend to provide your data objects with direct access API.
extend to create indirect communication for your view objects to rest of application.
map your proxies for injection.
3 functions for communication:
send messages from ModuleCores, Commands, Proxies and Mediators.
message can trigger mapped command or handler function in Mediators.
add message handler function in Mediators.
remove message handler function in Mediators.
Hard to misuse:
while working with mvcExpress you will have what you need where you need it. No more no less.
If something is not available in your class – it means it is restricted by MVC pattern or bad practice.
Want it or not – you will be creating reusable modules by extending ModuleCore.as class.
To start benefit from modular programming concepts you just need to place couple of modules in convenient folder structure, and send some messages around from one module to another. (no special classes of functions needed.)
Supports dependency injection:
mvcExpress supports class injection with meta-tag [Inject] similar how RobotLegs does. This is not only useful for Test driven development, but also makes getting your proxy objects in mediators and view object an easy task!
Helps avoid errors:
mvcExpress uses conditional compilation very extensively!
Add “-define+=CONFIG::DEBUG,true” to your debug compile options and you will benefit from better error checking and warnings if you forget something important. Leave it out from release compilation and you will enjoy framework speed! If you use FlashDevelop you don’t need to do anything because this is already set-up for you by default!
If you decide to store your message types in dedicated classes as string constants – mvcExpress have a nice utility for you to help you avoid duplicated strings: