Intro to Ruby On Rails

754 views
624 views

Published on

Presentation given in-house to Westgate Resorts. Mostly this included additional examples.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
754
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Intro to Ruby On Rails

  1. 1. Ruby on Rails By Adam Fortuna
  2. 2. Language } Ruby On Rails } Framework
  3. 3. Ruby Code Sample # Output quot;Hello World! quot; say = quot;Hello World!quot; puts say # Output quot;HELLO WORLD!quot; say['hello'] = quot;Hello World!quot; puts say.upcase # Output quot;Hello again!quot; # five times say = quot;Hello again!quot; 5.times { puts say }
  4. 4. hello_world.rb
  5. 5. Ruby on Rails (RoR) Accept incoming requests Process Forms Read/write to DB Validation Output HTML, Email, XML and more Unit, Functional and Integration Tests Restrict Access
  6. 6. CoC Convention Over Configuration
  7. 7. DRY Don’t Repeat Yourself
  8. 8. Rails Parts Controller Model View Start of all requests Access to database Web pages Form input Real world Objects Emails (Hotel, Resort, etc) What view is called Stylesheets Validation Which layout is used (Hotel.valid?) Javascript Access DB through Model Additional methods (User.full_name) Restrict Access (administrator only action?) Before hotel save? After hotel Create?
  9. 9. rails hotelmanager
  10. 10. Rake Create or destroy database Migrate database forward or back Generate documentation Run tests Deploy See stats rake --tasks
  11. 11. ActiveRecord An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data. - Wikipedia

×