Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  PureMVC Manifold / Standard Version / Thread safety? on: August 01, 2008, 05:13:14
Shouldn't the maps (commandMap, proxyMap, mediatorMap, observerMap!!! ) be threadsafe?
So wouldn't it be better to use java.util.concurrent.ConcurrentHashMap instead of java.util.Hashtable?
2  Announcements and General Discussion / General Discussion / AS3: Why are all maps used by PureMVC Arrays (commandMap, proxyMap etc.) ? on: May 28, 2008, 05:50:15
Can anyone explain to me why commandMap (in Command.as), proxyMap (in Model.as) and mediatorMap & observerMap (in View.as) are all Arrays, even if their variable names accurately describe them as Maps?
e.g. commandMap = new Array();

Arrays in ActionScript are numerical and not associative.

And the ActionScript reference states:
Do not use the Array class to create associative arrays (also called hashes), which are data structures that contain named elements instead of numbered elements. To create associative arrays, use the Object class. Although ActionScript permits you to create associative arrays using the Array class, you cannot use any of the Array class methods or properties with associative arrays.

Therefore i would propose to change them into Objects.
This is not a performance or functionality issue, but as everything in PureMVC builds upon logic, this seems very logical to me.
Using Arrays will add functionality to the Maps, that is never used.
Pages: [1]