Your SlideShare is downloading. ×
0
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Rails and Resources - RailsGirls Leiden
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Rails and Resources - RailsGirls Leiden

131

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
131
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
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 and Resources Bart Zonneveld
  • 2. Bart! Dean
 Sjoerd! Niels! Programmer Designer Programmer Project Lead http://madebyhiro.com
  • 3. Uitzending Gemist ± 600.000 visitors / day ± 4.000 req / min (10k peak) ! ! ± 700.000 videos / day 230 ms avg response
  • 4. Amazon.com! Let’s buy a book about Ruby on Rails
  • 5. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books
  • 6. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book
  • 7. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book
  • 8. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart
  • 9. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books
  • 10. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book
  • 11. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book
  • 12. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book • Put the book in my cart
  • 13. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book • Put the book in my cart • Get the contents of my cart
  • 14. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book • Put the book in my cart • Get the contents of my cart • Delete a book from my cart
  • 15. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book • Put the book in my cart • Get the contents of my cart • Delete a book from my cart • Post money to Amazon
  • 16. Amazon.com! Let’s buy a book about Ruby on Rails • Get a list of all books • Get a specific book • Put the book in my cart • Get the list of all books • Get a specific book • Put the book in my cart • Get the contents of my cart • Delete a book from my cart • Post money to Amazon
  • 17. Amazon.com! Let’s buy a book about Ruby on Rails Verb Noun GET books PUT cart DELETE book POST money
  • 18. Amazon books Books! ! ! ! ! /books! ! Best sellers /books/best_sellers! ! Hardcover /books/hardcover Sale /books/sale Top rated /books/top_rated
  • 19. Top rated books! /books/top_rated
  • 20. Top rated books! /books/top_rated.json ! {
 'books' : [
 ...
 {
 id: '3487',
 title: 'Agile Web Development with Rails 4',
 authors: [ 'Sam Ruby', 'Dave Thomas', 'David Heinemeier Hansson' ],
 price: '$ 26.37',
 rating: '4.2'
 }
 ...
 ]
 }
  • 21. Top rated books! /books/3487.json ! {
 id: '3487',
 title: 'Agile Web Development with Rails 4',
 authors: [ 'Sam Ruby', 'Dave Thomas', 'David Heinemeier Hansson' ],
 price: '$ 26.37',
 rating: '4.2'
 }
  • 22. Amazon.rb ! Amazon.routes do
 
 resources :books
 
 end
  • 23. Amazon.rb ! Amazon.routes do
 
 resources :books do collection :top_rated end 
 end
  • 24. Amazon.routes do
 resources :books do collection :top_rated Amazon.rb end end Prefix Verb books GET URI Pattern Controller#Action /books books#index /books/top_rated books#top_rated /books books#create /books/new books#new /books/:id/edit books#edit book GET /books/:id books#show PUT /books/:id books#update top_rated_books GET POST new_book GET edit_book GET DELETE /books/:id books#destroy
  • 25. Amazon.routes do
 resources :books do collection :top_rated Amazon.rb end end Prefix Verb books GET URI Pattern Controller#Action /books books#index /books/top_rated books#top_rated /books books#create /books/new books#new /books/:id/edit books#edit book GET /books/:id books#show PUT /books/:id books#update top_rated_books GET POST new_book GET edit_book GET DELETE /books/:id books#destroy
  • 26. REpresentational State Transfer Roy Fielding Architectural Styles and the Design of Network-based Software Architectures (2000)
  • 27. REpresentational State Transfer “How I Explained REST to My Wife” Ryan Tomayko tiny.cc/rest_rails

×