You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Jochen Wiedmann <jo...@ispsoft.de> on 2004/01/03 13:15:04 UTC

JavaSource: Default for forcingFullyQualifiedNames

Hi, Ias,

I would like to change the default value for forcingFullyQualifiedNames to 
"false", for two reasons:

- It breaks the test suite in the js.junit package.
- It is not upwards compatible; my opinion is that new features should
   always attempt to beware upwards compatibility by default.

IMO the feature is usefull in rare situations only; of course you seem to
have stumbled across such a situation. I would suggest the following:

* Make forcingFullyQualifiedNames the default in automatically generated
   code.
* Add a configurable option that allows to turn the feature off. (IMO a
   good place would be the JAXB "globalOptions" or "schemaOptions".)

Is that fine for you?


Regards,

Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JavaSource: Default for forcingFullyQualifiedNames

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Ias wrote:

> What do you mean by upwards compatibility? Backward compatibility or forward
> compatibility? If it indicates backward one, do you mean that users of JaxMe
> have expected forcingFullyQualifiedNames as false, so
> forcingFullyQualifiedNames should be false for backward compatibility? 

Not so much users of JaxMe, but users of JaxMeJS (including myself), which 
is available as a separate component.


> 1. Set forcingFullyQualifiedNames to false in JavaSource.java
> 2. Overriding forcingFullyQualifiedNames to true in some place of JAXB start
> point.
> 3. (Optional) Exposing how to control the value to users.

I'll do that.


Thanks,

Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


RE: JavaSource: Default for forcingFullyQualifiedNames

Posted by Ias <ia...@tmax.co.kr>.
> Hi, Ias,
> 
> I would like to change the default value for 
> forcingFullyQualifiedNames to "false", for two reasons:
> 
> - It breaks the test suite in the js.junit package.
I tested cases in js.junit and learned that only BasicTest fails. Regarding
the case, I think it can be updated to follow forcingFullyQualifiedNames'
true value up.

> - It is not upwards compatible; my opinion is that new features should
>    always attempt to beware upwards compatibility by default.
What do you mean by upwards compatibility? Backward compatibility or forward
compatibility? If it indicates backward one, do you mean that users of JaxMe
have expected forcingFullyQualifiedNames as false, so
forcingFullyQualifiedNames should be false for backward compatibility? 

> 
> IMO the feature is usefull in rare situations only; of course 
> you seem to have stumbled across such a situation. I would 
> suggest the following:
> 
> * Make forcingFullyQualifiedNames the default in 
> automatically generated
>    code.
> * Add a configurable option that allows to turn the feature 
> off. (IMO a
>    good place would be the JAXB "globalOptions" or "schemaOptions".)
> 
> Is that fine for you?
> 
Making forcingFullyQualifiedNames' default false and offering some option
for adjusting it makes sense. On the other hand, it would be a good
opportunity to think about why Sun's JAXB RI carries out "fully qualified
naming" policy when we approach this issue. As you pointed out, JAX-RPC
mapping file schema is just one case. However, J2EE 1.4 schemas declare
quite a lot of elements and types containing potentials that their javified
(this term originates from Axis) names are overlapped with names of classes
in J2SE and J2EE APIs. The more schemas are invented, the more possibilities
come up. There's one obvious reason to go for fully qualifying: if you use
fully qualified class names, you won't meet such problems. Otherwise, in
other words, forcingFullyQualifiedNames as false, can lead you to a
confliction. Maybe  RI's maker don't want its users to be confused, and I
understand that. 

My opinion is, forcingFullyQualifiedNames's default value should be true
when you use JaxMe in terms of JAXB. Here's what I'd like to recommend:

1. Set forcingFullyQualifiedNames to false in JavaSource.java
2. Overriding forcingFullyQualifiedNames to true in some place of JAXB start
point.
3. (Optional) Exposing how to control the value to users.

# 3 seems unnecessary because users usually want to avoid troubles and
there's no big merit from generated Java codes with unqualifed notations.

Happy New Year!

Ias


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org