Java server programming

by havoc

I think Chris is
right about this
, Java’s convenience has been hampered by the license. JPackage helps
on some level but I’m not convinced putting Java into the UNIX
binary packaging mold is exactly what you want, and JPackage can’t
redistribute all the Java core runtimes that people use. As gcj/Classpath
matures it will help obviously. There’s also the whole Maven thing, in C programmer terms
you could think of this as “kind of like automake, but automatically
downloads dependencies.” Anyway, the de facto reality in the Java
world is that you just bundle all dependencies with your
app. Equivalent of static linking.

On the plus side though, the amount of open source code written
in Java is huge, largely server-side stuff. It tends to be much
more sane and reusable than your average C/C++ library, because the
“GLib” equivalent layer (collections, threads, IO, etc.) is a given
and thus libraries can interoperate with each other and with
applications. Another factor I’d say is that writing robust Java code
is a lot easier than writing robust C code and more people are able to
write acceptable libraries.

Open source is kind of “winning” in the Java world; from what I can
tell, the new EJB3
spec more or less has nothing to do with previous versions of EJB. The
persistence part looks like a rebranding of the open source Hibernate
project, using Java 5 annotations to dump Hibernate’s XML
configuration. Here’s a tutorial on
it
, and it’s pretty cool. I have no idea about the Java community
or what happened, but it certainly seems like a coup for open source.

The resulting situation is very strange, where everything below the
JDK is open source (Linux, etc.) and everything above it is also open
source (huge stack of Java code out there). Even the IDEs are open
source. All this open source stuff effectively defines the real,
complete platform that people use in practice. But it’s very difficult
to ship that platform working “out of the box” because there’s
this closed JDK in the middle. Classpath will save us…

The oddest thing about Java has to be their obsession with calling
everything a “bean.” As Colin points out, because they started calling
every object a “bean,” they had to rename objects to the special term
“POJO” (plain old java object). As far as I can tell, in the modern
Java world you can pretty much do s/bean/object/ on the docs with
no loss of information.

(This post was originally found at http://log.ometer.com/2005-10.html#21)

My Twitter account is @havocp.
Interested in becoming a better software developer? Sign up for my email list and I'll let you know when I write something new.
Name
Email *