水曜日, 2月 23, 2011
Webを支える技術 -HTTP、URI、HTML、そしてREST (WEB+DB PRESS plus)
http://yohei-y.blogspot.com/
の方が書かれた、HTTP/URI/HTML/RESTに関する本
よく言われる
cool URIs don't change.
http://example.jp/cgi-bin/login.pl
http://example.jp/servlet/LoginServlet
http://example.jp/Login.do?action=showPage
http://example.jp/home.jsp?jsessionid=12345678
のような汎用性の低いURIは避ける
http://example.jp/login
URI:名詞
HTTPメソッド:動詞
の関係なので、URIはリソースを表現する名詞にする
http://example.jp/sample/people/show/123
ではなく
http://example.jp/sample/people/123
URIを変更するときは301で飛ばしてあげる
http://example.jp/2010/05/01/press.ja
http://example.jp/2010/05/01/press.en
http://example.jp/diary/2010/05/01
http://example.jp/map/lat=35.705471;lng=139.751898
http://example.jp/map/35.705471,139.751898
ステートフルとステートレスとの違いをハンバーガーショップの注文で説明
http://yohei-y.blogspot.com/2007/10/blog-post.html
GET/POST/PUT/DELETE/HEAD を解説
また、
Create POST/PUT
Read GET
Update PUT
Delete DELETE
であることを説明
そのあたりはここ
http://yohei-y.blogspot.com/2005/04/rest_23.html
HTML
microformats
Atom
Atom Publishing Protocol
JSON/JSONP
の説明
最後の15,16,17章では郵便番号を例に取りxhtml/jsonで出力するWebサービスの設計を行っている
おさらいとしてよくまとまっていて良著