Maintainable JavaScript and over 2 million other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
Trade in Yours
For a 5.00 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Colour:
Image not available

 
Start reading Maintainable JavaScript on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Maintainable JavaScript [Paperback]

Nicholas C. Zakas

Price: 26.99 & FREE Delivery in the UK. Details
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 1 left in stock (more on the way).
Dispatched from and sold by Amazon. Gift-wrap available.
Want it Tuesday, 22 April? Choose Express delivery at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition 11.12  
Paperback 26.99  
Trade In this Item for up to 5.00
Trade in Maintainable JavaScript for an Amazon.co.uk gift card of up to 5.00, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Book Description

3 Jun 2012 1449327680 978-1449327682 1

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

Frequently Bought Together

Maintainable JavaScript + Testable JavaScript + JavaScript Patterns
Price For All Three: 65.38

Buy the selected items together


Product details


More About the Author

Discover books, learn about writers, and more.

Product Description

Book Description

Writing Readable Code

About the Author

Nicholas C. Zakas is a front-end consultant, author, and speaker. He worked at Yahoo! for almost five years, where he was front-end tech lead for the Yahoo! homepage and a contributor to the YUI library. He is the author of Professional JavaScript for Web Developers (Wrox, 2012), Professional Ajax (Wrox, 2007), and High Performance JavaScript (O’Reilly, 2010). Nicholas is a strong advocate for development best practices including progressive enhancement, accessibility, performance, scalability, and maintainability. He blogs regularly at http://www.nczonline.net/ and can be found on Twitter via @slicknet.


What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

There are no customer reviews yet on Amazon.co.uk.
5 star
4 star
3 star
2 star
1 star
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.3 out of 5 stars  17 reviews
36 of 36 people found the following review helpful
3.0 out of 5 stars short and sweet (but if you've been around the JS block, you've heard a lot of this already) 31 May 2012
By R. Friesel Jr. - Published on Amazon.com
Format:Paperback
"Maintainable JavaScript" by Nicholas Zakas (O'Reilly 2012) is a short-and-sweet little text on (as the cover says) "writing readable code". And by "readable code", Zakas means "code that other developers not named [YOUR NAME] will be able to read and make sense of and ultimately maintain". It goes beyond maintainable and readable code though--Zakas takes us on a tour of how to deliver high-quality JavaScript that is testable and maximally performant in production. If you look at Zakas' catalog, this subject is right in his wheelhouse, and the book reads like either a sequel to his 2010 "High Performance JavaScript (Build Faster Web Application Interfaces)" or else as an expanded version of Chapter 24 of his 2012 "Professional JavaScript for Web Developers" (3rd edition, and still my favorite JS text). It's an opinionated book about formatting style, about programming conventions, and about ways of helping you (and your team) write code that is a lot less likely to blow up on you down the line.

Right off the bat: the target audience for this book is not advanced JavaScript developers. If you are an advanced JavaScript developer (or even many mid-level JS devs) then these are concepts that you are already familiar with. You've already dabbled in a style guide. You already know to minimize global variables. You already know to use feature detection. And there's a good chance you're *at least* linting, if not testing, if not doing both of those things *automatically* as part of your build. If that sounds like you, then you might want to take a pass. But before you do, give the table of contents a second glance. (If nothing else, you'll feel really validated.)

So who *is* it for? It's for novice and intermediate level JavaScript developers that want to get a better sense of what "readable" and "maintainable" code looks like. It's for folks that are plowing through the other "slim" JavaScript books in the O'Reilly catalog (e.g., "JavaScript: The Good Parts", or "JavaScript Patterns"). It's for technical managers who don't have a JavaScript background. It's for folks that want to start a book club for front-end devs and have spirited debates about ASI and how many spaces to indent when an expression continues on the next line.

As I worked through Part I ("Style Guidelines"), my initial impression was that Zakas was writing a how-to for writing JavaScript style guides. We have 44 pages of in-depth discussion on where to put curly braces, how many blank lines to use (and where), and what a proper comment looks like. Esoteric rationales to inform what (on the surface) seem like so much pedestrian banalia. ("Who cares what I name my local variables?") But by the end, there is a well-reasoned case made for all of the recommendations that will go on to appear in Appendix A.

Where the book becomes more interesting is in Parts II ("Programming Practices") and III ("Automation"). Again: the chapters that comprise Part II are going to seem like review for many seasoned JS devs: keep your JS and your mark-up loosely coupled; avoid global variables; keep configuration data separate from business logic; use feature detection instead of browser detection. As much of these may seem like review (especially if you've been keeping up with Zakas' blog posts), don't get cocky and skim it, either--there are some gems in there. (In particular I'm thinking of the chapter on Event Handling that spawned an interesting post by Ben Nadel.)

The chapters in the Automation section were my favorites. Zakas builds up a solid Ant-based build system over the course of 7 chapters that includes validation and linting, file concatenation and gzipping, minification, documentation, and automated testing. As I've become highly interested in the build process, I was riveted by these chapters. Zakas at least touched on every topic in the automation/build topic that I would have wanted to see. But that being said: I would have loved to see more on this subject. He provides a lot of excellent starter material, and Appendix B is a rich list of other jumping-off points, but it also seemed... shallow? Like he was just scratching the surface? This seemed especially true of the chapters on documentation and testing.

All in all? I would strongly recommend this to folks that are new to JavaScript, but only a mild nudge to seasoned folks.
3 of 3 people found the following review helpful
5.0 out of 5 stars Good reference to develop clean and maintainable javascript code. 5 July 2012
By Manju - Published on Amazon.com
Format:Paperback
"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.
2 of 2 people found the following review helpful
4.0 out of 5 stars A worthy sequel to Douglas Crockford's Javascript: The Good Parts. 4 Sep 2012
By attebury - Published on Amazon.com
Format:Paperback
TL;DR
It's easy to blaze your own coding trail, perhaps particularly so with Javascript. This book provides a comprehensive glimpse into the workflow and practices of an experienced Javascript developer. It's a good read whether you're blazing your own trail or trying to clear one for a group.
####
Maintainable Javascript provides a useful mix of intermediate and advanced Javascript concepts and practices based on widely accepted theory and grounded in the author's real world experience.

The book is broken into 3 sections.
1. Style Guidelines
2. Programming Practices
3. Automation

Style Guidelines
A nice survey of style guidelines found in several libraries and well-known approaches to coding Javascript including JSLint and JSHint.

Programming Practices
Presents a great deal of information from both the author's experience and general theory. I learned something even in the areas in which I was already familiar.

Automation
Convincing arguments for automation with helpful examples.

Maintainable Javascript reads like a worthy sequel to Douglas Crockford's Javascript: The Good Parts.

I reviewed this book as an ePub on the iPad for O'Reilly's Blogger Review Program.
2 of 2 people found the following review helpful
5.0 out of 5 stars Every lead js developer should have this book handy 19 Jun 2012
By kevinw - Published on Amazon.com
Format:Paperback
Some of the book was familiar to me as I feel experienced with JavaScript. The second half of the book is where I really learned some things new. In particular, the build process section was of high interest to me and I really learned a lot from it. I usually keep this book open in .pdf format for quick reference when I need it. If you're serious about your JavaScript, care about your code and having your team stay organized then you should have this book in close reach.
4.0 out of 5 stars good introductory book 21 Mar 2014
By heng zou - Published on Amazon.com
Format:Paperback|Verified Purchase
Very 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.
Were these reviews helpful?   Let us know
ARRAY(0xa99c9594)

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Look for similar items by category


Feedback