Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Maintainable JavaScript: Writing Readable Code 1st Edition
Purchase options and add-ons
You may have definite ideas about writing code when working alone, but team development requires that everyone use the same approach. With the JavaScript practices in this book―including code style, programming tips, and automation―you will learn how to write maintainable code that other team members can easily understand, adapt, and extend.
Author Nicholas Zakas assembled this collection of best practices as a front-end tech leader at Yahoo!, after completing his own journey from solo hacker to team player. He also includes rules recommended by other industry authorities. Use these tips and techniques to help your team set aside individual preferences and function at a higher level.
- Establish specific code conventions for your team
- Use tools such as JSLint and JSHint to keep your team on track
- Adopt style guidelines, such as basic formatting, to help your team produce uniform code
- Apply several programming practices to solve problems and improve code quality
- Create an automated JavaScript build system using a variety of utilities
- Integrate browser-based JavaScript testing with tools such as the YUI Test Selenium Driver
- ISBN-101449327680
- ISBN-13978-1449327682
- Edition1st
- PublisherO'Reilly Media
- Publication dateJuly 3, 2012
- LanguageEnglish
- Dimensions7 x 0.56 x 9.19 inches
- Print length238 pages
Products related to this item
From the brand
-
Your partner in learning
-
Bestsellers
-
Software Development
-
Programming Languages
-
AI / Machine Learning
-
Data Science
-
Data, Databases and more
-
Cloud Services
-
Business
-
Finance
-
Blockchain / Cryptocurrency
-
Security
-
Lean series
-
Cookbooks
-
Head First series
-
97 Things series
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
Editorial Reviews
About the Author
Product details
- Publisher : O'Reilly Media
- Publication date : July 3, 2012
- Edition : 1st
- Language : English
- Print length : 238 pages
- ISBN-10 : 1449327680
- ISBN-13 : 978-1449327682
- Item Weight : 2.31 pounds
- Dimensions : 7 x 0.56 x 9.19 inches
- Best Sellers Rank: #6,896,029 in Books (See Top 100 in Books)
- #1,436 in JavaScript Programming (Books)
- #10,065 in Computer Programming Languages
- #17,138 in Programming Languages (Books)
- Customer Reviews:
About the author

Nicholas C. Zakas is a front-end consultant who specializes in user interface design and implementation for web applications using JavaScript, Dynamic HTML, CSS, XML, and XSLT. Has has 15 years of web development experience and spent nearly five years at Yahoo! in various roles, including principal front end engineer for the Yahoo! homepage and contributor to the Yahoo! User Interface (YUI) library, having written the Cookie Utility, Profiler, and YUI Test.
Nicholas is the author of Professional JavaScript for Web Developers and High Performance JavaScript, a co-author on Professional Ajax, and a contributor to Even Faster Web Sites. He has also written for several online sites such as WebReference, Sitepoint, the YUI Blog, A List Apart, and the Web Performance Advent Calendar.
Nicholas regularly gives talks about web development, JavaScript, and best practices. He has given talks at companies such as Yahoo!, LinkedIn, Google, Netflix, TripAdvisor, and NASA, and conferences such as the Ajax Experience, the Rich Web Experience, OSCON, WebDirections, Fronteers, and Velocity.
Through his writing and speaking, Nicholas seeks to teach others the valuable lessons he’s learned while working on some of the most popular and demanding web applications in the world. He firmly believes that no difficult problem should need to be solved more than once.
Related products with free delivery on eligible orders
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
- 5 out of 5 stars
Useful read for team working on big JavaScript projects
Reviewed in the United States on October 7, 2013This book is must read for every team that is working on bigger JavaScript project. The author
has that kind of experience, he worked in the development of the Yahoo page and explains what
practices should be followed in order the code to be scalable, readable and maintainable.
If you are experienced developer you may know the most of this stuff. I have experience in OO programing
but I am relatively new in JavaScript so this book helped me to understand some practices and principles
that are specific for JavaScript. In my opinion the part where the configuration for build, documentation
tools is explained can be shorten because you have the specific tool documentation for that.
If JavaScript team reads this book before beginning of the project and implements the advices and practices
written here it will have much easier job later in the project.
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 4 out of 5 stars
Great practical material
Reviewed in the United States on May 19, 2013This book works well as a supplement to other more technical JavaScript books. It is an easy read that had me checking bits of my code as a result. Like others, such as "JavaScript: The Good Parts" by Douglas Crockford, you don't need to read front-to-back as the sections are self-contained and well indexed.
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
I wish every FED would read this book.
Reviewed in the United States on October 25, 2016Zakas is easily one of the best figures in front-end development, and specifically JavaScript. I recommend all of his books and various youtube videos as well. Heck, I even found him on front-end masters, and continue to learn from his easy to understand approach to grasping some very difficult concepts.
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
An excellent guide to practicing better habits.
Reviewed in the United States on January 26, 2013Few books leave you feeling tangibly better at practicing a computer language. This book is one of them. If you're not sure whether or not you have good habits and a good process for working on javascript projects, you will after completing this book.
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 4 out of 5 stars
good introductory book
Reviewed in the United States on March 21, 2014Very good introductory to style guides. Also read "clean code" if you want more in depth style guidelines and don't have trouble reading java code.
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 3 out of 5 stars
Not the book I was expecting but a nice reference for how to write code
Reviewed in the United States on July 23, 2013I wanted something with a few more real world examples but I found the book to be like an english primer. telling me how the code should be written but with very basic examples that don get into the more complicated scenarios. If you are knew, read this to know how to format what you write and structure for longevity of the code base but don't expect to learn how to "write" code with it.
3 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Learn about JavaScript and code organization for any language
Reviewed in the United States on January 22, 2013Very concise and easy to read. Lots of great organization tips to think about when writing in any language plus lots of JavaScript details that I had no idea about having mainly learned JavaScript through examples.
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Good reference to develop clean and maintainable javascript code.
Reviewed in the United States on July 5, 2012"Maintainable JavaScript" by Nicholas Zakas (O'Reilly 2012) is a very useful book for programmers who have just started writing javascript code or, for intermediate developers who would like to develop clean and maintainable code. The book is written in a very simple language that is easy to understand and follow.
As the title of the book suggests, the book is aimed at capturing the essential aspects of writing javascript code that is easy to maintain. I liked the flow of the book but I felt that the first few chapters in part 1 could be skipped if the reader is aware of the material.
In part 1 of the book (Style Guidelines), Zakas has given in-depth analysis of styling guidelines to follow that are sometimes skipped when writing large pieces of Javascript code. He touches upon styling guidelines such as: naming conventions, adding comments in the code, understanding the usage of semi-colons etc.,. Some good example use cases and the methodology of using the style guides is presented so that these ideas stick in your mind and become part of the programmers habits.
In part 2 (Programming Practices) - I especially liked the chapter 6 on `avoid global variables' since I have used global variables in my JavaScript but did not think through the caveats of using them. Similar to part 1 of the book, I liked the use cases that the author proposed to describe advantages and disadvantages of several programming aspects that are described in the section. In addition,one of the best described chapters in this section is the material on throwing your own errors (helping you to debug JavaScript code) which I do most of the time using firebug tool on Firefox. Even though this method works I might have to start using some of the techniques described by Zakas in the book, using fascade design pattern on top of objects that are not yours (very interesting outlook) etc.
Part 3 - I like this section a lot especially the material on minification, compression of JavaScript files as the script code adds time delay in loading of the page on the browser. Compression, minification techniques described by the author will definitely help with improving the load performance of the page in the browser.
Some of other things that would have helped me or any other intermediate JavaScript developer is inclusion of example or exercise files for some sections in `part 2'. Examples and exercise files would have helped the understanding of chapters 10, 11 and some sections in part 3 like chapter 17.
It is also interesting to know that author did make an attempt to include Html5 changes for JavaScript in some chapters of part 2 of the book.
I would recommend this book if you are an intermediate developer like me or novice developer for JavaScript code and would like to work towards methods for improving your code and writing a maintainable javascript code as this is book easy to understand and follow.
4 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Top reviews from other countries
nockedlee765 out of 5 starsFive Stars
Reviewed in the United Kingdom on February 5, 2017Very good book!
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Willy Van den Driessche4 out of 5 starsHow to write good JavaScript and how to organize your code
Reviewed in France on September 27, 2012I particularily liked this book. The author is a JavaScript veteran who has gone through all anti-patterns himself. The books teaches you a lot of reasonable conventions to stick to. In most of the cases the author carefully explains why doing it this or that way is actually the best idea. One of the shocking things is his advice "don't test aginst null". But if you read the chapter then it all makes sense. I actually learned a lot about the language while reading this book. I still don't like the language but now I can see how smart peaople have established conventions around the sometimes idiotic rules of the language. Finally, this book also talks about tools you can use to automate the testing and buildingof your Javascript files.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Jo Segers5 out of 5 starsVery good
Reviewed in Germany on December 16, 2013This is a must read for any javascript programmer.
Its is written in a style that allows easy reading and everything is explained with good examples.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Racchio5 out of 5 starsUtilissimo per i principianti.
Reviewed in Italy on August 4, 2015Questo libro è breve, conciso ed utilissimo. Non vi insegnerà il linguaggio ma i modi migliori per scrivere codice pulito, leggibile e mantenibile. Se siete principianti vi sarà utilissimo e anche se siete esperti potrebbe darvi qualche interessante dritta.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again


![Computer Networking Bible: [3 in 1] The Complete Crash Course to Effectively Design, Implement and Manage Networks. Including Sections on Security, Performance and Scalability](https://m.media-amazon.com/images/I/41H4YJnxKgL._AC_SR100,100_QL65_.jpg)



