6 things to try in Rails this year

By | | Ruby on Rails Tutorials & Articles

7

It seems that blog posts in the first couple of weeks of the new year (happy new year by the way) follow the “x things to do this year” meme as a virtual homage to new years resolutions. Never one to buck a trend, I have prepared this short list of things you should try in Ruby and in Rails – I hope to cover each topic in more detail over the next couple of weeks.

  1. Install Rails: This is aimed at those of you out there that haven’t tried Ruby on Rails yet. Jump in – have a go, there are plenty of resources out there, and it is fairly easy to install regardless of your platform
  2. Upgrade to Rails 2.0: I have covered what’s new in Rails 2.0 in a number of my previous posts, and upgrading isn’t really THAT difficult if you follow the steps and fix any deprecation notices.
  3. Write a plugin: Plugins allow you to re-use common patterns without having to resort to the dreaded cut-and-paste keys. Rails has a built in plugin generator that gives you the skeleton code, all you need to do is to mix-in the right modules – oh, and write the code…
  4. Try out RESTful routes: RESTful Rails have been around for a while now, but many of the tutorials around the net are still CRUD based, so if you are a Rails beginner, you might not have tried them out yet.
  5. Use Ruby as your scripting language: Because Rails does such an excellent job of doing the hard work, it is very likely that you have never had to manually connect to a database or read the contents of a directory or performed other mundane tasks in Ruby. If you have to do any scripting, instead of PERL or Python, use Ruby – it will help you better understand the nuances of the language.
  6. Refactor your code the Ruby way: If you have come from other C-like languages (such as PHP or Java) you would
    be used to the idioms from that style of coding. Try refactoring your code to use blocks instead of for loops, or using inline if statements – you can squeeze a lot into one line in Ruby, see how far you can push it. Again, this is a great exercise to learn the language.

Go on, try them out – the new year is a great time to try something new!

Written By:

Myles Eftos

Myles Eftos is a Perth-based web developer that jumped on the Rails express and never looked back. He is the event co-ordinator for the Australian Web Industry Assocation which explains why most of their events are at the pub near his house.

 

{ 7 comments }

aranwe January 18, 2008 at 5:03 am

You can also try Ryan Bates’ Railscasts. He covers pretty well everything mentioned above in short, easy-to-follow installments.

Fenrir2 January 10, 2008 at 5:13 am

Another thing to try: Hobo. http://hobocentral.net/
Allows you to create apps even faster. You define the models and wow, there you have a fully functional site. A few tweaks here and there and you’re finished.

madpilot January 9, 2008 at 10:28 pm

Thanks Jim, those links are great.

Jim Neath January 9, 2008 at 8:22 pm
chris ward January 9, 2008 at 7:43 pm

links would be extremely handy :)

madpilot January 9, 2008 at 5:01 pm

Hi Wingman,

Yeah, I’ll be writing a follow up post with a tutorial in the next week or too, so don’t fret too much. It’ll have all the links in it.

WingMan January 9, 2008 at 4:58 pm

Hi, Myles

Why don’t you add some links to your list to help make it actionable? For example, linking to the rails download page or a tutorial for installing rails, or linking to a RESTful tutorial.

That would help us n00bs to use this list as a reference point in learning more about ruby and rails.

Comments on this entry are closed.