The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
RubyGem of the Month - Rails

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chad Fowler

Posts: 408
Nickname: chadfowler
Registered: Apr, 2003

A programmer, musician, and language addict.
RubyGem of the Month - Rails Posted: Aug 16, 2004 8:05 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Chad Fowler.
Original Post: RubyGem of the Month - Rails
Feed Title: ChadFowler.com
Feed URL: http://feeds2.feedburner.com/Chadfowlercom
Feed Description: Best practices, worst practices, and some generally obvious stuff about programming.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Chad Fowler
Latest Posts From ChadFowler.com

Advertisement
I’ve decided to highlight Rails this month, because it’s remarkably boring.

That’s right: Boring. Even David Heinemeier Hansson (its author) agrees.

I started writing a little web application for my other non-profit to put Rails through its paces. Armed with experience, let me step you slowly through its ever-so-boring pieces:

  • Installation is a total snoozer.
          [chad@mymachine]$ sudo gem install rails
          Attempting local installation of 'rails'
          Local gem file not found: rails.gem
          Attempting remote installation of 'rails'
          Install required dependency rake? [Yn]   y
          Install required dependency activerecord? [Yn]   y
          Install required dependency actionpack? [Yn]   y
          Successfully installed rails, version 0.6.0
    
          [chad@mymachine]$ mkdir -p ~/code/ruby
          [chad@mymachine]$ rails ~/code/ruby/mynewsite
          [chad@mymachine]$ cd ~/code/ruby/mynewsite
          [chad@mymachine]$ public/dispatch.servlet
          [2004-08-16 22:34:15] INFO  WEBrick 1.3.1
          [2004-08-16 22:34:15] INFO  ruby 1.8.1 (2003-12-25) [i686-linux]
          [2004-08-16 22:34:15] WARN  TCPServer Error: Address family not supported by protocol - socket(2)
          [2004-08-16 22:34:15] INFO  WEBrick::HTTPServer#start: pid=21242 port=3000
    

Not only did this install Rails and all of its dependencies (using RubyGems, of course), but the last little bit setup a new Rails workspace with everything I needed to actually run a Rails application and then started it up with Webrick. Where are all of the XML config files that I love so much to squint at?

  • Writing database code is even worse. For the basics, you don’t have to do any coding. What kind of sick mind was behind ActiveRecord anyway? How are we programmers supposed to stay employed if there’s no work for us to do?
  • Gluing this all together to get an end-to-end web application working is the biggest non-event yet. Roughly:
          scaffold :tablename
    

That sets up "scaffolding" which creates (in the runtime environment) controller, view, and model code to fully manipulate the table that you point to. In case you missed it (it was quick), here it is again:

        scaffold :tablename
  • The most frustratingly boring part of all of this is the documentation. David’s got videos, wikis, tutorials and demo apps (all on www.rubyonrails.org), which means I didn’t get the fun of having to wade through Rails’ source code every time I wanted to implement a new feature for my web application.

Despite being arguably the most boring web framework I& 1000 #8217;ve ever seen, a lot of people seem to be coming to Rails from all over the place. Even the DotNet and Java guys, who definitely don’t seem to like being bored with nothing to do (All that Static Typing leads to lots of Typing) seem to be coming around to Ruby-land as a result of Rails.

I hear there are talks about porting this thing to languages like Python and TCL (Java, too? Is it possible in Java?).

Thankfully, though Rails itself is boring, it stays out of the way, and you can do really interesting things with it.

I hear that this is destined to be one of the more interesting examples…

Read: RubyGem of the Month - Rails

Topic: RubyConf.new(2004) is Taking Registrations Previous Topic   Next Topic Topic: I'm willing to code Ruby... because of Rails

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use