On Monday 18 October 2004 18:29, Andrew Evers wrote: > The use of these types comes from our desire (and our users desire) > to work with Java 1.1, often in Applets in a web browser. This > unfortunately means that the more abstract collections framework > introduced in 1.2 is not available.
IMHO it would be a good idea to make the next version support the collections API (maybe common-collections as well?) and let JDK 1.1 users (AFAIK, MS-IE users who don't wont to install sun's jdk?) use the current 1.2 version. BTW - when will 1.2 stop being a "beta" ? > While Collection has a toArray() method, Vector (or maybe List) are > better interfaces, since some collections (eg. Map, Set) don't have > any consideration for order. An array has a definite order. Map is not a collection (in the sense that it inherits java.util.Collection). For the "struct" type supporting it is enough If order is important, and I think that the XML-RPC "array" type is meant to be ordered, then you should use List and not Collection. Vector is not a better interface then List - mostly because its not really an interface but an implementation. IMO, the writeObject() method should still accept Collection as a valid "array" type with the caveat (and warning clearly displayed in the java api doc) that unless the collection enforces ordering, in the XML-RPC call the order will not be preserved or well defined. > We've not > (to my knowledge) had any issues reported to do with synchronized > access to a Vector. There shouldn't be any problem with the synchronization of Vector - aside that its completly unrequired when in a single thread context and just slows you down - whenever you are using Vector and don't need its synchronization features you'd be better off with an ArrayList which offers the exact same implementation w/o the overhead of synchronization. Also Vector might have other performance issues: under some usage parameters LinkedList will perform several order of magnitude better then Vector. Due to the limitation of using only Vector for XML-RPC "array" type, we have one piece of code which actually converts a LinkedList is uses to gather data into a Vector before submitting to XML-RPC. > There is a general sentiment that supporting the Collections API in > the next version would be a good idea. However, the library is > relatively mature, we do want to keep the current API I don't see how the API will change when expanding the ammount of type supported - this clearly has no compile time issues and the run-time behavior will be much better. -- Oded Arbel m-Wise mobile solutions [EMAIL PROTECTED] +972-9-9611212 (204) +972-54-7340014 ::.. Love is the triumph of imagination over intelligence. -- Henry Louis Mencken