-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Iesi namespace, who likes it?
PostPosted: Wed Sep 20, 2006 12:36 pm 
Beginner
Beginner

Joined: Wed Jun 08, 2005 4:59 pm
Posts: 27
Since I first started with NHibernate, I felt apprehensive about the Iesi.Collections.dll. The source is an unknown quantity, at least not someone I've ever heard of and I always felt weird about it. This is not meant as any disrespect to Jason (the original author of the CodeProject article), but it wasnt until just yesterday that I realized who the source was (and, yes, I *now* also realize that the attribution is in the license text file). Before then, it was just a mystery to me and I avoided using Sets for just that reason.

In any case, what is the benefit of having the ISet interface live in a separate namespace and DLL? NHibernate has deep ties to it, the code has been extended and changed from the original. The license is sufficiently broad that there can be no question (that I could think of) about just moving the code into the NHibernate.Core namespace and retaining attribution in the comments. Why not just do it?

Is anyone else bothered by this?

-MT


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 12:43 pm 
Newbie

Joined: Fri Nov 10, 2006 1:57 pm
Posts: 11
My problem is that he did not provide any indexers on any of the sets. I dont know if this was by design or not but you can't use a for each on every collection becuase of adding and deleting objects from teh collection. So being a collection without an indexer kind of looks like it was developed with a VB 6.0 mentality... At least it doesn't appear to have been run through the ringer in .NET anyway...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 1:16 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Sets are unordered, so it isn't meaningful for them to have an indexer. How do you define mySet[i]? And how do you ensure that mySet[i] stays the same if you save an object and reload it later?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 12:55 am 
Senior
Senior

Joined: Sat Mar 25, 2006 9:16 am
Posts: 150
Thats where I get confused... if a Set is unordered then why does it have a Sort attribute on the xml tag to sort the items? Why is a bag, which is unordered, represented by a IList which is ordered? Why can't I have a sort tag on a bag?

I agree with mteper... the whole set thing is just bizarre. But I would go farther. I say, ditch the whole Iesi ISet thing and lets just use IList for everything. Just let the hbm tag - bag or list - determine if order is important or not.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 1:35 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Quote:
Thats where I get confused... if a Set is unordered then why does it have a Sort attribute on the xml tag to sort the items?

I'll turn it around - why don't ordered/sorted sets have an indexer? I'd say it's because they still only implement ISet (there is no IOrderedSet), and so they can't have one.

Quote:
Why is a bag, which is unordered, represented by a IList which is ordered?

Because there is no bag collection neither in Java nor in .NET, so a list has to be used.

Quote:
Why can't I have a sort tag on a bag?

I don't know, I guess there's no technical reason why not, so if you want it, request it.

Quote:
I agree with mteper... the whole set thing is just bizarre. But I would go farther. I say, ditch the whole Iesi ISet thing and lets just use IList for everything. Just let the hbm tag - bag or list - determine if order is important or not.

I don't see the point in removing ISet. Why all that destruction? :-) If you are missing some feature, why not just add it?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 1:45 am 
Beginner
Beginner

Joined: Wed Jun 08, 2005 4:59 pm
Posts: 27
I'm not sure where my message went, but *I* am not advocating destruction. I just want to see *Set / ISet rolled into an appropriate NHibernate namespace.

-MT


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 2:21 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I don't want to combine Iesi.Collections with NH, in fact I'd rather separate it into a project of its own.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.