Link Details

Apathy is the suck. Login and vote now.
Link 75766 thumbnail
User 264741 avatar

By dnene
via blog.dhananjaynene.com
Published: Apr 14 2008 / 10:57

A lot of people are wondering whether Java is under threat from a set of nimble languages - PHP / Ruby / Python / Perl. This post suggests the solution is in reforming its runtime not its syntax.
  • 18
  • 1
  • 2992
  • 762

Comments

Add your comment
User 275343 avatar

signal9 replied ago:

0 votes Vote down Vote up Reply

I wouldn't say Perl is much of a contender. a lot of people went from Perl to some Java framework. I would say Ruby is the language that will give Java a run for its money. But if I was going to invest in a new framework, I would probably look at some of functional programming runtimes and languages.

User 240010 avatar

Nikita Ivanov replied ago:

0 votes Vote down Vote up Reply

Perl... "nimble" language... :) Voting down for that... I mean I haven't seen yet someone comparing Java to Perl in anyway...

Nikita Ivanov.

User 282283 avatar

Tantalus replied ago:

-1 votes Vote down Vote up Reply

That's called 'missing the forest for the trees.'

User 264741 avatar

Dhananjay Nene replied ago:

0 votes Vote down Vote up Reply

Yep ! Guilty of mashing up perl into the discussion :(

User 282283 avatar

Tantalus replied ago:

-1 votes Vote down Vote up Reply

It's not just the compile cycle and it's not just the lack of dynamism -- it's that the lack of dynamism is implemented in a verbose way.

In most LAMP web apps these days performance of the web app is not your limiting factor, it's scaling your database, network latency, load balancing...we are all used to scaling horizontally now, so the increased performance of Java over Python/Ruby doesn't give you much, and that's compounded by that I can offload as much as possible to the client with javascript these days. So why would I want to write something in a language that's going to give a code base 5 times the size of the equivalent Python/Ruby/Perl code?

User 264741 avatar

Dhananjay Nene replied ago:

0 votes Vote down Vote up Reply

>In most LAMP web apps these days performance of the web app is not your limiting factor, it's scaling your database, network latency, load balancing...we are all used to scaling horizontally now, so the increased performance of Java over Python/Ruby doesn't give you much>
So thoroughly not true !! In fine tuned Java apps (doing a tremendous amount of processing I might add), if you've designed your application really well the response is getting streamed back in the same time the PHP script is still busy parsing the request. There are a whole bunch of things you can do in Java applications such as pre-computing and caching your most traversed data, creating highly efficient data structures (a primitive long based hashmap I wrote which got used quite heavily could knock the socks out of any dictionary in any python / ruby code). If you really really want to scale - if you know how to make java scale - and if you have a dedicated server(s) - stick to java unless you just want to punish yourself enough to write your app in 'C' as an apache mod. I have read such comments about scaling horizontally and scaling the database etc etc. and I just find these to be a bunch of incorrect folklore. Well designed java apps scale and scale beyond the reach of the other languages.

Having said that, I would seriously look at not using Java today for all low end and most middle end apps. But again it is not because of the verbosity of code - to an experienced programmer the verbosity hardly hurts even though it does exist. What hurts him is waiting for the compile cycle. That kills his productivity. Another point that doesn't get talked about is the fact that ruby's compactness can actually hurt. When you are running a large development team with a varying range of skill sets, I think ruby code can actually be far harder to write and even harder to maintain for junior developers if they are not well grounded in OO and compact programming techniques.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.