[Freeipa-devel] [PATCH] 158 JavaScript ordered map.

Endi Sukma Dewata edewata at redhat.com
Thu May 19 19:18:45 UTC 2011


On 5/19/2011 11:28 AM, Adam Young wrote:
> On 05/18/2011 10:21 AM, Endi Sukma Dewata wrote:
>> A utility class has been added to store objects which can be accessed
>> both as an ordered list and as a map. This class is used to store
>> various objects including entities, fields, columns, and dialogs. The
>> class needs to be defined in a new file called util.js to avoid
>> circular dependency problem. A test suite for this class has been
>> added as well.
>>
>> Ticket #1232

> Good. The only thing I don't like about it is the Util namespace. I
> think this should be a JQuery plugin instead. Adding a Util namespace is
> just ignoring the problem of namespace pollution.
>
> Can you move it to JQuery, and rename the file and class ordered_map?
>
> Put some documentation in the file as to the contract: we explicitly
> don't hide access to the internals, but if you don't use the manipulator
> functions, you will corrupt the map etc.
>
> This is where Javascript would really benefit from a macro language.

Attached is a new patch that includes the above changes.

-- 
Endi S. Dewata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-edewata-0158-2-jQuery-ordered-map.patch
Type: text/x-patch
Size: 54291 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110519/b520e9ae/attachment.bin>


More information about the Freeipa-devel mailing list