RoR

March 11, 2008

Last night I decided to have a break from the code. So I decided to read up on RoR. Evan had been harping on about how glorious it is so I thought I would give it a shot. I had a look at this intro tute, decided to print it out and ended up staying up all night reading the entire thing. It seemed the more I read on, the more I came to realise the similarities of RoR to the CodeIgniter php framework that I have come to love. The first impressions I get of RoR is that it has a strong sence of an application development environment about it. The OOP, the automation, the testing, its all just too easy. A little too easy some might say. Anyway, being a developer based predominantly on php & javascript there were a few things that stood out to me which were:

  • The forced OOP
  • Ruby’s quick & simple syntax
    • Method dot notation & no requirement to tack on empty parentheses after a method call that has no parameters.
    • A method automatically returns the return value of the last line of code in the method.
    • The ! and ? method notations.
    • Shorthand setter method notation. eg: car.mileage = 5000 instead of car.mileage(5000)
    • No ++ or — operators 😦
    • Shortcut string declearations that use quotes. eg: %Q(Arnie said, "I'm back!")
    • Array decleration of just using brackets. eg: service_mileage = [5000, 15000, 3000]
    • Shorthand string array declearation. eg: %w ( red green blue black )
    • Hashes
    • Symbols (like a string literal but with basic functionality)
    • Blocks! (like prototype .each())
  • The automated 3 environments (development, testing, production)
  • MVC architecture
  • ActionPack including ActionRecord (which I love in codeIgniter)
  • ActionMailer (rail’s generic email handler)
  • Code generation
  • Testing & Debugging

I think my next little web app that I try will be in RoR 🙂

Advertisements

My server is down again today which is pretty annoying but not much worse than the it’s usual sluggish responsiveness. I just read here that if I cancel within 97 days of registering that I could get a full refund for my annual fee! I think that leaves me a week so I gotta decide soon.

Im thinking of switch to a VPS setup. That way at least if the server is down, it will most probably be my fault. I haven’t had a big look around but what i’ve read about vpslink is been good so far. Not much came up on the i-hate-vps-search or their parent company, when compared to the dreamhost equivalent lol. Not that im putting too much weight on that simple analysis.

The good thing is that I don’t have any live sites at the moment, but a couple very near to production, so I am wary of that. Another huge factor is my level 1 Tauren Shaman experience points when it comes to linux & its command line… but really, how hard can it be right? *cough* i mean, im by no means reinventing the wheel, or the spoke for that matter. Im sure there will be a vast resource of newbie friendly tutes out there.

Oooh today I also decided to have a wee dabble with Ruby on Rails. I’ve seemed to have got a handle of php and feel like broadening my horizons and I thought RoR was a great choice.

[edit]& lol! i just read that RoR is released standard on Mac OSX Leopard! I already wanted a Mac Book, now I want to sell shit to get 1[/edit]