[josm-dev] New GPX implementation
Brett Henderson
brett at bretth.com
Wed May 6 02:50:06 BST 2009
Frederik Ramm wrote:
> We don't normally develop stuff "for future use" because in 90% of cases
> it gets never used and just bloats the code.
>
> I'm not into GPX a lot; I load traces into JOSM and that's it. So if
> those who use GPX more than I do all say "hooray, we've been waiting for
> these changes, finally we can read our GPX 1.0 files and save them as
> GPX 1.1" or whatever, then fine.
>
> But at least to *me* it sounds as if the concrete issues - namely the
> ordering of elements and the type problem - could have been fixed in a
> few lines of code, and you instead decided to overthrow the whole GPX
> stuff, introducing a host of potential problems and incompatibilities
> with plugins for little apparent gain.
>
> I'm not convinced that the positive sides outweigh the negative
> consequences but I'm willing to let others decide. Maybe I am really
> underestimating the advantages of JAXB, whatever that is.
>
I know it's none of my concern, but if introducing yet another
dependency is a factor then JAXB does have a fair bit going for it. It
is the official standard for java to xml binding, very well supported,
and not going away any time soon. It's the foundation on which many
other standards are based such as JAX-WS (java's web service standard).
You should be able to eliminate most manual xml
serialisation/deserialisation code by using it. In terms of programming
it seems well thought out and isn't onerous to use. There are lots of
other competing libraries/frameworks/standards that have their
advantages and disadvantages (eg. JIBX for pure speed) but JAXB should
be the default choice unless there's a good reason to choose otherwise.
If you get to more fully support a standard such as GPX without too much
effort then it sounds like a win.
http://en.wikipedia.org/wiki/JAXB
But supporting java 1.5 is a pain and using the latest cool library
isn't always good for the project as a whole so I'll get back on the
fence :-)
More information about the josm-dev
mailing list