Plain Old XML / Plain Old ã»ãã»ã
Someone recently asked me about how to handle an internal product debate around REST vs. SOAP.
In hopes I never have to address this debate again, here's a record of what I told them.
Don Box ã REST vs SOAP ã«ã¤ãã¦ã® Pragmatics ã«ã¤ãã¦èªã£ã¦ãããã¨ããè¨äºããã®è¨äºãèªãåã« OPC Diary: SOAP vs RESTï¼ ããããåºè·ãã ã¨ããè¨äºãã³ã¡ã³ãã¾ã§å«ãã¦èªãã§ããã¨è¯ãæãã§æ¶åã§ãããã¨æãã¾ãã
ã§ãããã¾ãè¨äºã¨ã¯é¢ä¿ãªãã話ã§ãPOX - Plain Old XML ã¨ããåèªãæ¥ããããªããåãã¦èãããã®ã§ãããã«åå¿ã
Plain Old XML ã¯
Plain Old XML (POX) is a term used to describe basic XML, sometimes mixed in with other, blendable specifications like XML Namespaces, Dublin Core, XInclude and XLink. People typically use the term as a contrast with complicated, multilayered XML specifications like those for Web Services or RDF.
㨠Wikipedia ã«ããããã«ããã«ãã¬ã¤ã¤ãª XML ä»æ§ã«å¯¾æ¯ãã¦ä½¿ãããè¨èã®ããã§ããREST ã®è©±ã¨ãã§ããåºã¦ããã£ã½ãã
åã¯ä»¥åã« XML éçºè ã®æ¥ã§ãç¹ã«æ¨æºåã¨ããããã¦ãããããã«ãã¬ã¤ã¤ã§ãªãããã¼ã¿æ§é ã表ç¾ããã ãã®XMLã¿ãããªãã®ãæãããéè¯XMLãã¨ããè¨èãåæã«ä½¿ã£ã¦ã¿ããã¨ãããã¾ããPOX è¨èã®ã©ãã«ã ããã¿ãã¨ãã¯ããããæå³ããªã¨æã£ããã©ãããã¾ã§é©å½ãªæå³åããããªãã¦ãå ã® Don Box ã®è¨äºã¨ããè¦ã¦ãã¨ãSOAP ã¨ã WSDL ã¨ãä½ã対æ¯ãããææããã£ã¦ãããã¾ã§ãã®åæ㧠Plain Old XML ã¨ããè¨èã使ã£ã¦ãã¿ããã§ããã
ãªãã§ããããã Atom ãã£ã¼ãã¿ããã«ã¡ããã¨ã©ããã§åæã®åããä»æ§ãããã¤ã¤ãã«ãã¬ã¤ã¤ã§ãªããã®ããSOAP ãªããã¨å¯¾æ¯ããã㨠POX ã®ç¯çã«å ¥ã...ã¨ããç解ãããã§ãããã?
ããã°ã©ãã³ã°ã®ä¸ç㧠"Plain Old ã" ã£ã¦è¨ãã¨æè¿ä¸çªããèãã®ã¯ POJO ã ã¨æãã¾ããPlain Old Java Objectããæãªããã®ãã ã® Java ãªãã¸ã§ã¯ããã¨ãã¼ã¯ã¼ããã¼ã¸ã«ããã¾ãããPlain Old Java Object ã¯å°ãåã® EJB ã¨ãã¸ã®ã¢ã³ããã¼ã¼ã£ã¦ãã¨ã§ãããããã¶ãã
æ¯ãã¦æçãã¦ããæè¡ã«å¯¾ãã¦ãæ°ããããè¤éãªæè¡ãªã©ãããããã®ã¨ãã«ä½ãå¾è ã®æ¹ãæ°ãããè¤éã§ããããã ããã¨ããçç±ã§ãã¡ãããã¦ã¯ããããã¨ãã«ãããããã§ããã£ã¡ã®ã»ããæ¯ãã¦ã¦ä½¿ãæããã ãã©...ãã§ãã»ãã¨ã«ããã§ããã®ãèªä¿¡ããªããªããã¿ãããªèããå¾æ¼ãããã®ã« Plain Old ã¨ãã修飾èªãä»ããã¨ããã®ãããããªããã¨ãã¤ããã風ã«åæãã¦ã¿ãã
ä¼¼ããããªè©±é¡ã§ãä½ãè¤éã§æ°ãããã®ãç²ä¿¡ããã®ã¯è¯ããªããã£ã¨ãã話é¡ã Strutsã®åé¡ç¹ ã¨ããããã°ã©ãã¼æ¥è¨ã®è¨äºã§ãã£ã¦ãé¢ç½ãã£ãã(ã¡ã¨ã³ã¡ã³ãæ¬ã§è°è«ããã£ããããªã®ã§ãçµæã¨ãã¦ã®24æ¥ã®åãä½µãã¦èªãã¨è¯ãã¨æãã¾ãã)
ãã¨ãã¡ãã£ã¨ã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ä½ã£ã¦è©¦ããããªããªãã¦æãæã«ã¯ CGI ã§ç°¡åãªã¹ã¯ãªãããã§ã£ã¡ãããã¨ããã®ãè¯ãããã¾ããã©ããªãã Quick Hack ã¨ã¯è¨ãä»æ CGI ã£ã¦ãªãã...ã¿ãããªè¿·ããããããããªã¨ã㯠Plain Old Web Application (POWA) ã¨ãè¨ã£ã¡ããã°ããããããªããã¨ããã ããªããã¨ãæãã¤ãã¦ãã¾ã£ããPlain Oldã¡ã½ããã
ã¨ãã㧠Perl ãã«ã¼ã« "Plain Old" ã§ãªãã¿ã®æ·±ããã®ã¨è¨ãã° POD - Plain Old Document ãªãã§ããã©ãããã¯ä½ã«å¯¾ãã対æ¯ãªãã§ããããã