Your SlideShare is downloading. ×

UT on Rails3 2010- Week 1

1,047

Published on

This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at …

This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/

Published in: Self Improvement
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,047
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
33
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide















  • Transcript

    • 1. Rails Summer of Code Week 1 Richard Schneeman - @ThinkBohemian
    • 2. Rails - Week 1 • Rails Architecture • MVC (Model View Controller) • ORM (Object Relational Mapping) • RESTful (REpresentational STate) • Ruby • Versus Rails • Is Object Oriented Richard Schneeman - @ThinkBohemian
    • 3. Rails Architecture • Terminology • DRY • Convention over Configuration • Rails Architecture • MVC (Model View Controller) • ORM (Object Relational Mapping) • RESTful (REpresentational State Transfer) Richard Schneeman - @ThinkBohemian
    • 4. DRY Don’t Repeat Yourself Reuse, don’t re-invent the... Richard Schneeman - @ThinkBohemian
    • 5. Convention over Configuration Decrease the number of decisions needed, gaining simplicity but without losing flexibility. Richard Schneeman - @ThinkBohemian
    • 6. Model-View-Controller • Isolates “Domain Logic” • Can I See it? • View • Is it Business Logic? • Controller • Is it a Reusable Class Logic? • Model Richard Schneeman - @ThinkBohemian
    • 7. Model-View-Controller • Generated By Rails • Grouped by Folders • Connected “AutoMagically” • Models • Views • Controllers • Multiple Views Per Controller Richard Schneeman - @ThinkBohemian
    • 8. Object Relational Mapping • Maps database backend to ruby objects • ActiveRecord (Rail’s Default ORM) >> userVariable = User.where(:name => "Bob") Generates: SELECT "users".* FROM "users" WHERE (name = 'bob') >> userVariable.name => Bob Richard Schneeman - @ThinkBohemian
    • 9. Object Relational Mapping • >> userVariable = User .where(:name => "Bob") models/user.rb class User < ActiveRecord::Base end the User class inherits from ActiveRecord::Base Richard Schneeman - @ThinkBohemian
    • 10. Object Relational Mapping • >> userVariable = User. where(:name => "Bob") where is the method that looks in the database AutoMagically in the User Table (if you made one) Richard Schneeman - @ThinkBohemian
    • 11. RESTful REpresentational State Transfer • The state of the message matters • Different state = different message “You Again?” “You Again?” Richard Schneeman - @ThinkBohemian
    • 12. RESTful REpresentational State Transfer • Servers don’t care about smiles • They do care about how you access them • (HTTP Methods) • GET • PUT • POST • DELETE Richard Schneeman - @ThinkBohemian
    • 13. RESTful REpresentational State Transfer • Rails Maps Actions to HTTP Methods • GET - index, show, new • PUT - update • POST - create • DELETE - destroy Richard Schneeman - @ThinkBohemian
    • 14. Ruby Versus Rails • Ruby - Is a programming Language • Like C# or Python • Can be used to program just about anything, • Rails - Is a Framework • Written using Ruby • Provides common web functionality Richard Schneeman - @ThinkBohemian
    • 15. Questions? Richard Schneeman - @ThinkBohemian

    ×