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

Rian van der Merwe on A View from a Different Valley

Why?

Little kids have an endless supply of Why! Why is everything the way it is? Why do people do the things they do? We grownups don’t pester each other with a relentless stream of why?, and that’s mostly good. But kids could teach us to ask why when it needs to be asked: why are only some people able to build lives they love and find fulfilling work? Does everyone truly have the same chance, or do some of us start the game already a few rolls of the dice ahead? In order to grow, we have to ask the hard questions.

From the Blog

Context Makes Our Devices

When it comes to new devices, context is everything. Smartphones and tablets gained popularity because they were useful in situations where our laptops weren't. Will smartwatches do the same? Anthony Colangelo looks at the context of these new devices and how they might reach their full potential.

Accepting Our Lack of Control

Accepting the “ebb and flow of things” is as challenging today as it was 15 years ago. Susan Robertson explores what it means to accept our lack of control on the web and shares how she acknowledges this in her work—from the CSS she writes, to the conversations she has with team members.