Nicolás Bevacqua is a long-time JavaScript developer who has authored multiple books and has recently published Mastering Modular JavaScript. We caught up with him to ask a few questions about modular JavaScript development in general:
What's your one paragraph pitch for Mastering Modular JavaScript?
Keeping complexity in check is hard. Today, more and more applications are turning to front-end JavaScript frameworks, and many choose React. You might've noticed how React apps are structured as acyclical component trees. Those trees turn out to be ideal in not just encapsulating code, but also in encouraging modularity. Writing modular JavaScript is, in no small part, a matter of writing code that lends itself to writing other, small pieces of software.
What's the most common mistake you see in relation to modularity?
At every level of an application, such as modules, functions, blocks, and individual expressions, there's room for modular thinking. One of the most common mistakes is not splitting modules (or functions, or blocks) as they grow larger and larger. Even in otherwise modular applications, it's not uncommon for modules to become dauntingly large. Prune your trees every so often! 🌳
What three resources do you consider a must-read for developers looking to improve the structure of their code?
One of the most influential works that I've read on structuring code is definitely The Twelve Factor App. It has definitely shaped how I think about and write open-source software.
Performance mindedness is useful when it comes to reasoning about whether something belongs critically in client-side code or could be dealt with through a web service. High Performance Browser Networking helps you respect the user and encourages transmitting fewer bytes.
Having an interest in security also helps, as you're more likely to be on the lookout for exploitable angles like unescaped or poorly sanitized user inputs. The Tangled Web is a great book in that space.
If you could get JavaScript developers to all adopt the same piece of advice at once, what would it be?
Everyone? Stop using webpack *poof!* 🔥
You're the face behind Pony Foo — what's the latest?
We're aiming to reinvent Pony Foo as one of the web developer's go-to platforms, like CSS-Tricks or Smashing Magazine are. We already have quite a few articles lined up and we're on the lookout for (paid!) guest authors!
No comments:
Post a Comment