Jan 312006
 

RubyOnRailscreatorDavidHeinemeierHanssonJava enthusiasts today seems to have a love-hate relationship with Ruby and Ruby on Rails. While there are some who feel it’s over hyped, there are others who feel that Rails is the coolest web application development technology of our times. So who better to talk about Ruby on Rails and Java than the creator of ROR, David Heinemeier Hansson.

In this interview with Satish Talim, David talks about the growth of Rails and its features. He also tells us why Rails is relevant to Java developers and something Java developers need to look at right away.

Satish Talim >> Hi David and welcome to IndicThreads. Could you tell us a little more about yourself and your involvement with “Rails?”

David Heinemeier Hansson >> I’m a partner at 37signals. The company behind Basecamp, Backpack, and other successful web applications. With the development of our first application, Basecamp, I chose to use Ruby and began the work on Rails. I basically extracted Rails from Basecamp. So instead of sitting down to think about “what would make a good framework”, I created a real application, saw what worked, and put it into the box called Rails.

Satish Talim >> There’s a big buzz around “Rails”, could you give us your thoughts on “What is Rails and how it’s “different”?

David Heinemeier Hansson >> Rails is a framework for creating Model-View-Control-based applications along the traditional request/response paradigm. So that makes it very similar to what especially Java people have been doing for a long time. Many of the basic patterns are the same, at least the theory is the same. The implementation and the feel is very different.

“The theory is the same. The implementation and the feel is very different…”

It’s difference comes from its embrace of Ruby and its thinking. We’re optimizing for happiness by enabling the creation of beautiful code. This optimization manifests itself in principles such as Convention over Configuration where we liberate people from repeating the same mundane decisions over and over again. The stuff that doesn’t matter, that you don’t care about, and that you’ll gladly trade for higher productivity.

Flexibility is often sub-optimization that merely succeeds at making everything equally hard.

“Difference comes from Ruby On Rails’ embrace of Ruby and its thinking…”

RubyOnRailsSatish Talim >> In a very short time, “Rails” has perhaps become the most talked about ‘framework’ around. What do you think are the reasons? Did you see this coming?

David Heinemeier Hansson >> Rails is optimized for programmer happiness. That’s a very disruptive notion. The fact that we care about what makes programmers happy allows us to unleash a world of passion. That passion in turn leads to motivation. And motivation is the most powerful productivity booster we have available.

“Rails is optimized for programmer happiness…”

I’m certainly surprised that we’ve been able to grow this quickly, this fast. But I was fully aware that Rails would be rocking the boat. We’ve slaughtered a whole farm of holy cows. You can’t do that without causing a stir.

Satish Talim >> David Crane the author of “Ajax in Action”, in a recent interview with IndicThreads mentioned that “Ruby on Rails is clearly enjoying much synergy with Ajax.” What’s your take on this?

David Heinemeier Hansson >> Rails has embraced Ajax in its core deeper and faster than any other integrated framework out there. We have the authors of the most successful Javascript frameworks for Ajax development in our core group: Sam Stephenson of Prototype and Thomas Fuchs of script.aculo.us.

“Rails has embraced Ajax in its core, deeper and faster than any other integrated framework…”

This has granted Rails a huge lead on integrated Ajax development. By chasing the notion that Ajax in Rails should be “as easy as not to”, we’re stripping the rocket surgeons of their monopoly on this technology and making every developer capable of creating modern applications with Ajax.

We’re approach the 1-year anniversary of Ajax in Rails while most everyone else are still considering this early-adopter technology.

RubyOnRailsSatish Talim >> Are there any plans to integrate (a) multilingual support into “Rails” (b) a Reporting tool into “Rails”?

David Heinemeier Hansson >> There is already plenty and strong multilingual support in Rails through plugins such as Localize and Globalize. Internationalization is one of those features where different people wants different things, which makes it a questionable candidate for framework extraction. Good frameworks do their best when they’re abstracting the ways most people do most of their things.

So no, we’re not looking to get the kitchen sink into Rails. But we’re very enthusiastically encouraging people to develop plugins. Once something is a plugin, it integrates with Rails so cleanly that you can’t tell the difference between “native” Rails and “plugin” Rails code.

Internationalization and reporting are both obvious candidates for plugins.

Satish Talim >> One of the wonderful features of Rails is the differentiation between production and development environment, which normally doesn’t come with web tools. Was it a conscious decision to add a flavor of “Enterprise” feature in Rails?

David Heinemeier Hansson >> Actually, we have a conscious mission to avoid things with enterprise labels. To me, enterprise is not about technology or best practices. But all about legacy, complexity, and doubtful value.

“We have a conscious mission to avoid things with enterprise labels…”

So the fact that Rails supports three environments out the box (test, development, and production) is not about enterprise, but about pragmatism and need. To do sane development, you need this division. Every thing from the smallest 4-hour application to the biggest projects benefits from it.

Satish Talim >> Is “Rails” well-suited for Enterprise level applications?

David Heinemeier Hansson >> Again, I think of the “Enterprise” label as an excuse to deliver expensive and painful software over budget and late. So I’m hesitant to say that Rails is well suited for that. But if you take the more generally used definition, such as “important software for the Fortune 1000″, then yes, I most certainly think Rails is well suited to serve them. Who are not interested in getting valuable software faster and cheaper?

I think of the “Enterprise” label as an excuse to deliver expensive and painful software over budget and late.

The caveat to that is of course that a lot of enterprises are culturally and mentally unable to embrace the philosophies that Rails are built upon. So if you’re not having any luck getting agile methodologies adopted by your organization, there’s a good chance that Rails will be a poor fit. Not for technical reasons, but for political ones.

And the final caveat is of course that Rails is about a vertical, but huge, scope: The service/database-backed application. So it won’t help you launch rockets into space or power the pacemaker. It’s just about delivering applications for the web.

Satish Talim >> How do you compare “Rails” with continuation-driven frameworks like “Seaside”?

David Heinemeier Hansson >> Rails is much more traditional and familiar to most programmers. Java programmers with years of experience in J2EE can switch to Rails quickly and all they have to learn is what drudgery not to do any more.

“J2EE programmers can switch to Rails quickly…”

Seaside, on the other hand, is an entirely different paradigm. It’s new, fresh thinking. And for certain narrow domains it can definitely offer significant improvements over the traditional request/response model.

RubyOnRailsBut I don’t see it as something that’s going to catch a ton of mainstream traction the way Rails has. It’s simply too different for too many people. And for the “most applications most of the time” sphere, it doesn’t offer enough benefits over something like Rails to be worth the mental rewrite for most people.

I certainly encourage you to take a look regardless. It’ll broaden your mind.

Satish Talim >> Bruce Tate’s book “Beyond Java” and his articles that talk about how Java developers are adopting Ruby, have sparked off a keen interest in Ruby and “Rails” . Do you see Ruby and “Rails” as the language / framework replacing Java in the long run?

David Heinemeier Hansson >> Languages are never fully replaced. There are still Cobol and Fortan systems out there. And 10 years from now, there will still be Java systems out there. So its not an either/or thing.

“Majority of new web-application development will leave Java in the coming years…”

But yes, I definitely believe that the majority of new web-application development will leave Java in the coming years. Such is evolution. Java served as a very valuable link in that evolution taking business programming out of C++. Now its time to accept that there are more productive ways out there to achieve the same. Just as Java convinced people of that in the mid 90’es. I think 10 years is a great run. Just as Fox should have let The X-Files end with dignity around season 7, so should programmers let Java retire from the spotlight of web applications in dignity.

“Let Java retire from the spotlight of web applications in dignity…”

Satish Talim >> Where do you see “Rails” going from here?

David Heinemeier Hansson >> It’s all up from here. The current level of enthusiasm is mainly being generated by early adopters and thought leaders coming over. The tipping point is still in its infancy.

Satish Talim >> How does your company 37signals make use of “Rails”?

David Heinemeier Hansson >> 37signals uses Rails for all application development. These applications serve as great poster children for what Rails can do. I invite everyone to have a look at http://www.basecamphq.com, http://www.backpackit.com, http://www.tadalist.com, and http://www.writeboard.com. And we’re currently working on two new applications also powered by Rails: Sunrise and Campfire.

RubyRailsFrameworkSatish Talim >> Thanks David for sharing your views on “Rails.”. On behalf of the many Ruby User Groups and companies interested in Ruby and “Rails” development in India, I am inviting you to India to talk to us about “Rails”. Anything else you would like to share with the IndicThreads readers?

David Heinemeier Hansson >> Have more fun programming. Are those XML configuration files making you happy? If not, maybe you should play around with Ruby on Rails for a while. It’s really easy to get started (and even easier to get hooked).

Satish Talim >> Readers can keep up with David through his blog http://www.loudthinking.com

Satish Talim has been in the software development field since 1978 and has been working with Java since the first Beta. Satish has helped many US software companies like Infonox and others, to set-up their subsidiaries in Pune, India . Nowadays, he does consulting, training and other odds and ends with Java and other languages, including Ruby. He loves to blog on Java, Ruby and Chess.

Related:

>> Books On Ruby On Rails

>> A Python in Java land

>> Like to code in Java, Python, Ruby

>> Projects driving
the AJAX functionality of Ruby-On-Rails

* Call For Speakers! Submit A Talk on Web Technologies, Internet Of Things, Serverside, Cloud or Big Data For The Upcoming
IndicThreads.com Developer Conference, Feb 2015, Pune – India.

The following two tabs change content below.
Content Team

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!
  • ashokmadhuriya@rediffmail.com

    i want to you installation document for oracle adf.

  • Content Team

    Last comment was 2 years and 7 months ago. There is now Groovy on Grails. It works like Ruby on Rails except it is written in Java; compiles to Jave bytecode; allows embedded Java. As best I can tell at this point it does everything RoR does. Doesn’t this change thing?

  • ‘Guest’

    How to use the java enterprise media beans
    in J2ee

  • Noname

    noname wrote: ‘has Cobol faded away?’

    to that i say ‘yes it really has. java will too, unless it catches up.’ php and coldfusion are dying and python is starting to miss the boat too.

    the software industry is gonna shift very quickly — if you’re not going to change with it, then you’re going to be babysitting somebody’s database or report-generator intranet application until you retire. if you don’t mind doing that, then by all means…

  • Noname

    Most Java developers think that the world starts and ends with Java. Don’t worry, your Momma will be around in the years to come but if you want to become a man, look around, experiment, open your eyes and your mind – you won’t repent it nor will you loose anything. Grow up man!

  • Noname

    David Heinemeier Hansson >> Again, I think of the ‘Enterprise’ label as an excuse to deliver expensive and painful software over budget and late.

    WHAT !!!

    Ok,
    PHP or Rails ??
    :grin

  • Noname

    To the ‘change guy’. Sure it is, that’s why Java have changed so much since it was first released.

    I’m kind of sick of open source zealots. I wasted a precious time using PHP before Java because of the ‘advices’. PHP sucks big time, Perl that I also use is good but for big projects is a pain to maintain, now what? You want perfectly reasonable people to switch their clients to something not proven using the ‘change’ argument?

    Sure everything changes, but please, do better than that. Offer us a COMPLETE SOLUTION to our problems, not ‘Hey, look at how my HelloWorld, isn’t it cool? I don’t know what Enterprise is’.

    ‘Change’ and ‘happiness’ are not valid arguments.

    I believe Java is morphing into something better all the time. Now with the script api in the JVM (Java 6) I believe it’s going to get easier for adding other languages to the platform (which is not something new, we have other languages already), and we will have all Python, Ruby or whatever has to offer at our reach without leaving Java world.

    A piece of advice, take a look at the SE javadocs.

  • Noname

    I like Ruby on Rails. In fact, my video podcast – [URL=http://www.northeastskipodcast.com]Northeast Ski Podcast[/URL] runs on ROR, and I’m very happy with the flexibility – adding features both controllers, models and views and expanding database schema as needed. In fact I believe Java doen’t have its place in the fast paced Web apps world: PHP maybe. But it’s really spaghetti code. Ruby comes out of the noble origins of the Open Source, not the dark and cold corporate bunkers.

  • Noname

    Bruce Tate is an idiot capitalizing on an acronym. Maybe the devoted quoter up above can go look to see where Tate makes most of his money. In Java. OReilly is more than happy to go along for the ride because it makes them money. DHH, we won’t give a crap about you in a year because you’re about as important as a fart in the hurricane.

    What’s most annoying is that DHH is that tries to qualify his importance by detracting from Java OVER and OVER again. Do you hear Gosling slamming Stroustrup? No. But that’s not even a fair comparison. DHH with ROR slamming Java is like street hot dog vendor slamming a 5 star restuarant.

    HA HA HA! Wow, that analogy is so correct I have to pat myself on the back.

    Enjoy those 15 minutes!

  • Noname

    Some years down the line Java developers should not complain that they were not fore-warned. Change (Rails or something equivalent) is the only constant. Java would be around for sure but those who latch on to a newer (and better?) technology would be seen, heard and better paid. Choice is yours.

  • Noname

    +1 for the comment: ‘Bruce dont you make part of your living selling books that you write?…’
    You’re very active in preparing the launch of a new book I image – you also recently posted an ‘article’ which was quoted on TSS: ‘Beyond Java’ where you thoroughly advocate RoR as the next best thing and dismiss Java/J2EE as ‘old school’ and ‘just not fun anymore’. Questionable arguments if I may say so.

    Java/J2EE technology has matured into a enterprise platform, supported by excellent tools and frameworks, you can productively use to create enterprise (web) applications. Maybe it is maturity you don’t like, but for us and our customers it the only thing that counts. Run along now.

  • Noname

    Okay, so RoR is doing some really innovative things with the web. I’ll be the first to admit that, but there’s nothing that it’s doing that Java can’t do, it just happens to have it embedded. If someone would just sit down and realize that you can write applications in just as much time with JSPs and a good API that offers similar advantages as RoR does Ruby loses all its glimmer and just shows itself to be what it is, just another scripting language.

    The syntax of Ruby is far too relaxed. I have enough trouble trying to maintain people’s bad Java code than to worry about relaxing the structural constraints further to allow people to write even more hideous code.

    I’m amazed at how many java ‘gurus’ (notice the quotes) are on-board with Ruby, but my opinion is either they’ve just sold out, or just haven’t thought this through. There’s not a single professional Java developer I’ve talked to that thinks RoR is a complete solution. The idea seems to be, ‘Use Ruby for the small stuff and Java for the larger projects’, but what happens when those small projects grow? Sorry, but I’m sticking to a language that’s not going to fall apart when things start getting a little complicated and outside of its simple APIs grasp.

    -Matt Hicks

  • Noname

    Bruce dont you make part of your living selling books that you write?since the hot Buzzword thing is RoR right now, i wouldnt take your advice seriosuly unless you give a statement which doesnt benfit you in anyway possible.I know your next book will be on RoR , you started RoR series with Beyond Java?Pardon me if i sounded bad there, but i see an ulterior motive behind what you do.

  • Noname

    ‘Rails is optimized for programmer happiness…’

    I have no words to express my despise for this assertion. Not for the ‘happines’, but:

    – the slogan among Ruby zealots is around ‘happines’, maybe to avoid objective comparisons;
    – who doesn’t want ‘happiness’?
    – Is there anything more subjective than happiness?
    – Is this some sort of ‘enforcement of (my) happiness on others’-nazi-like thing?

    Happiness may be many things to many people.

    Now objectively:

    – The maturity of tools for Java is unseen in Ruby camp;
    – The tools save a lot of typing and manual jobs, such as editing XML, and also provide neat options such as refactoring. So complaining about Java’s verbosity only comes from someone that never actually passed beyond the HelloWorld.java on notepad;
    – ‘Enterprise’ applications are called ‘enterprise’ because they support high loads without breaking, run on high end hardware, usually counts with 24×7 support, have nice features such as distributed transactions and other things;
    – Java is complete platform with a huge standardized library saving the programmer’s time;

    Sure Ruby has its uses, just like everything else, but this ‘happiness’ talk seems more like 15 year old kids talking about programming.

  • Noname

    [B]Bruce Tate[/B][URL=http://www.onjava.com/pub/a/onjava/2005/11/16/ruby-the-rival.html]Bruce Tate[/URL] says – ‘There are developers that can’t stomach learning servlets, Spring, XML, Hibernate, Struts and then some UI glue frameworks. They’re going to be unleashed in Rails. There are also Java developers who are already looking for more leverage and finding it in Ruby on Rails. The number of Java visionaries adopting Rails, from Thought Works to James Duncan Davidson to Stuart Halloway to David Geary, is staggering.’

  • Noname

    JBoss should acquire Rails. The talk sounds very similar. Rails people are slightly more humble.

    If David was from JBoss he would have said ‘Ruby and Rails will rule web application development for the next decade’ :)

  • Noname

    Let IBM start developing Websphere based on ROR , Oracles oc4j based on ROR , BEA develop their weblogic etc etc and hell i might just switch to ROR.Personally i feel safe when there are few BIG companies behind the product iam choosing, which is why i went with java in the first place.Until then, i will be more than happy to use RoR for my personal homepage, conduct polls online etc, etc.java retire cuz of RoR right now?nah i dont think so..

  • Noname

    Java developers need to keep an open mind about any technology; don’t get married to it. Java’s not going to fade away; has Cobol faded away? Java’s product life cycle is more or less over and there’s a strong chance that in the years to come, more and more products, applications would be built using technologies like Rails rather than Java.

  • Noname

    Java is not going to fade away; has Cobol faded? All Java programmers need to keep an open mind, least they find one day that they are no longer in demand.

  • Noname

    He doesn’t say what is special about Rails and
    WHY?
    1) Rails is well suited to Fortune 1000 ‘enterprise’ applications
    2) Java should retire from the spotlight of web applications
    3) Majority of new web-application development will leave Java
    4) Rails is suited to AJAX

    It would take more to convince the Java community than just statements from David.