Opened 11 years ago

Closed 6 years ago

#6832 closed enhancement (wontfix)

[patch][cla] dojox.collections.Set Contribution/Implementation

Reported by: guest Owned by: Tom Trenka
Priority: low Milestone: future
Component: Dojox Version: 1.0
Keywords: reviewed Cc: ole.ersoy@…
Blocked By: Blocking:

Description

Hi,

Initially I thought dojox.collections.Set was an implementation similar to:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashSet.html

But it seems it's that it's a set of utility methods for creating unions, etc.

I created an implementation + tests of what I think will satisfy most use cases. It delegates to dojox.collections.Dictionary for most of the grunt work.

If you decide to keep it, just to replace dojo4jsf with dojox...or whatever module it will go in.

Cheers,

  • Ole

Attachments (3)

Set.js (955 bytes) - added by guest 11 years ago.
SetTest.html (3.9 KB) - added by guest 11 years ago.
SetTest.2.html (3.9 KB) - added by guest 11 years ago.

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by guest

Attachment: Set.js added

Changed 11 years ago by guest

Attachment: SetTest.html added

Changed 11 years ago by guest

Attachment: SetTest.2.html added

comment:1 Changed 11 years ago by guest

Ooops - Clicked attach twice - The SetTest?.2.html can be deleted.

comment:2 Changed 11 years ago by Adam Peller

Owner: changed from Adam Peller to Tom Trenka

comment:3 Changed 11 years ago by Tom Trenka

Ole--

Have you submitted a CLA agreement?

http://dojotoolkit.org/cla

I can't look at your code without that assurance (unfortunately, yay SCO)...

For other explanations...collections.Set is modeled on pure set operations and not on any specific implementations (just so you know the lineage).

comment:4 Changed 11 years ago by guest

Tom,

Yes - I did submit a CLA way back to Dylan, and also received a request from (I think) dojo legal about it recently, so I'm surprised my name is not in there by now. I assume it's not self service :-). I think Peter Higgins has verified my CLA as well, since he owns a lot of my tickets. I did offer Dojo legal to send in another, but never heard from them. If you have issues locating, please let me know, and I'll send in another.

For other explanations...collections.Set is modeled on pure set operations and not on any specific implementations (just so you know the lineage).

Cool - It's a really nice utility. I think it would be great to be able to inherit those on the contributed implementation, but I just left it as a minimal / baseline implementation. I'll be glad to do more work on it though, if we think it's a good idea. Incidentally I did not attempt to model it after the java implementation either. I just added what I though developer would use 80% of the time.

comment:5 Changed 11 years ago by Tom Trenka

Ole--

Looked at the code...you didn't test it in IE =) (Trailing comma issue). So...I'm not really seeing the point of this; all you've done is to wrap the Dictionary, and on top of that none of the basic iteration methods are there. What does this really provide that the Dictionary doesn't?

regards, Tom

comment:6 Changed 11 years ago by guest

Tom,

Yeah - Sorry - I need to setup WINE one of these days so I can get IE running. Thanks for the heads up on the comma issue though. It's usually good to be able to run in IE :-).

The only purpose of it is to communicate to others reading code that the object is a Set implementation, and has the semantics of a Set implementation. A Dictionary has the semantics, but the API is different. As I'm sure you know, users of a Set implementation (Java) only want to add a single value, and what the implementation to ensure that it's unique.

So for example when Java developers want something similar to dojox.collections.Dictionary, they use java.util.HashMap?.

When they need a Set implementenation they use a java.util.HashSet?.

So Java developers could use java.util.HashMap?, instead of java.util.HashSet?, but then the meaning of the object more ambiguous for other developers reading through someone else's code. They have to spend additional time deducing that the developer is using java.util.HashMap? as a java.util.HashSet?...

Make sense?

BTW - I talked to cla@… and we're working on getting the CLA stuff resolved. Should be clear up by end of day tomorrow.

Ole

comment:7 Changed 11 years ago by Tom Trenka

Milestone: future

comment:8 Changed 7 years ago by ben hockey

Priority: highlow

comment:9 Changed 7 years ago by Tom Trenka

Keywords: reviewed added

comment:10 Changed 6 years ago by dylan

Summary: dojox.collections.Set Contribution/Implementation[patch][cla] dojox.collections.Set Contribution/Implementation

Obviously would need an update for AMD, but it's pretty simple.

Do we want to make any updates to dojox/collections for 1.9, or is this abandoned/unused at this time?

comment:11 Changed 6 years ago by Tom Trenka

Resolution: wontfix
Status: newclosed

Given the age of these tickets and the small nature of them, I'm marking all as won't fix. #1395 was somewhat addressed with the implementation of SHA2 in DTK 1.8.

Note: See TracTickets for help on using tickets.