Please create an account to participate in the Slashdot moderation system

 



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?
  • 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 ) on Thursday June 16, 2005 @07:20PM (#12837028) Journal
      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.
  • by Blitzenn ( 554788 ) * on Thursday June 16, 2005 @07:15PM (#12836998) Homepage Journal
    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?
    • Re:Hard to believe (Score:3, Insightful)

      by Peter Cooper ( 660482 ) on Thursday June 16, 2005 @07:20PM (#12837030) Homepage Journal
      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 such novice coders. Tutorials are essential. When I started Rails eight months ago, there was no third party documentation or tutorials.. and I'm still correcting my bad habits even now.

      And, well, basic documentation is necessary everywhere. People know they shouldn't kill each other or commit adultery, yet billions around the world still keep a Bible/Koran/Torah handy.
      • by JamesOfTheDesert ( 188356 ) on Thursday June 16, 2005 @11:11PM (#12838348) Journal
        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 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.

        How agile. Adapt yourself to fit the framework.

        • by ibbey ( 27873 ) * on Friday June 17, 2005 @02:24AM (#12839248) Homepage
          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 less productivity.

          Rails is fairly easy to learn, but like any other platform, it does have a learning curve. But with Rails or any similar framework, the question to ask is whether the productivity gains the framework will provide outweigh the investment in learning it. With Rails, I can almost guarantee you that the answer is yes. It's certainly not right for every project, but for those that it's right for (many if not most web apps fall into its domain) it will give you huge productivity gains.
          • by JamesOfTheDesert ( 188356 ) on Friday June 17, 2005 @03:13PM (#12845089) Journal
            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 are also things that enforce a distinctly Rails idiom, which takes you away from Ruby idioms. It's increasingly become a kitchen sink framework (e.g. what's with all the JavaScript/DHTML macros? Why couple the client to the server?)
  • 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 ) on Thursday June 16, 2005 @08:03PM (#12837334)
      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 awhile, I can say I haven't experienced this with Rails. So while I might not understand exactly why Rails helps keep things neat and tidy, I can say what I personally have experienced. Or another way, I can't tell you why Mozart was a musical genius, all I know is I recognize that he is based on what I've heard.

      If it helps, let me change my statement: In short, Rails is a really, really good architecture 'cause it helps me keep develop code faster and cleaner than anything else I've used, and Agile Web Development with Ruby on Rails is a great book because even newbies can understand it.

      So since I readily admit my opinion isn't a qualified one, how about something from O'Reilly instead: [oreilly.com]
      Ruby on Rails is astounding. Using it is like watching a kung-fu movie, where a dozen bad-ass frameworks prepare to beat up the little newcomer only to be handed their asses in a variety of imaginative ways. I've got David Heinemeier Hanson giving a session, tutorial, and keynote. That's how much I love "convention over configuration" and the other philosophies behind Rails. Rails shows us a very interesting future for web applications, and is a great example of innovation from within the open source community.
      • by JamesOfTheDesert ( 188356 ) on Thursday June 16, 2005 @11:15PM (#12838363) Journal
        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 ...

      • by BarryNorton ( 778694 ) on Friday June 17, 2005 @06:19AM (#12839926)
        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.

        • by Black Perl ( 12686 ) on Friday June 17, 2005 @10:16AM (#12841224)
          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 ) on Thursday June 16, 2005 @07:33PM (#12837116) Journal
      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 enough to contribute the first edition of the book to the Ruby community (you can read it online here [phrogz.net]).
    • by Ridgelift ( 228977 ) on Thursday June 16, 2005 @09:42PM (#12837871)
      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 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.
      Yep, you're right, tomrrow I might be bright red with embarassment over my enthusiasm. Frankly, I don't really care. I've been gushing about Rails for awhile simply because I did perl, PHP, and Python and was frustrated by all of them. I'm sure there will be barbs in Ruby on Rails too (there always is). But I haven't had this much fun programming in over 20 years. Programming is fun again - that's why I really like Rails, and the book continues to make it even more fun.
    • by ibbey ( 27873 ) * on Friday June 17, 2005 @01:00AM (#12838928) Homepage
      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're right, there are numerous other capable frameworks out there, but once you see Rails in action, I guarantee you'll be impressed. Maybe not enough to switch, but at least you'll understand what all of the excitement is about.
  • by jtogel ( 840879 ) <julian@togelius.com> on Thursday June 16, 2005 @07:25PM (#12837068) Homepage Journal
    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 is: is there anything in all that RoR buzz for those who actually have CS degrees and usually do web development with JSP/servlets? Is RoR in any way better than Java, or just easier?
    • by Peter Cooper ( 660482 ) on Thursday June 16, 2005 @07:31PM (#12837107) Homepage Journal
      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 test-driven development a lot more. It's also easier to migrate to from other languages, and most RoR coders are very recent migrants from either Java, PHP or Perl. RoR is easier than Java, and in many cases this would mean "better", but... "better" is highly subjective. I'd still say Java is preferable at enterprise level, but Rails more than has its place, and kicks Java's butt when it comes to rapid, reliable development with a small team.. but Java.. it's all about the enterprise.
    • by jarich ( 733129 ) on Thursday June 16, 2005 @07:48PM (#12837223) Homepage Journal
      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". Their are subfolders for "model", "view" and "controllers". (These may just be the defaults that ROR gives you when you ask it to create your new application's skeleton.)

      If you want a controller called "say", you name it "say_controller.rb" and ROR knows it's a controller. So if something asks for a controller called "say", it finds it and runs it.

      The idea is that by using clear, well-defined conventions the app server knows how to handle your code. No redundant declarations and mappings.

      I'm probably grossly misrepresenting the framework with this short blurb... Check out the Rails homepage for more...

    • by Colonel Panic ( 15235 ) on Thursday June 16, 2005 @08:47PM (#12837571)
      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 languages - in many ways RoR is a domain specific language built on Ruby + code generation)
      * it's very easy to extend with C code.
      * some functional elements
      * continuations
      * threads

      You're right about PHP, but
      Ruby borrows heavily from Smalltalk and Lisp/Scheme (and a bit from Perl as well, I must admit, but in general they are the good/pragmatic parts).

      As far as whether or not RoR is 'better' than Java or not, I'd say it's very different from Java. Ruby is dynamically typed and that can help boost productivity and makes code reuse very easy. I suspect that this is largely what makes people more productive in Ruby than they are in Java. Will RoR replace Java/Struts/J2EE/etc? Probably not in large corporate shops, but in small to medium sized shops RoR is very compelling.
  • 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...

  • by MarkWatson ( 189759 ) on Thursday June 16, 2005 @07:54PM (#12837265) Homepage
    ... 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 down on my use of Common Lisp and Scheme - I miss the raw performance of compiled COmmon Lisp code, but Ruby is generally fast enough for me.

    I bought the PDF version (and physical book when it is available) of Agile Web Development with Rails - nice book.

    -Mark
  • 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)

  • 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)
  • 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.

    • by Peter Cooper ( 660482 ) on Thursday June 16, 2005 @08:47PM (#12837570) Homepage Journal
      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.
    • by Ridgelift ( 228977 ) on Thursday June 16, 2005 @11:39PM (#12838506)
      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 from the business logic), because it's just as easy to put it where it's supposed to be.

      Ruby on Rails is still very, very new. All the hype can lead one to think it's a replacement for everything - it's not. Java is a mature platform, and should be used for more critical scenarios. But Java was where Ruby on Rails is. And as it continues to mature, it will only become more viable in those situations where mature frameworks are required.

      Besides, Rails is fun. And programming that's fun is more productive than programming that's work.
    • by killjoe ( 766577 ) on Friday June 17, 2005 @02:28AM (#12839259)
      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 beans.

      Whatever advantages J2EE has over ROR (or anything else for that matter) come at the cost of increased development time, and yes even increased maintenance due to the complexity of architecture and increased codebase.

      So the question is what if you don't need that fabled scalibity or what if you don't know if you will need it because you don't know if your web site will ever become popular? Do you go the slow, bloated way or do you choose a more agile toolset?

      Having said all that, it turns out that the scaliblity of your database ends up being the limiter for languages like PHP and Ruby. As long as you can keep session state in the database it's easy to round robin the apache web servers.
      • by nostriluu ( 138310 ) on Friday June 17, 2005 @09:38AM (#12840815) Homepage

        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 changes to your application, and this is where the refactoring and constant state awareness comes in through language features and tool support. (although these features are less available in the JSP world).

        Anyway, I'm not digging my heels in against ROR, just stating there's more to development than getting an app off the ground, and Java offers quite a lot of support (and diversity) along the way.

        Yes, decent design is required. I don't think any framework is going to save you from requiring experience and knowledge.
  • What (Score:2, Interesting)

    by smart.id ( 264791 ) <jbd AT jd87 DOT com> on Thursday June 16, 2005 @08:29PM (#12837465) Homepage
    What the fuck is Ruby on Rails?
  • by sdedeo ( 683762 ) on Thursday June 16, 2005 @08:34PM (#12837503) Homepage Journal
    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].
  • by n3bulous ( 72591 ) on Thursday June 16, 2005 @09:00PM (#12837654)
    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 distributed alongside full installations of Ruby, Python, and Perl). If FreeRIDE isn't your cup of tea check out Eclipse. It works for me at least.

      And as for the database driver issues there are likely some problems resident in the DBI version that's being used. I personally connect to MSDE and MSSQL instances without issue using RoR 0.9.1.

      Let's check in with RoR a year later and see where things stand. I think people are excited but a little prematurely so...
  • by Mad Browser ( 11442 ) on Thursday June 16, 2005 @11:20PM (#12838386) Homepage
    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 ) on Friday June 17, 2005 @12:29AM (#12838763) Journal
    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.
  • by codepunk ( 167897 ) on Friday June 17, 2005 @08:37AM (#12840429)
    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.
    • by gregarican ( 694358 ) on Friday June 17, 2005 @09:12AM (#12840663) Homepage
      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 Python

Waste not, get your budget cut next year.

Working...