Much of the JavaScript sample code you see is written like script. It's not structured or modular or layered. In other words, it doesn't follow the generally accepted best practices we use when writing server-side code. In this session we'll take one of these script-like samples and incrementally improve it, adding structure, modularity and layering. In the end you'll find that, while there are differences, client-side coding does not have to feel foreign to server-side developers.
You will learn about:
- Keeping your functions and variables out of the global scope
- Adding structure to your JavaScript code
- Emulating object-oriented programming in JavaScript