Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this


  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.