Chapter 7. Building modular applications with plugins

This chapter covers

  • Defining plugins and why you should use them
  • Creating and loading plugins
  • Building applications in a modular way using plugins
  • Communicating and sharing data between plugins

When building software we strive for modularity at many different layers. We package reusable statements into functions and functions into modules and classes. More recently we’ve started using tools like Browserify and React to split our front end into modules and components too.

Modularizing helps us to draw a line around something and says this does X, without anyone else (or our future selves) having to worry about how it does X. When working on a modular application, the cognitive load ...

Get hapi.js in Action 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.