PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: xbstu2006 on January 13, 2009, 09:35:01



Title: Why don't use Dictionary but Array to keep indices in collections?
Post by: xbstu2006 on January 13, 2009, 09:35:01
Hello everybody, I'm a Chinese, my Englisgh was weak,so please take a excuse to me.

In many programming, we alaways need saving(loading) objects and keeping their indices in a collection by the key of String or any other types,
so in AS3, Adobe give us the flash.utils.Dictionary to do that specially.
It's optimized for this usage so It was faster than the Array.
In other said,Array is faster, but only in the situation when we saving Objects by the uint keys.

In pureMVC,I saw the collections like this usage are all written by Array.
( observerMap, commandMap, proxyMap, etc )
So I think would it be faster if we use Dictionary to instead Array ?

--------------------------------------------------
By the way, Mr Hall:
Thanks for your puremvc very much, it's a greate work !


Title: Re: Why don't use Dictionary but Array to keep indices in collections?
Post by: puremvc on January 14, 2009, 06:32:19
PureMVC is widely portable because of the original design decision not to depend on any Flex, Flash or AIR classes, only pure language elements, and then only common ones. Dictionary is a Flash class.

-=Cliff>