Micronews will be under the tag #FlashMVC on Twitter. Feel free to broadcast on the channel as well!
Jul 5 2009

FlashMVC 2.01 update released

Here are just a couple more enhancements to FlashMVC I was able to add over the weekend. These will not only automate a few things, but it makes room for additional addons in the future. There are two new features that have been added to SuperAction:

bindVars(… REST):void
This method looks at the SuperEvent fired from a completed action class, and copies properties to the SuperModel from the SuperEvent.

lastSuperEvent : SuperEvent
[read-only] Returns the last SuperEvent fired after completing an action. (This is useful for reading a property from a SuperEvent after the event has fired and you didn’t have a listner for it yet in your view)

Check out the documentation for more info:
http://www.flashmvc.com/documentation/

Share the good word:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis

Jun 13 2009

FlashMVC v2.00 Released!

I am very pleased to announce a major update to FlashMVC to version 2.0. This version is a complete rewrite of the original version with better attention to scalability and framework usage. Since this is a dramatic upgrade, I have changed the package name to com.jadbox.flashmvc2. This version scales much higher allowing actions to relay complex messages to the view and built-in code hinting system for the view to execute an action. This is done by a new class called SuperAction. Let me start with the basics:

  • action classes – these are normal classes (do not need to extent any classes) that perform an action
  • SuperEvent – this class acts like a model for a specific action class, as a constructor proxy for the action class. and as an event for once the action completes.
  • SuperModel – This class holds references to SuperActions which, in turn, hold references to SuperEvents and your action classes.
  • SuperAction – This class is a controller proxy between your view and the action that it needs to perform. It allows the user to dispatch a SuperEvent that gets used as a model/constructor for your action class.

Benefits from version 1.0:

  • The action has its own model/view (SuperEvent) to inform the view
    • The SuperModel has fewer global variables as actions have their own dedicated models
  • The model (SuperEvent) also mocks the constructor of the action class for code hinting
  • Much more readable code for applications made with the framework.
  • ActionHelper removed in place of SuperEvent
  • If an action doesn’t require a unique SuperModel, you can use the base class SuperEvent or make a SuperEvent that covers multiple action classes (less recommended).

Example running an action:

SuperWebsite.instance.loginAction.dispatchEvent(new LoginEvent("test@test.com));

Example reading an action:

SuperWebsite.instance.loginAction.addEventListener(SuperEvent.COMPLETE, onComplete);
function onComplete(event:SuperLogin) { if(event.isInvalidEmail) trace("email was invalid") };
Share the good word:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis