Chapter 14. Models: working with data

This chapter covers

  • Building models from data
  • Using the same data in multiple projects
  • Switching between data files
  • Specifying map data in The Crypt

In chapter 13, you saw how you can use modules to break a program into separate files. You can then work on the modules independently, easily switch between modules, and reuse them across multiple projects. You can even publish your modules and import published modules written by others.

This chapter maintains that spirit of modularization and reuse. You look at moving data out of constructors and functions. You represent the data simply so that multiple apps can use the data, even if the apps are written in different programming languages. You then ...

Get Get Programming with JavaScript 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.