> Please review the FAQ for the reasons behind Pivot's collection
>> implementations.
>>
>> http://cwiki.apache.org/PIVOT/frequently-asked-questions-faq.html
>>
>
> Yes, I've read them. None of them justify doing this to yourselves or your
> users.  There are much better ways to accomplish your goals.


I re-read the FAQ just now, and I think I have more to add that might make
you look at the pivot collections in a new light.

A windowing toolkit such as ours is designed using the MVC paradigm, and
there's a need fora set of classes to act as the model.  In Swing's case,
they created BoundedRangeModel, ButtonModel, ComboBoxModel, ListModel,
ListSelectionModel, MutableComboBoxModel, SingleSelectionModel,
SpinnerModel, ToggleButtonModel, etc.  What we did was to create a small set
of unified classes that can not only serve as the model for all our
components, but also act as generic interfaces for indexed or keyed data.
The ubiquitous use of these classes is part of what makes Pivot not only
efficient, but very easy to use once you grok the design.

Now, once you've created these classes, do you put them in
org.apache.pivot.wtk?  No.  They're also of use outside the windowing
toolkit.  Call them collection classes, data classes, model classes,
whatever, but there was a need for which they were created, they satisfy
that need very elegantly, and at the end of the day, they're of general use
just as lego blocks are, so they live in the core module.

-T

Reply via email to