Learning / Web Basics / Chapter 4

Web Standards

REST, SOAP, JSON, XML and why timing matters

How systems talk to each other: REST vs. SOAP, JSON vs. XML, synchronous vs. asynchronous communication, and which fits which use case.

Beginner · 11 slides · 11 min

  1. APIs: contracts between systems

    An API defines which questions a system accepts and which answers it gives, like a menu in a restaurant.

  2. REST: resources and HTTP verbs

    In REST everything is a resource with its own URL, and HTTP verbs like GET, POST, PUT and DELETE say what to do with it.

  3. SOAP: the formal envelope

    SOAP wraps every call in an XML envelope with header and body, described precisely by a WSDL contract.

  4. REST vs. SOAP

    Style, data format, contract, weight and typical use: how REST and SOAP differ.

  5. JSON

    JSON is the compact, readable data format of modern web APIs: objects, arrays, text, numbers, true/false and null.

  6. XML

    XML describes data with tags and attributes, and adds comments, namespaces and strict schemas.

  7. JSON vs. XML

    The same data in both formats: size, data types, validation, and when to use which.

  8. Synchronous vs. asynchronous

    Synchronous means waiting for the answer. Asynchronous means sending the request and carrying on. The result comes later.

  9. Which one when?

    REST + JSON as the default, SOAP + XML when the other side requires it. Synchronous when you need the answer now, asynchronous when the work takes time.

  10. Check yourself

    How should an API handle a report that takes three minutes to generate?

  11. Recap

    REST, SOAP, JSON, XML, synchronous and asynchronous: web standards in five sentences.