[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: AW: AW: [sdo] SDO 3 API Cleanup - first step
Hi Ron, > The generic forms of the getters are not simply convenience methods, > they represent significant functionality: data type conversion, namely. That's true, but my thought is that the same functionality is available from DataHelper.convert(), so having the methods on DataObject is just a convenience. > By a "toString" method, I meant anything where you want to iterate > over the (instance) properties of an object. This is not something > you can do with get(String,...) methods. I think the get(Property, ...) method would be suitable for this. That's how I've always seen it done. Using the "int" methods would be a less obvious way to do it, and depending on the implementation, it may not necessarily be more efficient. If it is more efficient, an implementation would still be free to have an internal method that uses the property index (which it could use in its implementation of DataObject.toString(), for example) but what I'm questioning is do we really need the extra clutter in the client API? I wouldn't put my foot down on either of these issues, but I really think the future success of SDO will be enhanced, the more we simplify. Thank, Frank. "Barack, Ron" <ron.barack@sap.com> wrote on 03/18/2008 10:54:25 AM: > Hi Frank, > > The generic forms of the getters are not simply convenience methods, > they represent significant functionality: data type conversion, namely. > > By a "toString" method, I meant anything where you want to iterate > over the (instance) properties of an object. This is not something > you can do with get(String,...) methods. > > Ron > > > -----Ursprüngliche Nachricht----- > Von: Frank Budinsky [mailto:frankb@ca.ibm.com] > Gesendet: Dienstag, 18. März 2008 15:04 > An: sdo@lists.oasis-open.org > Betreff: Re: AW: [sdo] SDO 3 API Cleanup - first step > > Hi Ron, > > I'd like to make the core DataObject interface as simple as possible to > start with (that's the interface I sent out), and have a discussion about > whether any of the rest of the methods are really needed. I'd be happy to > add them back, before this exercise is complete, but I think it's > important to go through the exercise and really convince ourselves that we > need a lot of the methods that I believe are very rarely used. > > I see SDO3 as an opportunity similar to what happened with EJB3 - > simplify! I think the answer to backward compatibility is to make sure the > 2.1 and 3.0 interfaces don't conflict, as I mention in the doc file I sent > in my previous email. > > > Can you provide some clarifications why the index accessors are removed? > > Is this something that you feel is not used in SDO 2.1? > > Other than samples, I've never seen anyone use them. > > > I notice that get(Property) is there, but there is no T > get(Property,Class<T>). > Is this intentional? > > My logic is that they are simply convenience methods (with a significant > performance implication). The property methods are really there for > performance reasons (otherwise, why not always use the string methods?), > so they seem like a contradiction. I'm very open to be convinced > otherwise. > > Can you explain what you mean by using the index methods to "implement > some kind of toString method"? > > Thanks, > Frank > > > > > "Barack, Ron" <ron.barack@sap.com> > 03/17/2008 07:52 PM > > To > Frank Budinsky/Toronto/IBM@IBMCA, <sdo@lists.oasis-open.org> > cc > > Subject > AW: [sdo] SDO 3 API Cleanup - first step > > > > > > > Hi Frank, > > Can you provide some clarifications why the index accessors are removed? > Is this something that you feel is not used in SDO 2.1? > > I notice that get(Property) is there, but there is no <T> T > get(Property,Class<T>). Is this intentional? When you are putting in > generics, it's bad form to force people to cast. > > Since we don't yet have a solution for namespaces in XPaths, I'm not so > comfortable with removing the Property based interface, and I think the > index based interface is useful too, for instance, when implementing some > kind of toString() method. > > Ron > > > ________________________________ > > Von: Frank Budinsky [mailto:frankb@ca.ibm.com] > Gesendet: Mo 17.03.2008 21:28 > An: sdo@lists.oasis-open.org > Betreff: [sdo] SDO 3 API Cleanup - first step > > > > Hi guys, > > I've taken a pass at defining a new SDO 3 version of DataObject. You may > hardly recognize it :-) It's gone down from 119 to 24 methods (one of > which is new). The main changes are: > > 1) move from package commonj.sdo to org.oasis.sdo > 2) use Java 5 generics > 3) deprecate/remove int-based accessors and a couple of other methods > 4) rename some methods to avoid name collisions with SDO 2.1 and static > SDOs > > I've attached the new proposed interface, and a short doc file that > includes a table that shows all the changes being proposed. > > If possible, I would like to spend 20 min or so of tomorrow's call talking > about this. > > Thanks, > Frank > > > > > > > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. You may a link to this group and all your TCs in OASIS > at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php > > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. You may a link to this group and all your TCs in OASIS > at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]