I am currently looking at the puremvc sourcecode and maybe I have some improvements.
For example:
org.puremvc.as3.multicore.core.View.as
Why you are using Array instead of Dictonary?
// Mapping of Mediator names to Mediator instances
protected var mediatorMap : Array;
// Mapping of Notification names to Observer lists
protected var observerMap : Array;
// Singleton instance
protected static var instanceMap : Array = new Array();
change to:
// Mapping of Mediator names to Mediator instances
protected var mediatorMap : Dictionary;
// Mapping of Notification names to Observer lists
protected var observerMap : Dictionary;
// Singleton instance
protected static var instanceMap : Dictionary = new Dictionary();
And I changed:
var observers_ref:Array = observerMap[ notification.getName() ] as Array;
// Copy observers from reference array to working array,
// since the reference array may change during the notification loop
var observers:Array = new Array();
to:
var observers_ref:Vector.<IObserver> = observerMap[ notification.getName() ] as Vector.<IObserver>;
// Copy observers from reference array to working array,
// since the reference array may change during the notification loop
var observers:Vector.<IObserver> = new Vector.<IObserver>();
On other places it is the same.
Are there any downsides or good reasons not using these changes mentioned above?
Best regards and thanks for this great framework,
Sebastian