I forgot. Why do we hate* Java?

Hi,

I’ve started reading some Java books. Gasp! What makes website
development with Java so bad? I haven’t looked at Struts but I’m
reading about Hibernate. Compared to ActiveRecord, Hibernate seems
like some extra typing to explicitly define the model fields, getters
and setters. I know that these are things that you can do in
ActiveRecord when things get complicated but generally it is not
necessary. More agility since the DDL and ORM don’t duplicate. It that
the main reason we hate* Java? What are all these XML situps I’ve read
about? Is that a Struts issue?

Thanks,
Peter

*I realize we don’t hate Java.

i don’t hate java because i never learned it enough to use.

that’s why i liked php for so long – you could step into it with no
knowledge and start using it for the web, improving as you go.

whenever i looked at java, i felt like i needed to know ALL of it before
i could begin to use it.

Hating Java is an individual attitude.
I do not hate it at all and I think it will be around for some time.

But: I consider Ruby (and btw. also Perl and Python) as superior to
Java as languages.
They are more expressive, more flexible and more dynamic. You have to
write a lot in
Java to cover Java’s complexity, but you should write to advance your
application.

Still, this does no way nullify the usefulness of Java for a long time
to come:

  • There are a lot of legacy apps in Java. So they are extended in Java,
    apps
    around them are done in Java and apps done by the same team of
    Java-guys are
    also done in Java. For quite a time to come. (just put Cobol for
    Java and you get my point).
  • Java has quite a decent performance in some cases. Java-guys claim it
    to be
    as good as C++, but I have my doubts about that. Anyway, well done
    Java-apps
    can still outperform Ruby-apps. Be very careful with this one
    though. The
    danger is that you drown in the inherent Java-complexity and don’t
    get a handle
    for optimizing performance, where in the case of a Ruby app you have
    much
    more time to provide quality, because development itself is much more
    productive.
    If performance is such an issue, I would consider writing critical
    parts of the
    application in C and combine this with Ruby. There might be a chance
    to beat
    the 100%-pure Java-app in terms of both development time and
    performance. But
    this has to be proven by experience.
  • Java has very good libraries. Ruby does not have this now, but off
    course,
    rubyforge.org is growing rapidly.
  • Java has a lot of “infrastructure”, frameworks etc.
  • Java is known by many guys, training for Java is relatively cheap and
    easily
    available.
  • Java-stuff is well documented. For some Ruby-issues it is still hard
    to get
    books or even online-documentation.
  • Nobody has ever been fired for swimming with the well established main
    stream.

As time goes on, some of these will fade away, but Java will retain at
least
some kind of Cobol-like importance in the long run.

Best regards

Karl

Peter M. wrote:

This is what is making me think Java could be faster for some
application development. Ruby may be a nicer language to program in
but you have to develop libraries along the way.

This can happen. If you have a library that is already 80% of your app,
using java with that library becomes efficient.

I attended some Hibernate, Spring, and EJB3 presentations the other day
and had to hit the caffeine to keep from nodding off - slide after slide
of XML configurations. Compared to Ruby and Rails, Java just seems so
tedious and so much more work. .Net too.

Joe

Karl Thanks for the reply. I’ve been thinking some of these things too.

On 2/18/06, Karl B. wrote:

  • Java has very good libraries. Ruby does not have this now, but off course,
    rubyforge.org is growing rapidly.

This is what is making me think Java could be faster for some
application development. Ruby may be a nicer language to program in
but you have to develop libraries along the way.

  • Peter

Peter M. wrote:

This is what is making me think Java could be faster for some
application development. Ruby may be a nicer language to program in
but you have to develop libraries along the way.

One language is better for some situations… news at 11:-)

The reason I prefer Ruby, Tcl, Python, Perl et al. is that they “scale
down”:

http://dedasys.com/articles/scalable_systems.html

And Rails happens to hit a sweet spot - it scales down quite well,
without being ‘disorganized’ or messy. At least that’s been my
experience so far.


David N. Welton

Linux, Open Source Consulting

“*I realize we don’t hate Java.”

Au contraire!
1.) wrist unfriendly
2.) wrist unfriendly

some of my little petty side annoyances though are constantly
recompiling and an IDE bigger than X-Window and slower than a slug.
in general though, java gives you a language then you add on spring,
hibernate, maybe some JCA or JBI or some other componentization system
and yada yada yada. its a big fractured mess of standards.

rails is nice because its just rails. all on top of ruby, which is
wrist friendly.

“As time goes on, some of these will fade away, but Java will retain at
least
some kind of Cobol-like importance in the long run.”

Someone’s been rocking the ITConversations. =]

Java is pretty much at an evolutionary dead end. Its in many ways the
culmination of C++; wrapped with garbage collection, sandboxing &
metadata. But where Java can go now, what new and innovative could be
derived from java? Not much,Java has basically grown to be all it can
be.

There’s nothing wrong with the mainstream. Sometimes its just more
interesting on the edge though. Eventually, those rebels who are just
never happy with the status quo will eventually see pop eat itself,
sure enough as Cobol eventually was replaced with Java. One
culmination replaced with another.

On 2/18/06, Peter M. [email protected] wrote:
Compared to ActiveRecord, Hibernate seems

like some extra typing to explicitly define the model fields, getters
and setters. I know that these are things that you can do in
ActiveRecord when things get complicated but generally it is not
necessary

From my experience, Hibernate/etc does do all the things AR does, but
AR does it by default. It takes time to match up every layer, decode
error messages from typos and then test your results…you are
constantly jumping from one layer to another everytime you make a
change to enforce the mapping.

With anything, you will learn faster if you can run simple tests, put
scaffolding together, and just play! As someone else mentioned, I felt
like you had to know it all to be able to do anything in Java.

Not to mention you have a different language for the View, JSTL
whereas erb is Ruby.

  • Nic

  • Nic

Karl B. wrote:

Joe wrote:

I attended some Hibernate, Spring, and EJB3 presentations the other day
and had to hit the caffeine to keep from nodding off - slide after slide
of XML configurations. Compared to Ruby and Rails, Java just seems so
tedious and so much more work. .Net too.

That’s exactly the point.

But don’t forget: There are a lot of guys that have gone far to learn
all
of this stuff. A huge investment. So they will find a lot of good
reasons
to remain on the Java-side, just in order to justify this investment.
(c#/dotnet too, off course)

Yeah, but Java’s come a long way and I think it’s continuing to improve.
Technologies like Hibernate, Struts, Spring, et al ease a lot of the
pain, but I think it’ll be many years, if ever, before it approaches the
succinctness and ease of Ruby and Rails.

Another reason (mentioned several times at the presentations) for
staying with Java/.Net is the professional support, which companies like
JBoss offer.

Joe

Another reason (mentioned several times at the presentations) for
staying with Java/.Net is the professional support, which companies like
JBoss offer.

Agreed. I’m looking forward a company like Zend or JBoss to offer
commercial
support for Rails application. This definitely would push the enterprise
adoption of Rails.

Joe wrote:

I attended some Hibernate, Spring, and EJB3 presentations the other day
and had to hit the caffeine to keep from nodding off - slide after slide
of XML configurations. Compared to Ruby and Rails, Java just seems so
tedious and so much more work. .Net too.

That’s exactly the point.

But don’t forget: There are a lot of guys that have gone far to learn
all
of this stuff. A huge investment. So they will find a lot of good
reasons
to remain on the Java-side, just in order to justify this investment.
(c#/dotnet too, off course)

On 2/18/06, Matthew F. [email protected] wrote:

Java is pretty much at an evolutionary dead end. Its in many ways the
culmination of C++; wrapped with garbage collection, sandboxing &
metadata. But where Java can go now, what new and innovative could be
derived from java? Not much,Java has basically grown to be all it can
be.

That sounds like a little bit of a lack of imagination. The language
(java)
just got enums, annotations (attributes), generics, iterators, etc.

C# is getting implicitly typed variables, lambda expressions, query
expressions, expression trees.

To me it seems like they are really trying to bridge the productivity
gap
(or… expressional gap) between static and dynamic languages.

Rob

Bruce Tate in his very interesting (and highly controversial) O’Reilly
book
Beyond Java makes the case for alternatives. It’s a quick and easy
read,
not to mention a good history of how we got here. Frankly, his book is
how
I first heard about RoR.

The biggest problem I have with Java these days is that it’s so large I
never feel like I know enough to do a decent job. There’s Java itself,
of
course, then Ant, JUnit, all the J2EE specs (EJB, JMS, JSTL, JNDI, JDBC,
…), app server deployment and administration, frameworks (Hibernate,
Struts – now Shale, JSF, Spring, Tapestry)… The list just goes on
and
on. I’ve spent years in it and still use it all the time, but RoR is so
much simpler for simple problems that it makes development fun again. :slight_smile:
It’s also a “full stack” solution – everything I need is there.

That’s the basics, anyway. See the book for lots more.

Ken


Kenneth A. Kousen, Ph.D.
President
Kousen IT, Inc.
http://www.kousenit.com
[email protected]

Ken K. wrote:

The biggest problem I have with Java these days is that it’s so large I
never feel like I know enough to do a decent job. There’s Java itself, of
course, then Ant, JUnit, all the J2EE specs (EJB, JMS, JSTL, JNDI, JDBC,
…), app server deployment and administration, frameworks (Hibernate,
Struts – now Shale, JSF, Spring, Tapestry)… The list just goes on and
on. I’ve spent years in it and still use it all the time, but RoR is so
much simpler for simple problems that it makes development fun again. :slight_smile:
It’s also a “full stack” solution – everything I need is there.

I recently switched from Java to Rails. I find Java is fantastic for
desktop client (only with SWT toolkit mind you) and network server
development. As far as web development goes, I’ve tried many times,
using many diverse frameworks, but it’s just a mess of acronyms that no
one really knows how to fully use. In addition to this, every year or
so, a new bunch of acronyms joins the party offering so much more that
no one really understands.

Struts is terrible. Don’t even attempt to go there. I think one of the
major drawbacks to web development in Java is that it’s all bolted on.
Rails on the other hand, is designed from the ground up to be what it
is, and it does it very well.

Guys make large investments into Java because that is what it takes to
learn it, a very large investment. It is unproductive and just not
worth it.

Dan

On Saturday, February 18, 2006, at 9:26 AM, Peter M. wrote:

*I realize we don’t hate Java.

It is ok… as long as I don’t have to code in it.

7 years was too much – Now I need a long rehab:
http://www.cafepress.com/javarehab

I read somewhere that the number of bugs per line of code is
reasonably constant, across all programming languages, for a given
programmer/team. In other words, if a team is going to average e.g. 5
bugs per 1000 lines of Java code, they’ll also have ~5 bugs per 1000
lines of Ruby/Python, C#, assembler, … code.

Given that’s true, and it kind of “feels” true, the fact that RoR
accomplishes many tasks with a fraction of the code it would take for
an equivalent Java app makes the “bug-free-ness” of RoR a compelling
factor.

I know my Ruby/Rails code has many less simple-but-obscure bugs than
my Java code, but that may be because I’m a really bad Java coder. As
an example, personally I’ve found that, regardless of the language
used, if a given block of code spans > 1 screen, I start to get many
more typos in that block - just being able to view an entire block of
code onscreen without scrolling seems to almost eliminate an entire
range of errors for me.

Regards

Dave M.

On 19 Feb 2006 04:45:28 -0000, Roustem K.

On 2/18/06, Dan H. [email protected] wrote:

Struts is terrible. Don’t even attempt to go there. I think one of the
major drawbacks to web development in Java is that it’s all bolted on.
Rails on the other hand, is designed from the ground up to be what it
is, and it does it very well.

Used properly, Struts is far from terrible. It’s actually quite a
good tool. It also has a very steep learning curve. Used poorly by
people who haven’t made it up this curve yet, it can certainly produce
some terrible results.

I’ve been building enterprise web apps (for lack of a better term) in
Java for about 6 years now. I’m also always trying to learn something
new, which is where Ruby comes in for me. It seemed more exciting
than learning EJB 3.0 and Java 1.5. I’ll eventually have to pick
these up, but for now I’m having a good time with RoR.

– James

You know it wasn’t always like that with Java. Back in the day things
were
very simple and great to use. I know since I was one of the first
people to
write a web application in Java. I actually used CGI before servlets
came
out, then switched to servlets since they were better.

It just started happening that vendors would create these JCP
“committees”
and create standards that helped them sell their products. I remember
getting really pissed off when I worked on the uPortal project and
realized
that a recent version of the Servlet API removed almost all management
interfaces. You can still access deprecated APIs in servlets but the
vendors removed these management interfaces with a vengeance. I think
that
was the first example of the so called “community process” being used to
the
advantage of the vendors.

Some people I mention this to have said it has no “reality” to it, but
take
a look at the current state of things.

I have an IBM product at work called INS. We were pretty much forced to
use
it. This thing requires a ton of IBM software to run. It uses WEA,
WebSphere, WebSphere Portal, maybe 10 Lotus products we have no clue
about,
and then finally INS. It’s got to be like a cool million in software
and
hardware to run this thing. When you call to get help for it they have
to
read an org chart to tell you who to call next (since nobody at IBM can
actually just solve your problem).

We had problems installing the 5.x release and IBM had to send out a
core
INS developer from England and several of their WebSphere gurus and
still
couldn’t install the thing according to the documentation. It finally
took
them about a week to get it installed cleanly. It also requires Windows
because of a bunch of features we don’t even use. When we run the
application it has to keep a cmd window open on the desktop and we can’t
log
the administrator out. Now that’s enterprise!

What does it do?

It reads RSS feeds and sends e-mail notifications.

I’m not kidding or exaggerating here. That’s all it does. They claim
it
does more but when you ask for these other features IBM says, “Oh, you
need
to write a connector for that.” It took our developers almost 1 month
to
just use the RSS connector it already has. Writing a new connector
took
almost another 3 months.

One of our team members had a great quote about INS, “It’s like you’re
buying the elephant to watch it’s tail wag.”

The best part of this story? We asked if just the INS part ran on Linux
without all the other crap. IBM told us it didn’t and that we had to
buy
the whole package. I later found out that IBM actually did sell just
INS to
another company in EU that wasn’t bundled and ran on Linux just fine.
They
just used INS as a means of selling a ton of crap we didn’t need.

This is why there’s a backlash against Java. I don’t think it’s the
language as much as how vendors took Java’s popularity and started
bundling
everything they possibly can or setting up the “standards” so their
products
are in a prime position to take the market. This disregard for the end
implementers and using the JCP to sell their stuff just eventually set
the
stage for something simpler to come along and take them on.

Anyway, that’s my thoughts on it. Talk amongst yourselves. :slight_smile:

Zed A. Shaw