3.1.1.Evolution of REST/JSON API
Web service
This is used for easy communication over a network between two electronic devices
RPC, XML-RPC -> 2003 SOAP (XML-base) -> Google & Yahoo offered JSON/RPC, REST in 2006
RPC
遠程調用框架
從一台機器 (客戶端)上通過參數傳遞調用另一台機器 (服務器)上的一個函數或方法
使用形式上像調用本地函數 (或方法)一樣調用遠程函數 (或方法)
RPC風格的web service跨語言性不佳
XML-RPC, JSON-RPC
XML-RPC透過向裝置了這個協定的伺服器發出HTTP請求。發出請求的用戶端一般都是需要向遠端系統要求呼叫的軟體
服務器端
客戶端
SOAP (Simple Object Access Protocol)
數據交換協議規範
XML based standard, Document風格的web service有以下問題:
Issues of XML based Protocol
XML is heavy in terms of network traffic, large payload
Parsing of XML is CPU & memory intensive
Slow performance of XML on browser front end not desired
Mobile devices battery performance reduced due to XML
Standards & versions of standards caused confusion and complexity
Mobile and Single page application developers were not happy
跨平台, 跨語言
Defined:
structure of the messages exchanged, security, transaction, other standards
JSON (JavaScript Object Notation)
HTTP://JSON.ORG launch in 2002
Google & Yahoo offered JSON/RPC, REST in 2006
Last updated