Discovering a world of
Resources on Rails
David Heinemeier Hansson
Create Read Update Delete
What they told you...
やつらが言ってたのは...
Simplistic 単純すぎる
Unfulfilling 物足りない
Unworthy ふさわしくない
Shameful これはひどい
They were wrong
やつらはまちがっていた
How I learned to stop
worrying and love the CRUD
私は如何にして心配するのを止めて,CRUDを愛するようになったか?
find create update destroy
SELECT INSERT UPDATE DELETE
GET POST PUT DELETE
find create update destroy
SELECT INSERT UPDATE DELETE
POST /people/create
GET /people/show/1
POST /people/update/1
POST /people/destroy/1
POST /people
GET /people/1
PUT /people/1
DELETE /people/1
Why bother?
これでよくね?
Consistency 一貫性
Simplicity 単純さ
Discoverability 見つけやすさ
Constraints are liberating
制約が自由をもたらす
(a straight jacket for your mind)
(あなたの思考の拘束衣)
Model beyond “things”
「物」じゃないモデル
Relations (membership, subscription)
関連(帰属関係、サブスクリプション)
Events (closure, change)
イベント(終了、...
But!
だがしかし!
CRUD is not a goal,
it’s an aspiration,
a design technique
CRUDはゴールではなく
ゴールを目指す気持ちであり
設計の技法なのである
POST /kases/1;close
/identity;aspect
GET /kases/1;edit
/identity;view
And there is more!
さらに!
Answering to mime types
mime type に応答する
One controller for many clients
いろいろなクライアントをさばく1つのコントローラ
One action returning diff...
One more thing
あとひとつ
Active Resource
www.rubyonrails.org
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Ruby on Rails Resources
Upcoming SlideShare
Loading in...5
×

Ruby on Rails Resources

2,383

Published on

David's presentation (37signals)

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

No Downloads
Views
Total Views
2,383
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
14
Embeds 0
No embeds

No notes for slide

Transcript of "Ruby on Rails Resources"

  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 私は如何にして心配するのを止めて,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 CRUDはゴールではなく ゴールを目指す気持ちであり 設計の技法なのである
  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 mime type に応答する One controller for many clients いろいろなクライアントをさばく1つのコントローラ One action returning different results 複数の結果を返す1つのアクション Flexible input model 柔軟な入力モデル
  18. 18. One more thing あとひとつ
  19. 19. Active Resource
  20. 20. www.rubyonrails.org

×