Summary

In this chapter, we looked at a few more techniques which enable us to extend and modify our modules.

We considered how we can use various cloning approaches to create replicas of our modules and talked about the pros and cons of each approach. We also examined how we can use inheritance among modules so that a child module can utilize the functionality of its parent module as well as override its parent module's functionality, as needed.

In the last section of this chapter, we talked about submodules and looked at a couple of different techniques for adding submodules to our main (hosting) modules.

The next chapter will be more focused on the design of our application as a whole. We'll see how a flexible ecosystem can be created for our ...

Get Modular 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.