The RemoteDataStore Module

In a moment, you will create a new module called RemoteDataStore. The job of RemoteDataStore will be to talk to a server on behalf of the rest of the application. It will have all the same methods as DataStoreadd, get, getAll, and remove – which it will use to communicate with the server (Figure 13.2).

Figure 13.2  DataStore vs RemoteDataStore

DataStore vs RemoteDataStore

You will be able to use an instance of RemoteDataStore in place of DataStore without having to change your Truck, FormHandler, or CheckList modules. (You will not be deleting your DataStore module, though. You might want to create a future enhancement allowing ...

Get Front-End Web Development: The Big Nerd Ranch Guide 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.