Book Image

Node Web Development - Second Edition

By : David Herron
Book Image

Node Web Development - Second Edition

By: David Herron

Overview of this book

Table of Contents (17 chapters)
Node Web Development Second Edition
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


We've come a long way in this chapter, rewriting the Notes application to use several database engines. However, we've only touched the surface of options for accessing databases and data storage engines from Node. The Node wiki contains a list of database engines and a large number of modules that you can find at https://github.com/joyent/node/wiki/modules#wiki-database, covering a whole gamut of engines and models for using databases.

By abstracting the model implementations correctly, we were able to easily switch data storage engines while not changing the rest of the application.

By focusing the model code on the purpose of storing data, both the models and the application should be easier to test. Namely, the application could be tested with a mock data module that provides known predictable notes that can be checked predictably. We'll look at this in more depth in Chapter 9, Unit Testing.

In the next chapter we'll focus on deploying our application for real use by real people...