Appendix B. JavaScript for object-oriented programmers

 

There are many routes into becoming a JavaScript programmer, ranging from graphic design to a serious programmer coming up from the business tiers.

This appendix won’t aim to teach you how to program in JavaScript—there are already many good books and articles to help you do that. What I intend to record here are a few core concepts that will help Java and C# programmers make the leap to JavaScript programming in a relatively painless way. (The same is true to a lesser extent of C++ programmers, but C++ inherits a lot of strange flexibility from C, so that JavaScript should prove less of a shock to the system.) If you are a serious enterprise programmer with a grounding in OO design principles, then your first approaches to JavaScript may be overly influenced by your experience with languages such as Java and C#, and you may find yourself fighting against the language rather than working with it. I certainly did, and I’ve based this on my own experience as a programmer and in mentoring others along the same route.

B.1. JavaScript is not Java

B.2. Objects in JavaScript

B.3. Methods and functions

B.4. Conclusions

B.5. Resources