RESTful#ã¨ã¯åå¼·ä¼13 ãéå¬ãã¾ãã #RESTudy
ä¸æ¨å¹´ããã ãããæ1åãããã®ãã¼ã¹ã§ãWebã®åºæ¬çãªä»çµã¿ãåºç¤ããå¦ã¶ãRESTful#ã¨ã¯åå¼·ä¼ããéå¬ãã¦ãã¾ãã主å¬ã¯shokolaããã§ãç§ã¯é²è¡å½¹ãæ å½ãã¦ãã¾ãã
2æ23æ¥ã«éå¬ããRESTful#ã¨ã¯åå¼·ä¼13ã§ã¯ãã´ã¡ã«ç 究æããã®ååã®ãã¨ãé§ ãã±ãã¨Webãµã¼ãã¹ãã¬ãã¥ã¼ããã¨ããä¼ç»ãããã¾ãããããããªæè¦ãåºã¦ã¨ã¦ããããããã£ãã§ããã¿ãªãããããã¨ããããã¾ããã
- RESTful#ã¨ã¯åå¼·ä¼13 å½æ¥ã®å 容ã¨ãã¤ã³ã
- RESTful#ã¨ã¯åå¼·ä¼13 ãã¤ã¼ãã¾ã¨ã
ã²ã¹ãã¨ãã¦æ¥ã¦ããã ãã@Keisuke69ãããããã°è¨äºãæ¸ãã¦ããããã®ã§ãããã¯ç§ãæ¸ããªããã°ãã¨ãããã¨ã§æãããã¨ãæ¸ãã¦ããã¾ãã
é§ ãã±ãã¨Webãµã¼ãã¹ã«ã¤ãã¦ãå½æ¥æã£ã¦ãã¦è¨ãå¿ãããã¨
- ãã¼ã¯ã³ãURLã®ã¯ã¨ãªãã©ã¡ã¼ã¿ã«ã¤ããæ¹å¼ã«ãªã£ã¦ãã¾ããããããªãHTTPSå¿ é ã«ããã»ãããã
- APIå®è£ ã®æ¹è¯ã®çç±ã¨ãã¦ããã©ã¼ãã³ã¹ãæãã¦ãããã¾ããããå é¨ã®éä¿¡ã«HTTPã使ã£ã¦ããã®ã§ããã°ãããå¥ã®ãããã³ã«ã«å¤ããã»ããããã©ã¼ãã³ã¹ãä¸ãããã
- ãªã³ã¯ãã¤ããã¨ã¨ã¦ã使ãããããªãã¾ãï¼å¾è¿°ï¼
RESTfulã«ããçç±
ãå½æ¥åå è ãããããã£ãRESTfulã§ããå¿ è¦æ§ããRESTã®ä¸è¬çãªã«ã¼ã«ãã©ãã¾ã§å®ãå¿ è¦ããããã«ã¤ãã¦å人çãªè¦è§£ããç§ãèãã¦ã¿ã¾ããã
APIãRESTfulã«ãã¹ããã©ããã¯ãç®çãæ段ã«ããããã§ããããã®ä¸ã§ãHTTPã使ããã©ããã«å¤§ããå·¦å³ãããã¨æãã¾ããRESTã®å¶ç´ã®å¤§é¨åã¯ãããã£ã±ã«è¨ãã°ãHTTPã®ã«ã¼ã«ãå®ããã¨è¨ãæãã¦ããããã®ã§ãã£ã¦ãHTTPã使ãã®ã§ããã°HTTPã®ã«ã¼ã«ãå®ã£ãã»ããè¯ããã®ãã§ããã®ã¯å½ç¶ã®ãã¨ã§ããSOAPãè¡°éããã®ã¯ãHTTPã使ãã¤ã¤ã«ã¼ã«ãå®å ¨ã«ç¡è¦ãããã¨ãä¸å ã§ãããã
ä»åè°è«ã«ä¸ãã£ãURLã®è¦åããã¼ãã³ã°ã«ã¤ãã¦ã¯ãå®ã¯HTTPã®ã«ã¼ã«ã¨é¢ä¿ããã¾ãããããç義ã®RESTãã«ã¯å«ã¾ãã¾ããããåºç¾©ã®RESTï¼ãããã¯ROAï¼ãã¨ãã¦ãã¾ãè¨è¨ã®ãã¿ã¼ã³åã¨ãã¦ã¯ã¡ãªããã®ãããã®ã ã¨æãã¾ãã
ã§ã¯ãRESTful APIã¨ãã¦ãã£ã¨éè¦ãªæ¬è³ªçãªãã¨ã¨ã¯ä½ã§ããããï¼ 1ã¤ã¯ä½ãããAPIã®ãã¡ã¤ã³ï¼ä»åã®å ´åééã»äº¤éãªã©ï¼ã«ãµãããã表ç¾ãè¨è¨ãããã¨ã§ããããã1ã¤æããã¨ãç義ã®RESTãã®ä¸ã§å®å ¨ã«ç¡è¦ããã¦ããããã¤ãã¼ã¡ãã£ã¢å¶ç´ãã§ãã
ãã¤ãã¼ã¡ãã£ã¢å¶ç´ã¨ã¯ãç°¡åã«è¨ãã¨ãªã³ã¯ãä½ããã¨ã§ããä»åã®APIã¯ããé§ æ å ±æ¤ç´¢âçµè·¯æ¤ç´¢âæå»è¡¨ãã®ããã«é·ç§»ã®ãã¿ã¼ã³ãé常ã«ããããããAPIã§ãããã®ãããªã¨ãããããªã³ã¯ãæ´»ãã¾ããã¬ã¹ãã³ã¹ã®ä¸ã«æ¬¡ã«é·ç§»ããåè£ã®ãªã³ã¯(URL)ãå«ãã¦ããã°ãã¯ã©ã¤ã¢ã³ãã¯ããããã©ããã¨ã§å®¹æã«çµæãå¾ããã¾ããURLãå¤ãã£ã¦ãåé¡ããã¾ããã
Web APIãå¤ã«é£ããèãããã¦ããã¨ããã¯ãã£ã¦ããWebãæ¯ããæè¡ãã§ä½åº¦ãæ¸ããã¦ããéããWebãµã¼ãã¹ã¨Web APIãåãã¦èããªãããããä¸çªéè¦ãªãã§ããWebã¢ããªï¼ãµã¤ãï¼ãä½ãã®ã¨åãããã«Web APIãä½ãã°ãããHTMLãJSONããéãã ãã
— Toru KAWAMURA (@tkawa) February 23, 2016
ã¨è¨ã£ãã®ã¯ãã®ãã¤ãã¼ã¡ãã£ã¢ã®æå³ã§ãããã¾ããWebã¢ããªï¼ãµã¤ãï¼ãä½ãã¨ãã«ã¯å¿ ããªã³ã¯ãä½ãã¾ããããWeb APIã§ãåãã§ãã
Web APIã¯ãã ã®ãã¼ã¿ã ã¨æã£ã¦ããã¨ããªã³ã¯ã®å¿ è¦æ§ãæããããªãããããã¾ãããããããHTTPã使ã以ä¸ãRESTfulã«ãããã¨ãã¡ãªãããæ大éæ´»ããæ¹æ³ã§ãã£ã¦ããã®ããã«ã¯ãã¤ãã¼ã¡ãã£ã¢ã¯æ¬ ãããªããã®ã§ãã
Web API ã¢ã¯ã»ã·ããªãã£
ããã«å ã®è©±ã«ãªãã¾ãããæè¿èãã¦ããã®ã¯ãWeb API ã¢ã¯ã»ã·ããªãã£ãã§ãã ï¼ããã¯åæã«ä½ã£ãç¨èªãªã®ã§ãè±èªã¨ãã¦ã¯æ¬æ¥ã®ç¨æ³ããããã¦ããããããã¾ããï¼
Webã¢ã¯ã»ã·ããªãã£ã¨è¨ã£ãã¨ããä»ã¾ã§ã¯Webã¢ããªã»Webãã¼ã¸ã«å¯¾ãã¦å¿
è¦ã§ããã¨ããã¦ãã¾ãããä¾ãã°HTMLã® img
ã«å¯¾ã㦠alt
å±æ§ãã¤ãããã¨ãã£ããã¨ã§ããWebã¢ããªã«å¯¾ãã¦ã¯WAI-ARIAãããã¾ããããã¯ä¸é¢ã¨ãã¦ã»ãã³ãã£ã¯ã¹ï¼ãæå³ã®æ
å ±ãã®ä»å ã§ããã¨ã¨ããããã¨ãã§ãã¾ãã
ARIA 㯠Web ã¢ããªã±ã¼ã·ã§ã³ãã¦ã£ã¸ã§ããããã¹ã¯ãªã¼ã³ãªã¼ãã¼ãæ¡å¤§é¡ã¨ãã£ãæ¯æ´æè¡ã使ç¨ããã¦ã¼ã¶ãå«ãå¹ åºãã¦ã¼ã¶ã«å¯¾ãã¦ã¢ã¯ã»ã·ãã«ã«ããæ段ãæä¾ãã¾ãã ARIA ã¯ã¡ãã¥ã¼ãã¹ã©ã¤ãã¼ãããªã¼ããã¤ã¢ãã°ã¨ãã£ãå¤ãã®ä¸è¬çãªã¦ã¼ã¶ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®å½¹å²ãç¶æ ãæ©è½æ§ã示ãä»å çãªæå³ãä¸ãã¾ããã¾ãä½è ããã¼ã¸ä¸ã®ç®å°ãé¨åãã°ãªãããè¨å®ãããã¨ãæ¯æ´ãããä»å çãªæ§é æ å ±ãä¸ãã¾ãã https://developer.mozilla.org/ja/docs/Web/Accessibility/ARIA/Web_applications_and_ARIA_FAQ
ã¦ã¼ã¶ã«ã¨ã£ã¦ä½¿ããããããããã«ãã³ã³ãã¥ã¼ã¿ãç解ã§ãããæå³ã®æ å ±ããå ããã¨ãããã¨ã§ããçµæã¨ãã¦ãã³ã³ãã¥ã¼ã¿ã«ã¨ã£ã¦ã使ãããããªããèªåå¦çãåå©ç¨ããããããªãã¾ãã
ããã§æ¨ä»ã®Web APIãè¦ã¦ã¿ãã¨ãã»ãã³ãã£ã¯ã¹ããã¾ãã«è¶³ããªããã¦ã¼ã¶ã®ããã®APIããã¥ã¡ã³ããããããã¦ããã¾ããããããå¥ã®ã¨ããã«ç½®ãã¦ããã ãã§ãAPIã®ä¸èº«ãè¦ã¦ããããã¾ãããå°åºã¢ã¯ã»ã·ãã«ã¨ã¯è¨ããªãç¶æ³ã§ãã
Web APIãã¢ã¯ã»ã·ãã«ã«ããããã®æ¹æ³ã¯ãã¾ã 決ã¾ã£ããã®ãããã¾ãããOpenAPI(Swagger)ãAPI BlueprintãRAMLãªã©ã¯ãè¿ãã¨ãããããã¾ãããRESTã®å¶ç´ã§ãããèªå·±è¨è¿°çããæºããã¦ããªããã¨ããããç¾ç¶ã¯å°ãæ¹åãéãã®ã§ã¯ã¨æã£ã¦ãã¾ããå ·ä½çã«ã¯ã¡ãã£ã¢ã¿ã¤ãããããã¡ã¤ã«ã®æ´»ç¨ã¨ãããã¨ã«ãªãã¨æãã¾ããããããããèãã¦ããããã§ããã¡ãã£ã¢ã¿ã¤ãããããã¡ã¤ã«ã«ã¤ãã¦ã¯ãRESTful Web APIsãã§è©³ç´°ã«èª¬æããã¦ãã¾ãã®ã§ããã²èªãã§ã¿ã¦ãã ããã
- ä½è : Leonard Richardson,Mike Amundsen,Sam Ruby
- åºç社/ã¡ã¼ã«ã¼: Oreilly & Associates Inc
- çºå£²æ¥: 2013/09/30
- ã¡ãã£ã¢: ãã¼ãã¼ããã¯
- ãã®ååãå«ãããã°ãè¦ã
Restful Web Clients: Enabling Reuse Through Hypermedia
- ä½è : Mike Amundsen
- åºç社/ã¡ã¼ã«ã¼: Oreilly & Associates Inc
- çºå£²æ¥: 2016/05/25
- ã¡ãã£ã¢: ãã¼ãã¼ããã¯
- ãã®ååãå«ãããã°ãè¦ã