#21: SOAP and REST APIs

If you google, there are thousands of articles available on SOAP vs REST API. But it was a new learning for me.. hence posting

First, what is API.
Application Programming Interface or APIs are like a Window at the McDonald’s drive thru. As a customer if you order something - anywhere in the country - you will get the exact same thing. You do not need to care about how it is managed inside McDonalds. You just need to know the correct name.
APIs are same - as long as you give them the information as per a given pre-decided structure or contract - you will always get a standard response.

SOAP APIs Simple Object Access Protocol. It uses XML as the underlying protocol  to communicate across networks. XML is a very structured and as a result more complex way to communicate. Using the above McD example, It is something like writing your order, folding the paper, putting it in an envelop and giving it.

REST APIs are simpler. They use JSON or simple URLs or web verbs like POST, GET to communicate. Think of this as giving your order verbally at the McD drive thru. Simpler - yes. But not very secure. Any body can listen to your order in this case.

Comments

Popular posts from this blog

#15: Cathedral Effect

#5: Intermittent Fasting

#13: Process vs Goal