Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby on Rails Talk

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Ruby on Rails Talk

Avatar for defconomicron

defconomicron

June 26, 2012
Tweet

Other Decks in Programming

Transcript

  1. Ruby on Rails A demonstration of building a Ruby on

    Rails application from start to finish.
  2. What is Ruby on Rails? • An open source full-stack

    web application framework • Ruby is a general purpose programming language which existed more than 10 years before Rails • Ruby on Rails is often called “Rails”
  3. David Heinemeier Hansson • Author of Ruby on Rails •

    Framework released as open source July 2004 • Originally written for Basecamp • 37signals
  4. Features • Ability to retrieve information from the web server

    • Query the database using ActiveRecord ORM layer • Dynamic finders • Scoping data • Render templates • Use routing system independent of web server • Organize application code using MVC architecture pattern • Database migrations • Scaffold controllers • Form validations
  5. Model • Class definition of an object • Model name

    maps to table in database • Rails convention when naming a model
  6. Controller • Responds to external requests from the web server

    to application. • Queries model for information and passes information on to the view • Controller action will not be accessible by an external request if it is not mapped to the Rails router.
  7. View • Presentation layer used to output the results of

    the external web request. • Typically an erb file that outputs html at run- time.
  8. Convention over Configuration • Developer only needs to specify unconventional

    aspects of the application. • Rail's conventions lead to less code and less repetition.