A List Apart

Menu
Issue № 375

The care and feeding of JavaScript.

The Design of Code: Organizing JavaScript

by Anthony Colangelo · 31 Comments

Well-designed code is much easier to maintain, optimize, and extend, making for more efficient developers. Three high-level, language-agnostic aspects of code design are key to achieving this nirvana: system architecture, maintainability, and reusability. All three may be attained via the module pattern, whose extensible structure lends itself to a solid system architecture and a maintainable codebase. Anthony Colangelo shows how to craft our code into well-organized components that can be reused in projects to come.

Writing Testable JavaScript

by Rebecca Murphey · 32 Comments

As our JavaScript takes on more and more responsibilities, we need a reliable codebase—one that is thoroughly tested. Integration tests focus on how the pieces of an application work together, but don’t tell us whether individual units of functionality are behaving as expected. That’s where unit testing comes in. And we’ll have a hard time writing unit tests until we start writing testable JavaScript. Rebecca Murphey explains how to save time in the long run by writing cleaner application code and testing, testing, testing.

More from A List Apart

Columnists

Lyza Danger Gardner on Building the Web Everywhere

Mentorship for the Novice Expert

We’re short on mountaintops where we can find mentors, but the good news is mentors are actually just people like you and me who keep at it. They work at listening, ask people how they prefer to learn, make time to meet. Lyza Gardner talks about her early-morning motocycle practice, and how she loves gradually building her mentoring muscle by overcoming the embarrassment of being a beginner and just doing it.

From the Blog

15 Years Ago in ALA: Much Ado About 5K

15 years ago this month, a plucky ALA staffer wrote “Much Ado About 5K,” an article on a contest created by Stewart Butterfield that challenged web designers and developers to build a complete website using less than 5K of images and code. As one group of modern web makers embraces mobile-first design and performance budgets, while another (the majority) worships at the altar of bigger, fatter, and slower, the 5K contest reminds us that a byte saved is a follower earned.