What’s going on

Two more model examples

AJAX

XML?

<person>
    <name>John Smith</name>
    <age>25</age>
    <address>
        <streetAddress>21 2nd Street</streetAddress>
        <city>New York</city>
        <state>NY</state>
        <postalCode>10021-3100</postalCode>
    </address>
    <phoneNumbers>
        <phoneNumber>
            <type>mobile</type>
            <number>123 456-7890</number>
        </phoneNumber>
        <phoneNumber>
            <type>office</type>
            <number>646 555-4567</number>
        </phoneNumber>
    </phoneNumbers>
    <children></children>
    <spouse></spouse>
</person>

JSON

{   "name": "John Smith",
    "age": 25,
    "address": { "streetAddress": "21 2nd Street",
        "city": "New York",
        "state": "NY",
        "postalCode": "10021-3100"
    },
    "phoneNumbers": [ { "type": "mobile",
            "number": "123 456-7890"
        },
        { "type": "office",
            "number": "646 555-4567"
        },
    ],
  "children": [],
  "spouse": null
}

The JS XMLHttpRequest object

let httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = alertContents;
httpRequest.open('GET', 'js15_text.txt');
httpRequest.send();

So where is a web app, anyway?