
If you're like most developers, you rely heavily on JavaScript to build interactive and quick-responding web applications. The problem is that all of those lines of JavaScript code can slow down your apps. This book reveals techniques and strategies to help you eliminate performance bottlenecks during development. You'll learn how to improve execution time, downloading, interaction with the DOM, page life cycle, and more. Yahoo! frontend engineer Nicholas C. Zakas and five other JavaScript experts -- Ross Harmes, Julien Lecomte, Steven Levithan, Stoyan Stefanov, and Matt Sweeney -- demonstrate optimal ways to load code onto a page, and offer programming tips to help your JavaScript run as efficiently and quickly as possible. You'll learn the best practices to build and deploy your files to a production environment, and tools that can help you find problems once your site goes live. Identify problem code and use faster alternatives to accomplish the same task Improve scripts by learning how JavaScript stores and accesses data Implement JavaScript code so that it doesn't slow down interaction with the DOM Use optimization techniques to improve runtime performance Learn ways to ensure the UI is responsive at all times Achieve faster client-server communication Use a build system to minify files, and HTTP compression to deliver them to the browser
JavaScript (or any programming language for that matter) cannot be learned by just reading. One must actually write with the language to get used to the language, as well as gain muscle memory for the syntax. Do something, even something very simple, like a console-based game (which is essentially just a state machine), or create your own pub-sub library (which deals alot with object and array manipulation), or recreate some data structure (binary tree, linked lists, rings, etc.). These simple exercises can go a long way.
These books help as well.
- JavaScript: The Definitive Guide
- High Performance JavaScript
Learning more about the language is always going to help, though. I would suggest doing the CodeCademy track a second time to see if you've improved. Focus on writing efficient solutions that are better than what you would have done your first time around. Once that is done, give these resources a go:
- http://codeschool.com - http://lynda.com - http://teamtreehouse.com
I would also suggest purchasing these books, as they are somewhat the standard learning and reference resources:
- JavaScript: The Good Parts - JavaScript: The Definitive Guide
There are other books that will help tremendously, and a list of free ones can be found at http://jsbooks.revolunet.com
Other books I recommend:
- Eloquent JavaScript - Effective JavaScript - High Performance JavaScript - Maintainable JavaScript - Principles of Object-Oriented Programming in JavaScript - JavaScript Patterns - The Past, Present and Future of JavaScript - JavaScript Enlightenment - Secrets of the JavaScript Ninja
- JavaScript The Definitive Guide by David Flanagan - High-performance JavaScript by Nicholas Zakas - Object-Oriented JavaScript by Stoyan Stefanov - JavaScript Patterns by Stoyan Stefanov - JavaScript: The Good Parts by Douglas Crockford - Test-Driven JavaScript Development by Christian Johansen - Learning JavaScript Design Patterns by Addy Osmani - High Performance JavaScript by Nicholas C. Zakas
and am thinking about getting these:
- Maintainable JavaScript by Nicholas Zakas - The Past, Present, and Future of JavaScript by Axel Rauschmayer - JavaScript Web Applications by Alex MacCaw - Eloquent JavaScript by Marijn Haverbeke - JavaScript Enlightenment by Cody Lindley - Secrets of the JavaScript Ninja by John Resig
are there any others worth adding to my reading list or thoughts on these?
* JavaScript Patterns by Stoyan Stefanov
* Learning JavaScript Design Patterns - Addy Osmani
* High Performance JavaScript - Nicholas Zakas
After you read these three books you might become apt to write great, efficient JS code and know the underpinnings of the language, which IMO has a particularly curious design and might make you confused sometimes.
P.S: Check out the WTFJS website for being introduced to some strange behaviour of the language http://wtfjs.com/
Have a nice and busy week!
Secrets of the JavaScript Ninja by John Resig (2012) is a very hands-on look at writing a Javascript library: http://j.mp/RgOcXO
High Performance JavaScript by Nicholas C. Zakas (2010) is one of the most thorough treatments of performance and JS I have read: http://j.mp/V0R0X3
Professional JavaScript for Web Developers (2012 3rd edition) is an incredibly in-depth reference of JavaScript as it relates to the DOM. The third edition was heavily updated: http://j.mp/V3eGKC