views:

138

answers:

4

I am really impressed with the java/spring/hibernate stack, and really want to dive in.

Just curious, why are so many people using rails when java/spring/hibernate are tried and true?

I guesss its because of the convention over configuration and time to launch? (spring has really gone the annotation route so less xml though).

I realize this is subjective, but just looking for some thoughts on this.

upd now there are web2.0 type apps out there like jive, linked in is in java. But i'm talking about small teams of 1-5 dev's who use the java stack, I just don't see it! And I am very curious why?

Is it just the culture to use rails/etc. or there are underlying reasons like time to market and complexity?

+2  A: 

Because Java hosting is expensive. I find this the only reason.

Or at least that is the general perception. Now with GAE and virtual servers it is not that expensive. I myself got a pretty decent virtual server for $30 / month

Bozho
well assuming you can afford $100-200/month for a dedicated box or ec2.
Blankman
what does GAE stand for?
Blankman
Google App Engine - a cloud :)
Bozho
A: 

As you said, it is subjective, so following is only my opinion:

  • As Bozho said, Java hosting is expensive.

  • For applications which need 99.99% uptime (like Facebook for example), Java enterprise containers are really not the best option, to be honest. It's very hard to tune them up so that they are really fast, and even then, a plain Perl/ Python/ PHP/ Ruby web application might still beat them in terms of responsiveness, even though Ruby for example is rumoured to work 3x times slower than Java.

  • Because I personally never seen a Java web framework which integrates with AJAX in 5 min work. Might be me and my hate of Java "enterprise" technologies, though. Google Web Toolkit does fine job on that, by the way.

  • A corner case: because some of the so-called "Web-2.0" sites do not even work with relational databases. :)

  • Last but not least: such applications are very rarely easy to manage, upgrade, fix bugs in, etc. They are usually one huge mess which developers barely made working without crashes and released it one day after.

Subjective? You bet. But just my thoughts anyway.

dimitko
point 2,3 and 4 are just incorrect. Java application servers _are_ stable; ajax integration is way easy with, for example, JSF; java works with everything - LDAP, content repositories, text files, object-oriented databases, etc, etc.
Bozho
"It's very hard to tune them up so that they are really fast, and even then, a plain Perl/ Python/ PHP/ Ruby web application might still beat them in terms of responsiveness" this doesn't make much sense to me. There are lots of 'enterprise' java apps that can be made to be fast and responsive. An application that isn't fast or responsive is a sign of issues with the specific app itself, not the container/technology.
matt b
-1: That all just depends on the skills of the developer/serveradmin in question. I, for example, know absolutely nothing about Rails, I would have wasted over a month to develop and get a brand new Rails application running rock'n'solid while I would do it in less a week for JEE.
BalusC
I guess it's a matter of habit and personal experience, yes. Mine has shown me that JEE usually takes much tuning to even start doing exactly what you need. And from there on, you have to optimize for speed, resource-hungry-ness, etc. Anyway, I don't mind the vote-downs since I stated *twice* this is subjective opinion. Feedback is always welcome.
dimitko
subjective isn't the same as wrong/false. 'i like the color red and i don't like blue' is a subjective statement. 'painting with red is much slower than painting in blue' is a lie, a false statement. no downvote from me though, because the more statements like this, the more occassions to go against this kind of desinformation
Stefan De Boey
Will think twice before posting next time. ;) Was a bad idea posting subjective opinion anyway.
dimitko
+1  A: 

Subjective answer here, but I think some reasons might be:

  • Java is more cumbersome than dynamically typed languages like Ruby, Python (or PHP for that matter).
  • Deployment and hosting is easier with, at least, Ruby on rails and PHP.
mojbro
+1  A: 

first of all, as already pointed out, java is more expensive when it comes down to hosting. lately this is changing (GAE, ...) but still, generally taken, your java web server still needs more memory and you'll have to pay for that. (i don't think this is an issue for big enterprises, but it is for small startups looking for a cheap solution to get started)

i don't think it's harder to deploy java webapps or to maintain java servers, that's just a matter of having the necessary knowledge.

i also have the feeling that development time with java is slightly higher in some cases. (startup times of servers, not easy to do stuff outside an IDE, more characters to type). notice that i'm saying slightly, the difference is not that big as some would like you to believe. luckily the java world is catching up with frameworks like grails and play framework focussing on rapid development and languages like groovy and scala.

for example, when you're only using bare spring + hibernate you still have to write lots of code (data access for example), something you want to avoid, because most of this code is just boiler-plate code. (look at how grails handles this with GORM).

also, i think ruby on rails and django (python web framework) are created with 'web 2.0' apps in mind as opposed to most java web frameworks.

there are also a lot of more or less subjective reasons why people don't want to use java (java, the language, but also the jvm):

  • java is regarded as being for the 'enterprise'
  • it's not cool (see point above)
  • java is cumbersome to write
  • java servers are bloated
  • negative experiences with stuff like websphere and RAD (the IBM IDE)

note that i don't necessarily agree with these subjective arguments. these are just the sentiments you hear lately. although i do agree with websphere part ...

Stefan De Boey