Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming Books Media Book Reviews IT Technology

Agile Web Development with Ruby on Rails 222

Ridgelift writes "Learning to develop web applications with Ruby on Rails has gained a huge amount of interest lately, but for people wanting to learn Rails there are no books on the subject. That's changed now with the pre-release of Agile Web Development with Ruby on Rails , the latest book from Dave Thomas and the author of Ruby on Rails David Heinemeier Hansson. It's really 3 books in one: a full Rails tutorial, an in depth guide to the components that make up Rails, and an introduction to developing applications using the Agile development model. There's even a quick introduction to Ruby, the language Rails is built with." Read on for an early review of the beta book. Full disclosure: Reviewer Miles K. Forrest points out that he has read earlier versions of the book's manuscript and provided critiques to the authors.
Agile Web Development with Ruby on Rails
author Dave Thomas and David Heinemeier Hansson
pages 506
publisher The Pragmatic Programmers, LLC
rating Excellent
reviewer Miles K. Forrest
ISBN (Book still in beta)
summary A complete primer to developing web applications with Ruby on Rails

At just over 500 pages, Dave Thomas' new book manages to cover a lot of ground in a concise, readable manner. One problem at the outset -- the book is not finished. Knowing that the Ruby on Rails community has been chomping at the bit for morsels of information, Dave and David (DHH) have answered the call by releasing the forthcoming book early. "The book has not had a full technical edit, so it will contain errors. It has not been copy edited, so it will be full of typos. And there's been no effort spent doing layout, so you'll find bad page breaks, over-long lines, incorrect hyphenations, and all the other ugly things that you wouldn't expect to see in a finished book. We can't be held liable if you follow our instructions, expecting to create a Rails application, and you end up with a strange shaped farm implement instead. Despite all this, we think you'll enjoy it!"

And enjoy it I did. The "Getting Started" section of AWDRoR provides a whirlwind overview of the Ruby on Rails' architecture. I found Rails to be very intimidating at first. You can't just cut-and-paste a couple lines of code like you can in PHP. Rails generates all kinds of directories and files, making it feel like your first trip to Disneyland -- you know there's fun to be had, but it's a big place and you don't know your way around. The reason for all this is because, in programming, short simple scripts are easy and simple, full blown Web applications are not. Many LAMP projects developing in perl/Python/PHP and any number of templating engines have started simple, but grown into unruly messes that are difficult to maintain. While trying to grok Ruby on Rails, topics like Model-View-Control and Object-Relational Mapping really don't stick at first. Add to the confusion that many of us are also struggling to learn Ruby and a RDBMS (such as MySQL; Rails works with others databases as well). The overview of Rails is necessary, but I found it to be a lot more helpful rereading it after completing the tutorial section. So if you read through this first section and feel lost like I was, just know that the material will become familiar to you and press on, because it gets a whole lot easier from here on in.

I really enjoyed the Tutorial section, a narrative designing a shopping cart application for a customer. Dave says it best: "Does the world need another shopping cart application? Nope, but that hasn't stopped hundreds of developers from writing one. Why should we be different? More seriously, it turns out that our shopping cart will illustrate many of the features of Rails development. We'll see how to create simple maintenance pages, link database tables, handle sessions, and create forms. Over the next seven chapters, we'll also touch on peripheral topics such as unit testing, security, and making our pages look nice."

Dave begins not with lofty design plans, but with a tool most real programmers use: napkin drawings. Many of us sit down over coffee with a customer and talk about what they need, sketching out ideas with paper and pencil, not some complex software planning tool. Each chapter in the tutorial section allows a story to unfold, where the customer works alongside the developer. Real life situations like changing direction or refactoring code are covered as each programming session is done. You really see why Rails is becoming so popular. It wasn't written by a team of programmers trying to hammer out an arbitrary list of features, but rather Rails was built around a real application (Basecamp). Pragmatic considerations such as developer time, feature creep, and maintenance issues have all been skillfully addressed in Rails. The tutorial reflects this, and at the same time it also gently, almost unknowingly, teaches principles as outlined in the agile manifesto. Some of the goals include:

  • Individuals and interactions over processes and tools
  • Working software over comprehensive documentation
  • Customer collaboration over contract negotiation
  • Responding to change over following a plan
AWDRoR can get away with this because Rails itself was designed around the principles of Agile software development. The tutorial is probably the best I've ever read. You really come away from it knowing not only what you've written, but why, as well as picking up a few expert developer tips along the way.

The third section, "Rails in Depth," dives into the inner workings of Rails. Components such as ActiveRecord, ActionController, ActiveView, and Web Services (Ajax) are all covered well. There are even chapters on securing and deploying your applications properly. These chapters, in conjunction with the API docs found on www.rubyonrails.org, give a full overview of Rails. Most helpful in this section are the notes and diagrams which help pull everything together. The appendices that cap off the book also provide the full tutorial source code, as well as a brief introduction to Ruby, the language that makes all the magic happen.

In short, Rails is a brilliant architecture, and Agile Web Development with Ruby on Rails is a great book. I'm reluctant to point out its shortcomings as it's still in beta, but it's really hard for me to find much to complain about. It took me some time for the light to come on with Rails, but once it does, you see that Rails could not exist without Ruby, the language it's inextricably woven into. As Dave Thomas is quoted on www.rubyonrails.com, Rails is probably "the framework to break Ruby into the mainstream." Whether you believe the hype or not of "super productivity," "Ten times faster development," and "Better than anything else," Ruby on Rails is a great tool to add to your belt. In fact, I find myself using it exclusively for Web apps, and I catch myself using python and PHP less and less and Ruby more and more for my day to day programs.

If you want to learn Ruby on Rails, Agile Web Development with Ruby on Rails is a great choice, and will probably be the definitive book on the subject.


Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Agile Web Development with Ruby on Rails

Comments Filter:
  • by HillaryWBush ( 882804 ) on Thursday June 16, 2005 @06:57PM (#12836871)
    I particularly enjoy their persistable domain model (where logic and data are bound in one wrapping). The one-method-per-action-controller-request-router is sweet. And there's nothing like sending out forgotten passwords and invoices from easy-to-test email service layers on top of sendmail. To dust off an old chestnut, I welcome our new buzzword-crazed overlords. It's too bad that I already have a good job as a clown.
  • by ajakk ( 29927 ) on Thursday June 16, 2005 @07:01PM (#12836896) Homepage
    I am putting together a CMS type web application, and I would like some recommendations on infrastructure to use. I have tried modifying existing PHP apps, and I have only had moderate success with that. I have experience in Python, PHP, Java, and am willing to try almost anything (Perl is almost). From looking at the Apache Java solutions, those look a little to heavy. I have looked at Zope, but I have never gotten comfortable with its administration or syntax. I have thought about using Cheetah and WebWare/Webkit. All of this hype about Ruby on Rails had made me want to take a look at it. I know this is sorta open ended, but does anyone have any good suggestions?
    • Re:Suggestions (Score:3, Informative)

      by abigor ( 540274 )
      CherryPy is quite nice (Python-based web app framework). Very quick to get stuff up and running.
    • Do yourself a favor: set aside a couple of hours and give Rails a try. Go through one of the tutorials. You'll end up saving yourself a lot of time. You probably won't even be inclined to try one of the other solutions you mention as I suspect you'll be plenty happy with Rails (make that ecstatically happy).
    • Since this is a Rails Article, I have found Typo [leetsoft.com] which is a Rails based Blog tool that's along the same lines as WordPress or MoveableType and others. It has Comments, RSS+Atom feeds.

      You can use all the MoveableType posting tools to maintain content - or use the builtin Active Record, HTML based Admin Tool.

      It's pretty young, and has a few bugs in the XML-RPC interface. But, it was easy to customize and fix the XML-RPC bug.

      If you promise to be nice to my home DSL line: The Fermata [bardes.org]

    • that mambo, postnuke, xaraya, etc. don't already do?

      Not looking for flames, but explaining why you are writing a new app., noting what you are trying to do that current ones don't do, might be a good place to start in getting advice.
    • I recommend you watch the demo videos [rubyonrails.com] on the rails page to get a taste of what Rails does. For example, you can see an entire basic but functional blog application built, real-time, in about 30 minutes (the second "seeing is believing" video). Once you see that, if you want to proceed, I'd skip the online tutorials & spend the $22.50 on the beta book. The quality & depth of the book is outstanding & it will greatly speed your advance with the language. Rails is really easy & at the same time

    • Sure why not, there are probably more linux distros than linux users; so why not more CMS projects than those who use them?

      I like the idea behind F/OSS. But sometimes it seems like, instead of using common code to work together on a project, F/OSS developers prefer to go in a thousand different directions all working on their own projects.

  • by Harry Balls ( 799916 ) on Thursday June 16, 2005 @07:11PM (#12836972)
    It doesn't look like you get a discount on the physical book when you purchase the Beta .pdf
    • Your math sucks. (Score:3, Informative)

      by nacs ( 658138 )
      It's $22.50 for the PDF by itself or $43.75 for the dead tree book and the PDF.

      In other words, the printed book is $21.25 if you take out the cost of the PDF.

      I purchased the combo the day after it was released and must say it's more than worth the price.
  • I find it difficult to believe that if it is truely 'tens times simpler' that there would be any necessity for a book to explain it. Isn't the fact that there is a book contradictory to the statement?
    • The problem is that most incoming developers are coming from TMTOWTDI languages or are not initimitely familiar with OOP. Ruby's flexibility allows you to code in a somewhat C/Perl-esque "by the seat of your pants" fashion if you want, but it heavily encourages doing things in a very object-oriented test-driven way. Books and tutorials are necessary to beat this into the heads of incoming developers. An MVC framework is not a new idea and Rails is by no means the first, but it's the first to be picking up s
      • The problem is that most incoming developers are coming from TMTOWTDI languages ...

        Um, isn't Ruby TMTOWTDI? Granted people gravitate towards certain idiomatic ways of doing common things, but there is certianly more than one one, etc.

        Books and tutorials are necessary to beat this into the heads of incoming developers.

        Hey, great sales pitch. "Buy this book so we can beat some sense into your ignorant newbie head!"

        Serioulsy, an issue with Rails is that it is a DSL on top of Ruby; knowing Ruby i

        • Serioulsy, an issue with Rails is that it is a DSL on top of Ruby; knowing Ruby isn't enough (or, for that matter, even largely required), you have to learn the quirks and idioms of Rails, which (surprise) requires a book.

          Can you name an environment where that isn't true? Python, you also have to learn Zope. Java, you learn Hibernate (or whatever). Of course you could just learn PHP & code everything from scratch. Then you wouldn't need to learn anything else. Of course, you get orders of magnitude l
          • Of course you could just learn PHP & code everything from scratch. Then you wouldn't need to learn anything else. Of course, you get orders of magnitude less productivity.

            Or, get this wacky idea: Just learn Ruby and code everything from scratch. Then you wouldn't need to learn anything else. And still get extra productivity.

            There are indeed many good things in Rails, things that work best by offering a handy sublayer for common tasks without occluding the essential Rubyness of the code. But there

  • hmmm (Score:5, Interesting)

    by einer ( 459199 ) on Thursday June 16, 2005 @07:21PM (#12837042) Journal
    In short, Rails is a brilliant architecture, and Agile Web Development with Ruby on Rails is a great book.

    I believe that not grokking MVC detracts from the value of your review, particularly with respect to your opinion of the architecture of Rails. Without understanding MVC, you can have no understanding of the design decisions they made, and as such, no qualified understanding of the architecture itself.

    This was my only concern. Thanks for the review!
    • Re:hmmm (Score:3, Interesting)

      by Ridgelift ( 228977 )

      I believe that not grokking MVC detracts from the value of your review, particularly with respect to your opinion of the architecture of Rails. Without understanding MVC, you can have no understanding of the design decisions they made, and as such, no qualified understanding of the architecture itself.

      Yep, I admit fully I'm probably not qualified as others to review the book. But I can only give my opinion, and for a newbie who's played with other architectures and run into a big pile of messy code after

      • So since I readily admit my opinion isn't a qualified one, how about something from O'Reilly instead:

        I hate to be cynical, but O'Reilly are planning their own Rails books this summer. Not that they would hype something they didn't believe in ...

      • Which again [slashdot.org] raises the question of why Slashdot accepts these non-expert reviews.

        I'm not putting you down for writing it - and I think it would be a useful thing to read on a blog, or besides other reviews on a site like Amazon - but that this will be the only review of the book on Slashdot makes it a very bad decision to list it, in my opinion.

        • Because expert reviews are rarely written from the non-expert point of view.

          In this case, it's good to know that I can probably pick up this book, and without knowing much about either Ruby or the MVC design pattern, implement a clean web application that will be maintainable and extensible.

          I can get expert reviews elsewhere. I wouldn't think of consulting Slashdot for them anyway.
  • Wow (Score:5, Insightful)

    by aftk2 ( 556992 ) on Thursday June 16, 2005 @07:23PM (#12837053) Homepage Journal
    Could this review be more fawning, please?

    The appendices that cap off the book also provide the full tutorial source code, as well as a brief introduction to Ruby, the language that makes all the magic happen.
    In short, Rails is a brilliant architecture
    Agile Web Development with Ruby on Rails is a great choice, and will probably be the definitive book on the subject. The tutorial is probably the best I've ever read.

    God. That last one sounds like Napoleon Dynamite.

    A "beta" book, in PDF form, with typographical and technical errors, will probably be the "definitive book" about a brand-new framework? What a statement...

    Don't get me wrong - I haven't had much time to play with Rails, and as a web developer, I probably should, in order to keep my skills fresh. I may even like it. But this fervent, sycophantic praise - spurred on by the blogerati (flamesuit enabled) - seems premature, especially when there are many capable web application frameworks out there. In the future, it might even seem silly. After all, anyone want to admit to owning a copy of Oreilly's book about Slash?
    • Re:Wow (Score:3, Informative)

      by nacs ( 658138 )
      The tutorial really is one of the best I've ever read, spans 131 pages and walks through building a high quality app with an administration interface and unit testing thrown in.

      Many /.ers are seeing the 'beta' line and automatically equating it with 'crap'. The actual book, however, is excellent even in it's beta stages and is easily better than many of the non-beta technical books I own.

      This book is written primarily by Dave Thomas who wrote pretty much the definitive book on Ruby and who was kind en
    • A "beta" book, in PDF form, with typographical and technical errors, will probably be the "definitive book" about a brand-new framework? What a statement...

      It's been written by Dave Thomas who pretty much helped bring Ruby from Japan into the rest of the English speaking world, and DHH the guy who wrote Rails. It really doesn't matter if it is the best book in the future or not, only time will tell. Having said that, I'll stick by my statement.

      Don't get me wrong - I haven't had much time to play w

    • by ibbey ( 27873 ) *
      Have you ever read a few chapters of a long book, and already known that it was going to be a great book? This is one of those books. Even in it's beta, electronic form, is better then many technical books that I have bought.

      As for Rails itself, there's a resaon why so many smart people are fawning all over it. I STRONGLY recommend you try out Rails before you criticize. At least watch one of the demo videos on the homepage. Until you see it in action, you really can't really fathom how powerful it is. You
  • As I understand it, Ruby/Rails has got a lot of attention lately as it seems to be an easy to learn yet powerful way of creating web applications, for people that normally use php. However, while php is great for quick hacks, it really caters most to those who have never had any proper programming education, and is not very well suited to anything more advanced than a shopping cart. (No, this is not flamebait, it's fact. Sorry for offending some of you, I don't know how to put it otherwise.)

    So, my question
    • The business analysis: If you're working on high-end enterprise apps, or apps that demand a very long term investment, I'd say stick with JSP. Rails isn't there yet. If you're working on Web apps with a small(ish) development team and are mostly concerned with getting something out there that's secure, quick, and full featured quickly then Rails is, really, the only way to go.

      The coding analysis: Ruby has a lot of semantic advantages over Java. It's easier to read, has less syntactic salt, and encourages t
    • As I understand it (and I'm just starting to tinker with ROR) is that ROR is configured by convention, not by configuration file.

      If you use Struts, Spring, etc., you configure every action in mulitple XML files. You map everything around so that the application knows what to do. This means you must define knowledge about your application's architecture in multiple places. It will be in code and in several config files. This gets complicated fast.

      With ROR, the application code is in a folder called "app

    • is there anything in all that RoR buzz for those who actually have CS degrees

      Well, I realize that the main focus of CS degrees these days is either Java or C#, so perhaps you haven't heard of languages like Smalltalk or Lisp.

      Yes, I tend to agree with what you're saying about PHP, but the same doesn't apply to Ruby. Ruby is a language that CS grads can love, it's fully OO like Smalltalk and has:
      * mixins
      * closures
      * anonymous code blocks (which makes it very easy to define your own domain specific languag
  • by wernst ( 536414 ) on Thursday June 16, 2005 @07:35PM (#12837130) Homepage
    Dave Thomas [wendys.com] wrote this book?

    Talk about an active guy! He helps Colonel Sanders start a chicken business, then founds his own restaurant chain, then dies, THEN writes a book about Ruby on Rails?

    I'm clearly not doing enough with my life...

  • ... I find Ruby on Rails to be great!

    I have been using it for a few months, and although ActiveRecord is lacks a little of the flexibility of Hibernate, it is good enough for lots of database backed web applications. I like how easy it is to replace automatically generated scaffolding code with your own code, but the scaffolding code gets you started quickly.

    Also, Ruby is a fine programming language - it has just about totally replaced Python as my scripting language of choice. Using Ruby has also cut way
  • by AGTiny ( 104967 ) on Thursday June 16, 2005 @07:54PM (#12837270)
    If you're interested in cool web frameworks, but don't want to learn Ruby, you might be interested to know there is a similar framework available for Perl called Catalyst. It's very flexible but generally takes advantage of great database mappers like Class::DBI and template engines like Template Toolkit. Many cool things are ongoing in the Catalyst community, such as Class::DBI::Sweet, a new extension to Class::DBI providing very cool automatic joins (ala ActiveRecord) and object/resultset caching.

    Catalyst can be found at catalyst.perl.org [perl.org] or on CPAN [cpan.org].
  • by Chromodromic ( 668389 ) on Thursday June 16, 2005 @07:55PM (#12837272)
    I predict there will be basically two categories of posts about Rails.

    Either, one, that Rails is so amazing that after you use it sex seems laughably trivial by comparison, even and especially you count the production value -- one can, after all, only have one child (on average) using sex, but with Rails, dude, I HAD TEN.

    Or, two, that Rails is no big deal, it's just another MVC re-think, heck I rolled one of those myself one afternoon a coupla years back, yeah it ruled but, you know, I'm really into that Java thing now. Besides, Rails is no good for BIG projects, for that you need Hibernate and a crane.

    So I'll post one for the middle-of-the-road. Rails rules. I love it. I've reimplemented, in a week-and-a-half, a fairly large application that took me two months to do with Python. It's not a fair comparison because with Python I used Webware but did everything, like user management and logging, with no starting point, and also the first time around I wasn't as familiar with the problem domain.

    With Rails I used the Salted Hash Login Generator [rubyonrails.com] which got the basics of my user login and management done in one fell swoop, an hour or two of work. I also re-used the view code from the Python app.

    But the rest of it was fun. I enjoyed it. Things were done quickly and the API is awesome. ActiveRecord is not Hibernate -- yes, Javapeople, we know, we know -- but it's good. It's really good and super easy. And while there's some magic going on behind the scenes with Rails, it's not hard to understand at all.

    That said, yes, if you're an online payroll system for IBM, Rails won't cut it. There are flaws, but for day-to-day stuff, not too many. It's updated very frequently, too.

    My only complaint is the ubermensch of Rails, Dave Heinemeier, who, while smart, is also all too aware of it, and frequently shoots his blog [loudthinking.com] off about topics which go beyond Web frameworks and into areas of either glib tech-prejudice or, at times, more subtle see-how-smart-I-am dorkposts -- the most insufferable species of Geek.

    Otherwise, I strongly encourage anyone to check Rails out. It's great and a *lot* of other frameworks in other languages could stand to pay attention to the innovations in Rails. These innovations aren't so much technical epiphanies, as they are the meeting of many good ideas in one place, along with enthusiastic support and a lot of glue. Ruby's fun, too.

    Check out, also, the frameworks from other languages which are shamelessly stealing from Rails:

    Subway [python-hosting.com] (Python)
    Catalyst [perl.org] (Perl)

    • Four other frameworks shamelessly stealing from Rails:

      Castle Project [castleproject.org] works on .Net with Ajax support.

      Cake [sputnik.pl] is a Rails-like framework for PHP, and Biscuit [ripcord.co.nz] is another.

      Lest the Java folks feel left out, there's also Trails [java.net].
    • "Salted Hash Login Generator"

      Slightly flawed in that it uses a constant salt, meaning once a set of rainbow tables have been generated all your passwords are easily compromised.

      I had a patch to it that supported non-salted, statically-salted and dynamically salted passwords (upgrading on auth) without changing table schemas beyond the default 38 bytes. I don't have it to hand unfortunately, but it's not hard to do; just use pack() to b64 the hash, put in some random bytes next to it seperated from the ha
    • Either, one, that Rails is so amazing that after you use it sex seems laughably trivial by comparison

      Um, if sex is complex for you, I think you're doing something wrong.
      • ...but making it work rafter-rattlingly well every time can indeed be complicated. Not to mention very, very satisfying.

        Perhaps it would have been more accurate (if clumsier) to say that the context surrounding sex can be complicated.
  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Thursday June 16, 2005 @08:19PM (#12837416)
    RUBY! AJAX! ORGASM! Hit it with a RAIL!
    R!
    O!
    R!
    ROOOOOAAAAR!
    RUBY ON RAILS! So fucking awsome I gotta, ... I, OMFG!!!111!! I'm coming, I'm gonna, OMG ... say "I like your monkey!!!" SAY IT! - .... OOOOooooohhhh, Rubyajaxrails, yeaaaah!!
    I've got it! Yeah! I've got a vision, people, a vision!
    We're gonna have Ajax and we're gonna put it on Rails and it's all gonna be like Lucy in the Sky with Rubys.
    Oh my gosh am I seeing some shit....
    This is so awesome... ...and any Beta mindfart about it is like ten times ten Ajax orgasms!
    (And now for the real thing watch this post being modded +10 Insightfull)
    • This is so awesome... ...and any Beta mindfart about it is like ten times ten Ajax orgasms!
      (And now for the real thing watch this post being modded +10 Insightfull)
      I love how on Slashdot if you show any enthusiasm you're a mindless lemming, and if you're overly critical about anything (sans Microsoft) you're a biased ignoramus.
    • We're gonna have Ajax and we're gonna put it on Rails...

      RoR already does Ajax. There's a nice JavaScript library called Prototype that's integrated with RoR out of the box.

      I remember this level of hype surrounding many other things in the last 15 years; Linux, Apache, MySQL, Perl, PHP, Python, Java, JBoss, etc. The thing is most of them have lived up to the hype to some degree and now they're taken for granted.

      RoR is worthy of the hype. It eliminates bullshit in the web app stack. That means you, th
    • by account_deleted ( 4530225 ) on Thursday June 16, 2005 @10:09PM (#12837997)
      Comment removed based on user account deletion
  • Ruby vs Java (Score:4, Insightful)

    by nostriluu ( 138310 ) on Thursday June 16, 2005 @08:22PM (#12837429) Homepage
    Ruby sounds really interesting, but after all the language is just one aspect of development.

    I use Java (and parts of J2EE).
    Its too bad there's no truly free/open source runtime yet, but I'm sure that day will come soon.

    Another problem with Java is really too much choice. Sun's higher level solutions tend to be over engineered, so everyone and their uncle have designed their own complex framework for object persistance and session management, along with the mixed bag of JSRs. Thus you have Java advocates like Javalobby saying Ruby on Rails is a great framework, and all the best free CMSs are PHP.

    I am sure that Ruby on Rails makes it quick to put up a web site that supports database CRUD operations, but just like using Visual Basic to create forms, what do you have after that part is done?

    The reason I like Java is its maturity and community, as well as the rigidity of the language.

    Because of its multi vendor and open software support, you can find an open source or at worst free-as-in-beer library to do just about anything, and there's plenty of discussion about using all the components that exist.

    If you don't like Java's rigidity and verbosity, there are some nice improvements in JDK 1.5.

    From pre-1.5:

    void cancelAll(Collection c) {
    for (Iterator i = c.iterator(); i.hasNext(); ) {
    TimerTask tt = (TimerTask) i.next();
    tt.cancel();
    }
    }

    in 1.5:

    void cancelAll(Collection c) {
    for (TimerTask task : c)
    task.cancel();
    }

    Or you can execute Groovy, Jython, JRuby, etc in a JVM, or alongside PHP with JSR 223.

    I don't think execution speed arguments against Java are accurate any more, especially when comparing it to languages such as Ruby, Python and PHP, and I find the memory requirements to be easily manageable in typical situations (Firefox, alas, takes much more memory on my workstation).

    Creating a working application in any environment is fairly easy for anyone with sufficient training and experience, but unless you're a rare master, once you are at that plateau of a working app and you need to change it, the maturity and popularity of your environment become very important for support.

    I think hands down Java is the winner here with great tools like Eclipse, with great refactoring support and where you know even in large projects what is broken as you're working on code, as well as the large community for support.

    The portability of Java is also very good, you can become very OS agnostic (unless you need to get into a few aspects such as multimedia).

    Anyway, sorry to wax on, and I'm always trying to find out what other environments offer, but I don't think Java is given enough credit.

    • It's VERY dependent on what your app does, but if I've guessed correctly, your example would be something like this with Rails.

      def cancelAll
      TimerCollection.find(:id => params[:id]).tasks.each { |t| t.cancel }
      end

      Find a timercollection with a certain idea, then iterate through each of its tasks and cancel them. Ruby is more wordy than Java 1.5, but this aids readability.

      I don't think Java is given enough credit.

      You are probably right there.
    • Ruby sounds really interesting, but after all the language is just one aspect of development.

      Well, not exactly. Ruby is Rails. Most frameworks require a language, a templating engine and other plumbing to make it all work. Ruby on Rails is all Ruby. Even the templating are Ruby tags using ERb. You don't need to learn a "simple" templating language (which confuse web designers most of the time). There's no need to cheat by stuffing code in places where it shouldn't be (aka seperating the HTML fro

    • The point is that ROR is more agile then J2EE. Sure J2EE is more scalable then ROR but that scalibility is very expensive in terms of time to market. Go read any rational book or web site about J2EE development and they'll tell you the same thing, you need to have developers with tons of Java and J2EE experience before you even attempt to start a J2EE project. Once the project has started you need to very carefully design your app and divide your functionality amongst stateful, stateless and persistent bean

      • If you're referring to EJBs, you don't have to use them, and most people don't. "J2EE" to many people does mean EJBs, but you can use JSP and JDBC for the equivilent of the PHP world, or Java classes and some kind of lightweight (Spring) to heavy (EJB) kit depending on what you need to do.

        So you're left with a language with lots of history and support, which isn't a bad thing. You may have more code, but I'd be quite surprised if that doesn't have some advantages as well as you need to make finger grained
  • What (Score:2, Interesting)

    by smart.id ( 264791 )
    What the fuck is Ruby on Rails?
  • I'm about to write some web-based software in Python -- including the need for "user" accounts, etc. etc.. I'd like to have a lot of flexibility, but also not to have some massive beast (I've already written a prototype in Perl.) Why should I learn all this RoR stuff instead? Isn't it just another way to do cgi? I mean, I'm no guru here. Help me out, guys.
  • Zope (Score:3, Insightful)

    by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Thursday June 16, 2005 @08:56PM (#12837631)
    What Ruby on Rails wants to be when it grows up [zope.org].
  • RoR is interesting but in a high state of flux. Give it 6 months to a year unless you like migrating your applications every other week.
  • by bADlOGIN ( 133391 ) on Thursday June 16, 2005 @11:11PM (#12838351) Homepage
    I've had to look at Ruby On Rails due to decisions made by some of my agile team members. There's a number of important things to be aware of if you or someone on your team is seriously thinking about using RoR to replace Java web apps. Be forewarned, while these are my own extremely biased opinions, they are in no way uninformed:

    1.) Give up a decent IDE. The development tools are crap. Good luck trying to fire up a Ruby IDE, and set a breakpoint in WEBrick or Apache mod_ruby. You can't. Even if you hack around with the breakpoint command and include the debugger in the code you want to debug, the debugger is buggy and makes old skool commandline tools look sharp.

    2.) Bet the farm that RoR only deals with you 80% problem, and your requirements won't break how it needs the ActiveRecord pattern. ActiveRecord looses it's luster once things get complex (see http://www.theserverside.com/articles/article.tss? l=RailsHibernate [theserverside.com]).

    3.) How do you like your OO style? If it's from the Jacobson camp, you're in for a treat! Objects are just dumb repeats of database tables 1st and foremost. Oh sure, you can add methods to do that OO thing if you must, but that's not the true essance. If you believe true object nature comes from behavior and not data, (ala Yordon & Coad) you won't be comfortable here.

    4.) You're agile? You "get" test driven development? Give it up. RoR says you use a script. This hurts even more if you take issue with number 3 above. RoR rewards you for being database driven. Just define your scheme and all of your objects and a few controllers will get generated for you along with stub unit tests that pass by default. Just accept the required two line *Helper classes as well(yeah. TDD would have pushed me to create those).

    5.) More on testing: hope you like having to rely on populating test data into your database. We kept hearing you can mock your persistance, but even some of the experts we talked to couldn't show us how (folks who are paid to work on a RoR product). Sure, folks said dependancy injection via Needle, but we couldn't find jack out about it.

    6.)Speaking of database driven, that is a greenfield project you have with no legacy concerns and absolutely no complex O/R mapping requirements, you're starting RoR on right? No?!?! That's ok. just shoehorn RoR with updateable views or change your schema so that ID's are done the way ActiveRecords likes. That's no problem for your existing aps, is it?

    7.)That had better be an OpenSource database you're using. It's not unheard of to "enjoy" a broken release for packages like ActiveRecord when the developers don't have access to Oracle or SQL Server. This happened to us and RoR was broken for about a week between releases in the 0.9 to 0.10 range. Yeah. That was a "release". Not CVS, not alpha or beta. Release. On the upside, we did patch ourselves, so "go OpenSource".

    If the Rails fanboys want to mod me down, have at it. I stand by my overall opinion. Keep in mind, I have no issue with Ruby itself. In fact, it stands to give Java a real run for it's money. RoR on the other hand, is immature and over-hyped at best, and a rat's nest of garbage at worst.

    • I agree with most of these assertions, although I actively use Ruby for more and more of my development code and have moved over several application to Ruby on Rails. There is a "not ready for primetime" feel to it, but it is because it's still an immature product. After all it still hasn't surpassed 1.0 revision status!

      For IDE choices I personally use Eclipse with the Ruby plug-in now, although I have used FreeRIDE in the past and some other alternatives (like WideStudio, which is an IDE that is distribut
  • I really enjoyed this book.

    I'm a WebObjects developer that is always looking for something new and RoR so far seems great.

    While there are clearly still some things that could be improved (especially in the ActiveRecord ORM), for being less than a year old this thing is VERY far along.

    The opposite of something like Struts, you can feel that RoR came from a real application instead of design-by-committe.
  • by Enahs ( 1606 )
    I gave RoR a shot, and never got past the head-scratching stage. It did, however, get me interested in Ruby. I never grokked Perl, thought Python was a neat idea, but have been using Ruby any time I get handed an "impossible" task at work.
  • Ok so show me a big app that uses ROR, not that I am going to bother learning Ruby since it offers nothing that I cannot do with python.
    • Check here [rubyonrails.com] for a list of groups actively using RoR in production or developing with RoR. I know there are no Yahoo!s, Googles, or Amazons on the list.

      As for Ruby offering you nothing that you can't do with Python I would argue that you can do things simpler, more concise, and more logically in Ruby. The code is cleaner so if you are picking up the code for something you developed six months ago things should fall into place easier.

      IMHO Ruby == Prettier and more OO than Perl and Ruby == More powerful than

BLISS is ignorance.

Working...