Ruby on Rails Course 2009

Ruby on Rails

Web development that doesn’t hurt

Ruby on Rails is an open source open source web framework that’s optimized for programmer happiness and sustainable productivity.

It lets you write beautiful code by favouring convention over configuration.

Who’s behind it?

  • Rails was created in 2003 by David Heinemeier Hansson
  • Has been extended since by over 1400 contributors
  • Has a vibrant ecosystem

A few facts

  • Intended for Agile development
  • Can be used for extremely rapid development
  • Uses a Model View Controller architecture (MVC)
  • Convention over Configuration
  • Don’t Repeat Yourself (DRY)
  • Several different servers and deployment strategies available
  • Database abstraction!

MVC

  • Model: a representation of the application data
  • View: renders the user interface
  • Controller: process incoming requests, get data from models to views

Directory Structure

Some of the Rails directories.

  • app/ – Controllers, models, and views
  • config/ – Configuration files
  • db/ – Database schema and migrations
  • lib/ – Extended modules
  • log/ – Logfiles
  • public/ – Static files (images, stylesheets, javascripts)
  • script/ – Scripts provided by Rails
  • vendor/ – Third party code (plugins, etc…)

Now lets write a Rails app!