|
Re: [OT] Case insensitive comparison not stable ?: msg#00145lang.smalltalk.squeak.seaside
Hi ! 2006/1/11, Ramon Leon <rleon@xxxxxxxxxxx>: > > But pay attention using subclassing instead of subtyping is > > not really a good style. > > I have problem to see why authorRepository is a Set, sure it > > can be implemented as a set... > > but it does not have the same interface than a set to my taste. > > > > Stef > > I agree, you might find that later you need it to be a TreeSet or a > BTree in order to use with an object database, and your clients are > bound to the interface of Set preventing you from changing the > superclass. So rather than using inheritance, use composition, have > your repository include a set as a member variable, to hide the > implementation, and simply delegate only those protocols a repository > needs to the internal collection, because you will need to change it > later. You are both right. This is a toy application at the moment, and I wanted to get off the ground faster. I have about 20 lines of code for models, so it shouldn't be too hard to rewrite using composition :) Thanks ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Seaside mailing list Seaside@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: [OT] Case insensitive comparison not stable ?: 00145, Ramon Leon |
|---|---|
| Next by Date: | Shore Components documentation anywhere ?: 00145, Francois Beausoleil |
| Previous by Thread: | RE: [OT] Case insensitive comparison not stable ?i: 00145, Ramon Leon |
| Next by Thread: | Shore Components documentation anywhere ?: 00145, Francois Beausoleil |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |