First off, I'll clarify the xOffset property name problem.  For those that already 
know what it is, you can skip this section.

A property or attribute in the form of first letter lower case and second letter 
capitalized will not map to a javabean method.  This is because the expected method 
name with both letters capitalized is supposed to map to a property with the same name 
of the method, i.e.  getXOffset() will map to the XOffset property and there is no 
method name that will map to the xOffSet property.


Craig wrote:
> > >
> > > No, it's not.  Welcome to the wonderful world of the
> > > JavaBeans rules on
> > > converting property names to getter and setter method names.

To me it seems that this is more appropriately phrased welcome to the world of 
converting getter and setter method names to property names, because that's what you 
have to do to make sure property names are valid.  This is fine if that's the way Sun 
wants it, but I don't agree with limiting the set of property names if it can be 
accomplished without doing so.  Perhaps the spec should just say use an underscore 
notation like get_propertyName and leave the property name the same.  

This will be particularly problematic if the javabean author can not change the 
property names set.  For instance, let's say that I'm receiving an XML document from a 
bank that has lot's of other systems that also need this XML document.  Changing the 
XML doc to work with the Javabeans technology is cost prohibitive so the solution is 
don't use Javabeans.  Not exactly what Sun had in mind when they created it.

> > >
> > > The details of the naming patterns are in the JavaBeans 
> Specification,
> > > which you can get from:
> > >
> > >   http://java.sun.com/products/javabeans/

I want to say, who gives a crap about what naming conventions programmers are most 
comfortable with? Designs are not about creating easy to read code although they often 
have that effect, they are about creating something that works.  This spec doesn't 
work IMHO.

> > >
> > > Craig
> > >

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to