1 / 13

Ruby on Rails Tutorial

Ruby on Rails Tutorial. Peter Mosca April, 2007. Ruby History. Invented 12 years ago in Japan by Yukihiro Matsumoto Spent first 5 years in Japan Experienced tremendous growth in international community since 2000. What is Ruby?.

Télécharger la présentation

Ruby on Rails Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ruby on Rails Tutorial Peter Mosca April, 2007

  2. Ruby on Rails Tutorial Ruby History • Invented 12 years ago in Japan by Yukihiro Matsumoto • Spent first 5 years in Japan • Experienced tremendous growth in international community since 2000

  3. Ruby on Rails Tutorial What is Ruby? • Ruby is a dynamically typed OO scripting language similar to Perl and Python • Simple syntax • Principal of Least Surprise (POL) • Advanced language features • Scales better than most languages • Well-established and robust

  4. Ruby on Rails Tutorial Ruby on Rails History • Developed by David Heinemeier Hansson in 2004 • Extracted from the Basecamp project

  5. Ruby on Rails Tutorial Ruby on Rails • “Ruby on Rails is a framework that makes it easier to develop, deploy, and maintain web applications” • Dave Thomas, author of The Pragmatic Programmer

  6. Ruby on Rails Tutorial Ruby on Rails • Rails is framework, written in Ruby, for developing database-backed web applications • Open Source • “Full-Stack” framework

  7. Ruby on Rails Tutorial Opinionated Software • Trade flexibility at the infrastructure level to gain flexibility at the application level • Designed for the 98% solution, not the 99.9% • Push best practices at no extra cost • Quick, but not dirty

  8. Ruby on Rails Tutorial Rails is Opinionated • Convention over Configuration • DRY principal • Generate boilerplate code • Get it working quickly, then evolve it • Rails makes “best practices” assumptions • MVC pattern, Unit tests, 3 databases

  9. Ruby on Rails Tutorial Rails is Opinionated • MVC: Model View Controller pattern • Decouples the domain, presentation, and workflow • 3 Separate Databases • Development • Test • Production

  10. Ruby on Rails Tutorial Active Record • “Database Wrapping” instead of “Database Mapping” • Each active record object represents a row in a table • Each record object has CRUD methods for database access

  11. Ruby on Rails Tutorial Adds attributes automatically, based on the columns in the database Adds relational management through a custom internal language Naming convention allow database to discover specific fields Schema migration “baked in” Rails Active Record

  12. Ruby on Rails Tutorial What’s Driving Rails Use? • Rails is fun • Rails is powerful • Rails development is fast!

  13. Ruby on Rails Tutorial Rails vs J2EE

More Related