Chapter 7. JSON and Client-Side Frameworks

In Chapter 6, we took a look at a client–server relationship between the web browser and a web API. In this chapter, we will zoom the lens to the client side of that relationship, and see how some client-side frameworks are supporting or leveraging JSON.

Let’s take a quick look at what a framework is, for those that are not familiar with the concept. In the physical world, “framework” can be used to describe an essential supporting structure, or an underlying structure. In computing, a framework is not an underlying structure. It is a structure that sits on a layer above software or a programming language to provide support to the developers.

A framework in computing is a supporting structure, but not in a way that can be related to the beams of a building. If the JavaScript language were a house, a JavaScript framework would not be the supporting structure of that building. In fact, you can build a very strong house without a JavaScript framework.

If we were in the business of building houses with JavaScript, a JavaScript framework would be like ordering a prefabricated house that already contains plumbing and wiring for electricity. With our prefabricated houses, we could focus on creating whatever type of kitchen sink we wanted and running water would just be a matter of connecting the sink to the plumbing. We could focus on installing nice cabinetry and beautiful granite countertops. In essence, our JavaScript framework would allow ...

Get Introduction to JavaScript Object Notation now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.