Worldofresources

802
-1

Published on

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

No Downloads
Views
Total Views
802
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
45
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Worldofresources

  1. 1. Discovering a world of Resources on Rails David Heinemeier Hansson
  2. 2. Create Read Update Delete
  3. 3. What they told you... Simplistic Unfulfilling Unworthy Shameful
  4. 4. They were wrong
  5. 5. How I learned to stop worrying and love the CRUD
  6. 6. find create update destroy SELECT INSERT UPDATE DELETE
  7. 7. GET POST PUT DELETE find create update destroy SELECT INSERT UPDATE DELETE
  8. 8. POST /people/create GET /people/show/1 POST /people/update/1 POST /people/destroy/1
  9. 9. POST /people GET /people/1 PUT /people/1 DELETE /people/1
  10. 10. Why bother? Consistency Simplicity Discoverability
  11. 11. Constraints are liberating (a straight jacket for your mind)
  12. 12. Model beyond “things” Relations (membership, subscription) Events (closure, change) States (reviewed, accepted)
  13. 13. But!
  14. 14. CRUD is not a goal, it’s an aspiration, a design technique
  15. 15. POST /kases/1;close /identity;aspect GET /kases/1;edit /identity;view
  16. 16. And there is more!
  17. 17. Answering to mime types One controller for many clients One action returning different results Flexible input model
  18. 18. One more thing
  19. 19. Active Resource
  20. 20. www.rubyonrails.org
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×