JavaScript is really a misunderstood language compared to the dynamic scripting languages of Perl, Python, and so on. This is especially true for translators who have come from the late 1990s to the C + + programmer. In those days, mentioning JavaScript was always reminiscent of a variety of fancy gadgets, nasty pranks, fight between browsers (IE and Netscape, for example), and unpleasant scenes. All in all, my long-standing comment on JavaScript is basically negative, and I think it's just a heterodoxy, off-the-side toy.
But with the explosive development of Ajax technology in the first 10 years of the 21st century, it was suddenly realized that JavaScript could have created such an amazing user experience for Web pages, and that before that, most Web pages were just some passive e-publications. Today they are truly a "utility" that can be instantly interactive, customizable, and so on. In short, you can do in the desktop program, it basically has been done. It's a lot of people's expectations, including me.
People can't help but ask, it seems that the core of Ajax XMLHttpRequest object is not a new thing ah, why until recently discovered this usage? The reasons for this are diverse. For example, without the development of the broadband industry, even the delay cost of sending the lightweight data like JSON is unthinkable. However, the translator believes that the most important reason is the standardization of the language itself. Without ECMA-262 this standard document, the major browsers in the client's performance is completely inconsistent, we have no way to implement the MVC pattern of the Web application to achieve the separation of behavior, appearance, content. In that case, the cost of development is obviously unacceptable.
And once we have used the MVC pattern in our programming, it means that our design ideas have entered the field of object-oriented. Object-oriented thinking is of epoch-making significance in programming methodology. It signals that the reuse of our code targets the implementation of the interface, thus forming a trend of modular programming. This allows us to replace different implementation modules at any time to make our code more resilient to change and easier to maintain. As a result, various cost reductions have accelerated the commercialization of this programming approach.
The object-oriented nature of JavaScript differs from any other language, and in a sense it is more oriented toward the "object" than any other language (since it is almost anything but "object"). This makes it more flexible, more dynamic, and more accessible. Now it's time to re-learn the language of JavaScript and its object-oriented features. I hope this book will bring you useful information.
The translation of a book is never a person's credit, thanks to the people's post and telecommunications publishing house Chen Yikang Editor and Microsoft Research Asia Xu Ning Engineers in this book translation process to give me the help and encouragement. In particular, Xu Ning engineers also undertook the first draft of the 8th chapter of the translation work, thank him for his pay. I hope this book will also bring you happiness.
JavaScript Object-oriented Programming Guide translator sequence