A List Apart

Menu
Issue № 375

The care and feeding of JavaScript.

The Design of Code: Organizing JavaScript

by Anthony Colangelo31 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 Murphey27 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

Matt Griffin on How We Work

Being Profitable

So you own a business. It’s the best job you’ve ever had, and it will be forever—as long as the business stays viable. That means understanding when it's profitable, and when you may have to make some adjustments. Don’t worry—it doesn’t require an accounting degree and it won’t turn you into a greedy industrialist.

From the Blog

Ten CSS One-Liners to Replace Native Apps

Håkon Wium Lie is the father of CSS, the CTO of Opera, and a pioneer advocate for web standards. Earlier this year, we published his blog post, “CSS Regions Considered Harmful.” When Håkon speaks, whether we always agree or not, we listen. Today, Håkon introduces CSS Figures and argues their case.