Chapter 5. The Bridge

We’ve mostly finished our journey through the client-side portion of a web application. Although I haven’t stated it explicitly, when I refer to the client-side portion of a web app, I’m talking about the part of the program that runs in your web browser. The other side of the story is the server-side part of the application, which runs and stores information outside of your web browser, usually on a remote computer.

This chapter is not about the server-side part of a web application, but it is about a collection of technologies that allow the client and server to more easily exchange information. I like to think of this set of technologies as the bridge between the client and the server.

Specifically, we’ll study JavaScript objects, JSON (JavaScript Object Notation), and AJAX (Asynchronous JavaScript And XML—a misnomer of sorts). These topics will prepare us for Node.js, which we’ll study in the next chapter.

Hello, JavaScript Objects!

Before we start talking about transferring data between computers, we need to discuss one more important JavaScript primitive: objects. You may have heard of object-oriented programming in the past, and if you’ve programmed in C++ or Java you’ve most likely seen the topic in detail.

Though these ideas are very important for software engineering in general, object-oriented programming in JavaScript is a different beast altogether, so it’s best to forget about them when you’re first learning. Instead, we’re going to take a slightly ...

Get Learning Web App Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.