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

Adam Young ayoung at redhat.com
Thu May 19 16:28:48 UTC 2011


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
>
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110519/c2bca4f6/attachment.htm>


More information about the Freeipa-devel mailing list