Architect Corner

"Transforming Thoughts to Code"

All | Java | Enterprise | Notes | Links | Web 2.0 | Ruby

20051101 Tuesday November 01, 2005

Ruby on Rails : Achieving Web 2.0

check out this link for background on ruby and rails. Don't Repeat Yourself (DRY) is the mantra of rails. If you want to get started on rails, you need to get started first on ruby. Ruby Gems are the common reusable frameworks on rails. I got started on basic ruby first, it is a interesting language with different constructs.Moving from basic ruby to rails is a good (rather obvious) path. There is lot of material available on internet and there is a book available online.Attached below is the sample code and the rails framework diagram


class Die
  def initialize
    #  I'll just roll the die, though we
    #  could do something else if we wanted
    #  to, like setting the die with 6 showing.
    roll
  end
  def roll
    @numberShowing = 1 + rand(6)
  end
  def showing
    @numberShowing
  end
end
puts Die.new.showing

( Nov 01 2005, 11:46:58 AM EST ) Permalink Comments [1]




This is a personal weblog, I do not speak for my employer.