JavaScript Patterns JumpStart Guide (Clean up your JavaScript Code)

By Dan Wahlin

  • Release Date : 2013-08-30
  • Genre : Computers
  • FIle Size : 0.15 MB

Description

JavaScript Patterns JumpStart Guide (Clean up your JavaScript Code) Are you writing a lot of JavaScript code and finding that it's growing into an unmanageable mess? In this concise and focused jump start guide you'll learn how to fix common problems such as function spaghetti code and pollution of the global scope, and gain the skills necessary to write clean JavaScript code. By applying patterns, JavaScript code can be made more modular and easier to work with and that’s really the overall purpose of this guide. You’ll be provided with focused tips and sample code that will help you write maintainable, re-usable and consistent JavaScript.

Key concepts covered in this guide include:
• Function spaghetti code and why it’s bad
• The role of closures
• Namespaces and global scope
• Different techniques for defining variables
• Working with JavaScript’s prototype property
• The Prototype Pattern
• The Revealing Module Pattern
• The Revealing Prototype Pattern

The sample code shown is also available as a download.

keyboard_arrow_up