Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with hapi.js

You're reading from  Getting Started with hapi.js

Product type Book
Published in Apr 2016
Publisher
ISBN-13 9781785888182
Pages 156 pages
Edition 1st Edition
Languages

Composing applications from plugins


So far in this chapter, we've looked at how to create plugins, how to use third-party plugins in our applications, how to add communication between plugins, and how to create dependencies between plugins.

Plugins are a great way of managing your code base by splitting it up into smaller, more manageable chunks of functionality. But like every design strategy, plugins have some downsides. The downsides are mainly in the form of extra overhead when it comes to our registering and configuring them for our applications. In fact, configuration alone can be a big headache for applications. Let's look at how we can mitigate this.

When you think back to our index.js entry file from the last example, we simplified this by pushing all our business logic to plugins, making for a very readable and easy-to-follow entry file for new users of our codebase.

But now let's think about how this scales. As more functionality is added, the number of plugins would obviously grow...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}