JavaScript Patterns JumpStart Guide (Cleanup your JavaScript Code)
Are you writing a lot of JavaScript code and finding that it's growing into an unmanageable mess? In the JavaScript Patterns JumpStart Guide you'll learn how to clean up JavaScript code and fix common problems such as function spaghetti code, polluting the global namespace, and writing unstructured code. By applying patterns, JavaScript code can be made more modular and that’s really the purpose of this concise and focused guide. You’ll be provided with numerous tips and practical samples that will help you learn how to write maintainable, re-usable and consistent JavaScript code.
Key concepts covered in this jumpstart guide include:
• Function spaghetti code and why it’s bad
• The role of closures
• Namespaces and the global scope
• Different techniques for defining variables
• Working with JavaScript’s prototype property
• Techniques for dealing with the "this" keyword
• Techniques for extending and overriding code
• The Prototype Pattern
• The Revealing Module Pattern
• The Revealing Prototype Pattern
The sample code discussed in the guide is also available for download.