osmeditor2 to Java, and a common Java OSM client library (was:Re: [OSM-talk] Java and freedom)

Ben Gimpert ben at somethingmodern.com
Thu May 25 15:27:04 BST 2006


On Thu, 25 May 06 @02:24pm, Nick Whitelegg wrote:
> >Petter, do you see any problems in the short term converting the applet
> >into stand-alone static binary with GCJ? Making an optimised binary of
> >Josm for GNU/Linux, Windows and OSX with GCJ would be even better,
> >perhaps we can do that once we have Java 1.5 compatability.
> 
> This discussion has got me thinking about converting osmeditor2 to
> Java. I originally chose C++ as I had the following concerns about
> Java:

I've just cut what was going to be a long-winded, overly-defensive,
flame-bait critique of Java.  Instead I'll attempt my appeal with some
bullet points:

* The OSM server is mostly Ruby, so choosing Ruby as your editor
  implementation language will make possible code re-use, possibly
  simpler marshalling ("serialisation"), and exploit shared expertise.

* If you think a 4GL -- a "fourth generation language" like Ruby or
  Python -- is too slow, they'll probably be fast enough by the time
  you're finished developing.  And writing C code for the slower parts
  of a Ruby app is very easy.

* Ruby and Python's library support is actually not all that bad,
  and improving rapidly.  This includes decent GUI toolkits like FOX
  and wx.  Or use Mongrel / WEBrick with crazy AJAX-y webpages stored
  locally.

* Java's GUI library (Swing atop AWT) is notoriously over-architected.
  It forces the developer to use MVC, even when it is unnecessary, as
  well as being extremely un-performant.  (I feel for anyone else here
  who has suffered through writing a JTable with dynamic cell renderers
  that should still be responsive with over three rows...)

* Learning a pure OO language like Ruby will make you a better coder.
  Using a hodge-podge C++ rip-off like Java will not make you a better
  coder.

* Java is syntactically a mess, terrible to write and learn, hard to
  read, and very very very very very verbose.  I know this is
  controversial, but I have to say it.

* One of the big selling points of Java is that it *prevents* the
  programmer from doing "bad things."  For a volunteer project, do you
  really want to be shackled by your own language?

* Rails (atop Ruby) is the NHT -- Next Hip Thing (TM) -- so maybe Ruby
  is also a good line on your CV.

Okay that's enough.  Flame on, Sun koolaid-drinkers.  ;)

		Ben





More information about the talk mailing list