I read Beyond
Java yesterday. In it, Bruce Tate makes an
excellent case that conditions are ripe for exploring alternatives
in places that were once strongholds for Java. Bruce also tends
to favor some of the same technologies that I do. In all, I
would strongly recommend this book as it poses all the right
questions.
Despite the fact that I happen to agree with the answers that
this book puts forward, I feel that Bruce weakens his case by
prematurely dismissing alternatives.
Alternatives
PHP is mentioned in passing a few times, and summarily
dismissed. One of the biggest objections? Some function
names have underscores between words, and others simply concatenate
them. The truth is that this doesn’t matter. One
niche that PHP has down cold is an ad-hoc collection of one page
apps that baby-sit a relational database with a web based UI.
My son’s school is a prime
example. PHP also is a good match for places like Yahoo! who
want to script together core logic that is written in C/C++.
A better case would have been made if Bruce had focused on OO
support in PHP (merely adequate), or on meta programming —
something Bruce makes a strong case for — and is essentially
absent in PHP.
Perl is dismissed as a write only language. No
mention is made of Perl 6, which (if it ever ships ;-)) will have
strong support for building
domain
specific languages — support that is far beyond what Ruby
can offer today.
Python is mentioned in a nice way, and I do believe that
the Bruce’s analysis is on target here: “The biggest
hurdle for Python is its lack of compelling reasons to move away
from Java. Python really needs a killer app.” Of
course, this only applies if you are coming from Java.
Smalltalk is largely dismissed for the simple fact that
it hasn’t taken the world by storm in 30 years, though nice
things are said about
seaside.
Ruby is positioned as the most likely candidate at this
point in time in a race that is too early to call. Fair
enough, though I think too much is made about the importance of a
version that runs on the JVM. Frankly, I doubt
Odeo cares. And if you have
written a large web application in Java, you are likely using
Spring, Hibernate, or (&deity; forbid) EJBs. If so, then
I would think that the byte code you are using is the least of your
problems. A much more pragmatic approach would be to
integrate in a coarse grained manner through web services (note the
use of lower-case), or in a fine grained matter through sharing a
database. The biggest issue is likely to be the sharing of
things like sessions.
Overall
Overall, I think this book poses the right questions, and I
agree with the conclusions. In particular, I agree that in
the next few years we are likely to see a shift from a small number
of dominant languages/platforms to a plurality of solutions
focusing on approachability, community, and
metaprogramming.
These comparisons have started to annoyingly not even mention Tcl and Tk anymore. Granted, they may not be the hot new thing for web programming, but then again, neither is Perl, and it’s still on the list. Tile has updated Tk’s look and feel, and the starkit/starpack stuff is a very handy way of deploying cross-platform applications. So Tcl and Tk still have something to say, and they scale down marvelously - it’s possible to write useful gui’s in a few lines of code.
The OO support in PHP 5+ is pretty darn good. There may be a few little things here and there that are unimplemented, but you can certainly design a system using OO principles.
The larger issue, to me, is that core language designers are split between a procedural and OO mindset. Certain members strongly want to do everything using objects; others violently disagree and want nothing to do with them. It unclear (again, to me,) whether this diversity of opinion will lead to a strong synthesis or watering down of ideas. So far, we seem to be walking a pretty good tight rope.
Regardless, in reality many members of the PHP community do not program using OO, so the tools and packages for you to hook into in an OO way are far more limited than they are overall for PHP or are available in a strictly OO language, such as Java or Python.
I do feel that is a legitimate critique., but I am hopeful that as PHP 5 becomes more widespread (PHP 4 is still very popular and widely deployed), then that will encourage an OO community to flourish.
With PHP5, the language is “all growed up” now, and I love it. Adam is right about the big steps it has taken in OO support; however, I find it difficult to imagine Java being toppled, or even tickled a wee bit, anytime soon. In the world of business, Java is King - the IBM of programming languages - the safe bet. I see no incentive for developers to mix ‘n’ match Java with any of the proposed alternatives, and a wholesale switch is unlikely in the near future.
Tapestry 4.0-beta-12. The latest weekly (give or take) beta release for Tapestry 4.0 continues to narrow the list of outstanding bugs. 15 More Java Tips. launch4j 2.0.0 is a cross-platform tool for wrapping Java applications distributed as jars in...
Sam’s right, at Odeo we don’t care if ruby runs in a JVM. The only issue we have with ruby is the state of the libraries. It’s not as mature a language as the others mentioned. That’s a problem which is being solved as the community grows. Thankfully the open source roots of ruby mean the libraries are almost all open source and not closed like what has been produced in much of the java community.
For us what’s more exciting is that ruby is adopted by a community which is experimenting and using light weight and scalable technologies like lighttpd, fastcgi replacements like scgi, and other tools which will let us build a site which scale to traffic without undue complexity.
If Ruby’s libraries are questionable, why didn’t Odeo go with Python? Was it just because of Rails, or does Ruby offer something else that Python technically cannot do?
I agree with Bruce, and dissagree with Sam. I think that JRuby is crucial. It isn’t crucial from “does ODEO care”, but it is from “will it be adopted widely”.
Java is not a language, it is a platform. Many companies have a lot of investment in this platform. The JVM itself is pretty darn good. It can out perform a lot of C++ code (as it isn’t compiled for the lowest common denominator), and there are lot of great tools for debugging, scaling, yada yada.
So many of our clients are invested in this platform that it is hard to move over to Ruby. This is why Groovy got a lot of buzz at the beginning. It allowed you to get to a dynamic through the back door. It was the glue for the VM.
Many people would much prefer Ruby thought of course, and having JRuby is a huge asset. Now I can use it at large clients, it can work with the Java world in a nicer way than web services or Web services. rabble from Odeo complained about the libraries. Now you have a choice of easily using a Java library that may be superior for what you are doing, and mixing and matching.
The best of all worlds. VMs are a nice abstraction. While we are talking about YARV and such we have a great VM on the other side of the fence. Rubys runtime is so darn poor, that running a top the well engineered JVMs from Sun, IBM, JRockit, .... is a great thing. It doesn’t mean that it is the only choice for Ruby, but its a great tool in the box.
I hope it can happen. JRuby is around 90% of the way, and needs a bit of help.
Sam, can’t you get IBM to help out? :)
Cheers,
Dion
If I want to write a quick script I would much prefer writing Foo.new on a Java class and start using it compared to using darn web services :)
If Ruby is then on the JVM it will grow at a different level. It will also give you a lot more choices for libraries.
The aggregator is always good for some serendipity. Here’s today’s. Sam Ruby wrote about Bruce Tate’s new book, Beyond Java: In particular, I agree that in the next few years we are likely to see a shift from a small number of dominant...
I second your ending thought regarding metaprogramming and add that Ruby makes metaprogramming natural enough that it’s easier to actually do metaprogramming than to sit and ponder it. Personally I’d like us to replace the word with something that doesn’t sound quite so academic, though I’ve not thought of any good candidates yet.
Rabble, you seem to imply that most of the libraries available for Java are somehow closed source. I’m not sure what the exact percentages are, but it is totally reasonable at this point in time to build a complex application using entire 100% opensource Java libraries. For those users in situations that require commercial libraries, they’re available. And for people like me, I can pick from various Apache projects, Codehaus, Sourceforge, etc.
If you think that Python offers anything in terms of breadth of available libraries that can be compared to what is available in PHP, Java or Perl... well, I just don’t see that. Python is a great language, but it’s a woefully incomplete platform.
I agree with Bruce, and dissagree with Sam. I think that JRuby is crucial. It isn’t crucial from “does ODEO care”, but it is from “will it be adopted widely”. Java is not a language, it is a platform. Many......
[more]
Two things. First it has been a number of years since i did much real java development, so i haven’t been following the state of the libraries. I don’t ENJOY programming in java and i think programmers do better work when they are enjoying what they do.
Why not Python. That’s a good question. Everybody we have developing in Ruby at odeo has python experience. Our syncr desktop client app is written in python. We also have some back end systems which use python.
The first reason we used Ruby on Rails was because rails is where innovation is happening. We get features faster with rails. It’s a growing community where people go who want to build innovative next generation (what ever you call it) web applications. The disadvantage of using django or turbogears, or any of the other knockoffs is that they are copying others rather than leading innovation with a clear vision of how a web app framework should be.
Ruby as a language has a few things which aren’t talked about but have been critical for the success of rails, and odeo’s use of ruby and rails. The most is the ability to re-open and edit existing classes and libraries. This along with mixin’s means that we can use other people’s code and extend it. Where as in other languages we’d have to fork libraries, with ruby we can simply extend them. This is a huge productivity boost. No more working around the way the library works. We maintain extensions to a dozen classes in ruby’s standard library and rails. There is some integration work when new versions are released, but it’s been minimal. Rails works because it makes extensive use of this ability to extend existing classes and libraries at run time. It wouldn’t be the same framework if it couldn’t do that.
That is the real concrete benefit which ruby gives us over other languages. It’s also why library maturity is much less of a problem than you might think.
It is possible to extend existing classes in perl, kwiki allows it for example, but it’s not part of the language and classes have to explicitly setup to allow it. Most java people would freak at the idea. I’ve not seen the pratice in python, so i’m not 100% sure if it’s possible or not.
Java is great until you need to run on a platform that Sun (and IBM, and whatever other licensed VM vendors) doesn’t support. I try to make a habit of not writing in any language that doesn’t work on my Mac IIci running NetBSD. (With 20 megs of RAM. 20 megs! Totally maxed out. Remember when that was a lot?)
rabble: Sure you can do the same thing with Python:
class C:
def __init__(self, name):
self.name = name
def to_string(obj):
return "<C instance named \'%s\'>" % obj.name
if __name__ == "__main__":
C.__str__ = to_string
c = C("rabble")
print c
Not an especially fancy example. I take your points about Ruby’s benefits, but I’m not sure why you refer to Django as a knockoff? It seems to have been in use for a while. Python has fairly mature libraries and Django looks like a good framework. It’s being used on commercial sites right now, so I think dismissing it as you do is perhaps a little unfair.
I love PHP as a language which is shallow enough to fully master. C is the only other language which ever gave me the same satisfaction or level of productivity.
But I think that the question of what’s going to succeed Java is a little loaded. Why should it also be a server-side tool? I’m making the move to the client side, and that means Javascript, CSS, HTML and (ugh) Flash.
ɥɦɐ An advantage of declaring this page as utf-8 is that I can distinguish between somebody typing ɥɦɐ and ɥɦɐ, meaning that people don’t have to double escape if they want to talk about ...
[more]
Don Box: If you’re thinking of buying this book, you might consider buying one of thesetwo instead. Ultimately Tate’s book winds up being an extended brochure for Ruby, so you might as well cut to the chase and buy the entire Ruby canon for under a hundred bucks and be done with it.
The only problem I have is if I want a nice job then Java is the language. Don’t get me wrong...all these other languages like PHP, Ruby, etc, are nice languages. But no body cares about stuff like that. What people want is J2EE and .NET. Maybe someday these other languages will reach corporate backing but not now. I want to stay away from Microsoft so I put my money and time into Java/J2EE. Go look at the want adds.....Ruby, PHP, and all that is just a small footnote for some obscure companies. All you will see is .NET and J2EE.
I got mildly alienated immediately by the suggestion that Java’s verbosity has to do with it being a strongly statically typed language. NetRexx (which I’ve always had a soft spot for) is just as strongly statically typed, but it’s as terse as a typical dynamically typed language — and it runs on the JVM, too.
The NetRexx hello-world program is just
say ‘Hello, world!’
where the literal is of type Rexx (a number/string/hashtable hybrid class).
There is a new O’Reilly book out called “Beyond Java” that questions if Java is about it be replaced by a newer generation of languages with Ruby being the current likely replacement: [link] I browsed...
I just got around to reading Bruce Tate’s Beyond Java. I think that the senior people in the Java groups at Sun, and all the other Java powers, should read and think about it (and for that matter the CLR people over at Microsoft). The premise of...
I finished reading Beyond Java last weekend.1 It’s an important book, and I hope many people read it. Tate’s basic argument seems to be that Java became a success because it improved on C++ The strong community has helped make Java a...
Dion Almaer’s comment above about the need for JRuby being the Java platform is spot on. Some things like web server integration, which are kludgy right now for Rails, would be greatly simplified if it were written as a servlet. Deployment would be even easier than it is now, as well... simply drop a war file in a directory.
Vor ein paar Stunden hat die viel beachtete neue Web-Entwicklungsumgebung Ruby on Rails die Version 1.0 erreicht. 1.0 wie in „Firefox 1.0“, nicht wie in „Windows 1.0“. Rails demontiert gerade mit erstaunlicher Geschwindigkeit die Vormachtstellung...
Bruce Tate recently wrote a book “Beyond Java” that is critical of Java and praises Ruby excessively. The book has very few positive things to say about PHP. Well, my personal preference in terms of language is a simple clean C-like syntax. I want...
Using the JVM as a platform for other languages is an excellent idea: much of Java’s strength is in its portability and its enormous array of libraries, not as a language per se. JRuby is one example — as is J(P)ython, which I’m surprised no one has mentioned yet (everything mentioned above by Dion Almaer as a benefit for JRuby is a benefit in Jython as well).
The presence of both of these makes the notion that “Python [or Ruby] needs a killer app” moot in my opinion: you can import the killer apps (more practically, the thoroughly tested libraries) from Java, and gain the benefits of the dynamic language on top of them.
It’s even arguable that Jython and JRuby are better choices than their C equivalents, since library support in Java is so much greater than in either language’s native libraries, though of course you get both.
Interesting articles currently being browsed: A roundup of responses [ via Lamba the Ultimate ] to the Beyond Java discussion (first seen at Sam Ruby’s site) Coroutines were referenced in one of the above articles and are described poorly......
Bruce Tate recently wrote a book “Beyond Java” that is critical of Java and praises Ruby excessively. The book has very few positive things to say about PHP. Well, my personal preference in terms of language is a simple clean C-like syntax. I want...
This weekend I had some wonderful spare time, and I spent some of it reading Beyond Java, a book about the Next Language. (Spoiler: It is Ruby, or some cool continuations-based project - read: Seaside with Smalltalk. But you knew that.) The book is...