Home > Web Front-end > JS Tutorial > body text

Recommended JavaScript learning books

黄舟
Release: 2016-12-20 15:18:18
Original
1368 people have browsed it

Talking about my choice of books, after gaining a good user experience from advanced programming and DOM programming art, I basically continued the path of choosing translated books. I just followed the trend and there was no special factor in it. I generally do not recommend the original English book. Chinese is more accessible. JavaScript is not a very advanced language. I believe that translators can translate based on a deep understanding of the original text. I also read some foreign books. And often when I know that a good book has a publication plan, I will stop reading intensively and wait for the translation to be published (such as the recent "High-Performance JavaScript"). However, sometimes I encounter inconsistent translations of terminology or even unsound translations. Fortunately, you can find English electronic versions of most books on the Internet. If you really don’t understand something, you can just compare it. The following are books that I have read intensively and found them good. I will first divide them into categories and then share my reading experience one by one. :
First Batch: Entry-level, also suitable for non-front-end engineers who want to master some front-end skills.
Second Batch: Become a qualified front-end engineer
(or )


The third batch: Better code, better design

The fourth batch: From language details to complex engineering practices, if you want to develop reliable low-level codes, you should take a look



I have been waiting for:

Extra chapters: various special books. After reading the second batch of books, I will pick up the book if I have the energy.





( Or )
(or )
should choose:

should choose :

The Art of JavaScript Dom Programming (Second Edition Link)

The Chinese title of this book is somewhat misleading. If I had known that this was just an introductory book, I won't buy it. I read it the day after I got it. It doesn't really help me with my skills. However, the language of this book is very fluent. The important thing is that I have a good grasp of the depth of knowledge. html/ All aspects of js/css/dom are grasped at a suitable level, which is in line with my expectations for books. Step by step, every step is practical.
This book introduces front-end development step by step through several examples. In all aspects, everyone can understand the overview of the front-end technical system and have some simple hands-on skills. If you have some feelings about the "Overview of the browser-side technical system - Seven weapons of front-end development" that I wrote before, Then reading this book will help you get started with it.
A survey was conducted on the Douban website of last year’s Taobao Front-end Lazy Exchange Conference. If you have to recommend a book on JS that is suitable for newcomers to learn, what is your recommendation? What is it? Although not many people voted, this book is far ahead.

JavaScript Advanced Programming (Second Edition Link)

The first edition of this book is very comprehensive and not boring. It is very valuable for the young NCZ to have such a masterpiece. After reading this book, your front-end skills can be improved to a higher level, and you can basically become a professional front-end engineer. .
For me at the time, this book timely supplemented the knowledge about browser compatibility, especially the knowledge related to events. This is the biggest difference between browsers. Some contents are very simple and clear, such as call and apply. I never understood the usage well before. NCZ explains it clearly in a few sentences + an example.
However, as a comprehensive book, the first edition also has some problems:
1. Closures are only half a page long, not Make it clear.
2. Anonymous functions are not mentioned much.
3. The whole book does not mention constructor, let alone hasOwnProperty, __proto__.
This brings about the problem that I mentioned before, and this knowledge is basically It was supplemented by reading "The Definitive Guide to JavaScript". Of course, the authoritative guide of that time also had the same problem. For example, it did not explain instanceof. It also did not mention __proto__. This caused my incomplete understanding of object-oriented. At that time, after doing many tests, I was still very distressed and wrote a blog post "JavaScript constructor and instanceof, a pair of happy enemies in JSOO". Later, I came into contact with "JavaScript Design Patterns", a comprehensive discussion of OO. After that, I decisively deleted this JY.
I believe that the second edition of this book and the sixth edition of the authoritative guide will definitely add supplements in these aspects. However, both of these books are complete tomes and advanced programs. The second edition of Design is already thicker than the authoritative guide without the appendices.
A comprehensive and non-boring book is too hard to find, so I still like the first edition. It helped me a lot to improve my skills. I can’t help but Show me another picture (Alimama.com was under closed development at the time, and Jack Ma came here often. He didn’t want to sign on the first page of the book to make it look like he had written it, so he drew his signature on the second page.)

Mastery JavaScript

I will divide books into two categories, one is comprehensive and the other is sharp. I introduced a comprehensive book before, and the characteristics of this book introduced next are very sharp. The characteristics of this kind of book The characteristic is that the author can find the right key points (the 2/8 principle is very good) and dig deep into the key points. The author of this book, John Resig, is also the author of JQuery. He is obviously a sharp enough person. JQuery never promises to solve the problem. All problems, but some breakthroughs in key areas have made this library so popular. This book does not focus on JQuery, especially JQuery-style code writing, but is still based on native JavaScript and DOM API.
List some of this book The key topics can clearly see why the author developed JQuery, or why JQuery is what it is now:
1. How to create reusable code? How to debug and test? (This is the basis)
2. How to judge when the DOM is loaded? How to traverse and modify the DOM? (JQuery takes the DOM as the core, adding, deleting, modifying and checking nodes, and event response is the focus)
3. How to determine the position of the element relative to the page/screen? How to do smoothing animation? (Think about it, there are many topics related to CSS, why did the author choose these two?)
4. How to improve form validation and encapsulate a complete Ajax program? (Involving data interaction, it is another top priority.)
It’s not a thick book, it’s basically the above topics + a few examples. After we read a comprehensive book and gained a deep understanding of front-end knowledge, the author of this book pointed out the future The key points, and tell everyone how to apply knowledge to solve key problems.

The Essence of JavaScript Language

I recommend you to read Teacher Ruan Yifeng’s blog post "The Birth of JavaScript", JavaScript is designed by master Brendan Eich in 10 days The language developed by it has now become the only language in the field of Web front-end.
On the one hand, this language draws on the strengths of many others, which also helps it maintain its long-term vitality:
"1. Learn from the basic syntax of C language;
2. Learn from the data types and memory management of the Java language;
3. Learn from the Scheme language and elevate functions to the status of "first class citizens";
4. Learn from the Self language and use the inheritance mechanism based on prototypes . "
On the other hand" because the design time was too short, some details of the language were not considered rigorously enough. As a result, the programs written in Javascript were chaotic for a long time. Brendan Eich's evaluation of his 10 days of work is: "What's great about it is not original; what's original about it is not great." ”

Douglas Crockford conducted a major trial on JavaScript through the book "JavaScript: The Good Parts". The veteran believes that the JavaScript language has many excellent aspects, but also some weak points and dross. The veteran is not opposed to the use of this language, but is avoiding some After being useless and dregs, it is naturally excellent.
Experts believe that the beautiful features of JavaScript are as follows:
1. Functions are first-class objects (can be used as parameters and return values ​​of other functions, and support closures)
2. Dynamic objects based on prototypal inheritance
3. Object literals and array literals (which form the basis of JSON)
Lao Dao lists a lot of useless things and dross, and provides the tool JSLint to verify whether the bad parts are used in the code. What is given in the book The syntax diagram gave me the urge to learn more about "Compilation Principles", and I also understood the theoretical basis of JSLint as a tool for analyzing JS language.
It is strongly recommended that you use JSLint to detect your own code, but we don't have to Dogma, we can violate some of the detection rules, as long as we understand why the Taoist set this rule, what are the risks? If we don't follow this rule, can we avoid the corresponding risks?
I think the most important significance of this book is Tell us why "it is useless, it is dross". This is what mature developers should pay attention to after previous learning and a lot of practice. For example:
1.hasOwnProperty, the reason why veterans say it is dross is because it is not a key word, but a method that can be overridden on Object.prototype. So this tells us not not to use hasOwnProperty, but to be careful not to overwrite it.
2. The main problem with eval is performance. A large number of eval (class eval) statement reduces the performance of the JS engine. After testing, the performance of a small number of eval statements + eval large sections of JS text is not bad, and you can consider using it if necessary.

JavaScript Design Patterns

This is an introduction to JavaScript A very good book on object-oriented programming and design patterns. Compared with another comprehensive book on language essence, a sharp book appears.
My view on object-oriented is: hide details and facilitate expansion. Based on good abstraction and encapsulation , we can conveniently carry out top-down design and bottom-up development. The advantages and disadvantages of object-oriented are not the focus of this article and will not be discussed here. I can only say that this is a very good code design and implementation methodology.
JavaScript in the end Is it an object-oriented language? In essence, it must be yes. From the appearance, OO is not so obvious. We must use some additional code to implement features such as public/private division, interface, inheritance, polymorphism, etc. Because The flexibility of the JavaScript language can be implemented in many ways. The first part of this book has a very good summary of best practices for two common implementation patterns: class inheritance and prototypal inheritance. So my idea is to fully understand it. It, and then just follow this. If the practices introduced here are strong enough, we don't need to invent a new inheritance implementation model. In fact, YUI has always been this model, and the new JavaScript engine even introduced Object.create Method, write some actions into standards and build them into the JS engine.
We should focus on design patterns. The examples in the GoF design patterns book are not all easy to understand for front-end development, but The examples in this book are all front-end related, which helps everyone understand the subtleties of design patterns. Some students said that even if I don’t understand the theory of GoF, I am still using these patterns silently. This is indeed the case, but I think We pay attention to design patterns, not only to learn what various patterns are like, but more importantly, to learn when various patterns are suitable and when they are not suitable. Understand what the advantages and disadvantages are, and what you are using silently Are there any hidden dangers in the model? After studying the system, you will be more confident about it.
I heard from my colleagues a few days ago that this book is completely out of stock. I don’t know if it is too popular or because there are too few prints. I hope to see it on the shelves as soon as possible.

Secrets of the JavaScript Ninja

has entered the fourth batch. Most of the books here are not published in Chinese translation. At this stage, if you want to develop reliable underlying class library code, you really need to read some foreign books. There are many English books and I don’t have the energy. Read a lot, usually some books with good reputations.
This is the second book by the author of JQuery, a representative of the sharp type with natural advantages. John Resig has successively released most of the content of this book and started writing it in 2008. The plan Published in May 2012.
If JR’s first book can tell why JQuery exists, then this book can tell what the author paid attention to in order to develop JQuery. We will see some very detailed content, such as It emphasizes the construction of test cases/automated testing methods, such as how to use the length attribute of each function instance, such as thinking and divergence of with, eval, etc.
I still can’t figure out the specific benefits of this book. It’s very good to open your eyes. I remember that Uncle Yu organized a group of classmates to translate, but I don’t know how it went.

JavaScript Patterns

At first glance at the title of this book, I thought it was another book about design patterns. It was the same as "JavaScript Design Patterns", so I didn't pay close attention to it at first. This year Ba Chi recommended it, and I discovered that it was not just a book about design patterns. Introducing the design patterns of GoF but covering advanced theories in all aspects of front-end development. Although this book is from 2009, many of the more profound changes in the past two years can be seen in this book. The previous book was sharp, but this one is more comprehensive.
The author Stoyan Stefanov is a front-end technical expert at Yahoo. From this book, you can see many of the origins of YUI3 design, such as the module mode/sandbox mode introduced in the object creation mode. The recent popularity of CommonJS Loader is based on this Continue to dig deeper. This book also includes many details in various processes such as code testing, packaging, deployment, loading strategies, etc. These constitute a complete system and have very good practices in Yahoo and YUI3.
I heard that our colleagues Bachi and Yizhou are translating this book and are looking forward to it.

ECMA-262
This is not a book, it is a series of ECMA-262 standard analysis articles written by a Russian guy. The ECMA-262-3 series is already complete. Standards are as boring as assembly language, and this series of articles transforms boring standards into a series of in-depth discussion topics. With just the right examples, everyone will definitely have a better understanding of the JS engine.
There are some translations on the Internet, but Since there are relatively few translations of similar articles, many of which have not been unanimously expressed in English, it is recommended to read the original English text. In addition, the author is very good. If you encounter difficult problems, you can quickly receive good replies if you consult him.

Looking forward to it :A book written by a JavaScript language author or engine implementer
I have always been looking forward to a masterpiece like K&R on C language for JavaScript. I have recently been reading Introduction to Computer Systems to catch up on some knowledge I didn’t learn in college. I really agree with the book.” "Bottom-up" learning route. I think a thorough analysis of the JavaScript engine can reduce the situation of everyone looking at the experimental results and guessing about writing a book. With the popularity of NodeJS, there are more and more technical analysis articles on the engine. I look forward to it. Masters will soon appear.

Guide to High-Performance Website Construction Advanced Guide to High-Performance JavaScript

Entering the extra chapter, the recommended books are all works in targeted fields, and the content is often not advanced. Everyone should base their opinions on their own actual situation. Choose to read according to the situation.
High-performance web pages are an inevitable pursuit of the front-end. Steve Sounders took the lead in launching special research in this area at Yahoo. With the publication of the "High-Performance Website Construction Guide" and the release of the YSlow tool. Website performance optimization , especially the optimization solutions from the front-end perspective and the operation and maintenance perspective, have entered people's field of vision and achieved great results, and even formed an industry called WPO (Web Performance Optimization).
In addition to introducing the solutions that can achieve immediate results, the first book The rules also opened up people's wisdom. Everyone began to think about how to optimize and how to optimize based on their own application practices. The next two books are basically practical summaries that follow the optimization ideas. About the tools, ideas, and methods of optimization This is what I particularly emphasize. Interested students can read this article after Yslow 34 Rules - Website Performance Optimization Ideas and Progress.

Works in other fields

The following will introduce these special books, which are not particularly recommended. , there are often many books to choose from for each topic, feel free to write down some reading experience.
Ajax in Practice: This book was purchased in 2006 very early. The book introduces many topics related to advanced RIA applications, which is very eye-opening. .
JQuery in practice: I definitely need a book that introduces JQuery. This book is okay, but it seems to be relatively old now. JQuery has been updated a lot. I mainly learned about JQuery’s tool function extension mechanism and plug-ins from this book. How the mechanism is implemented. JQuery allows students who have no understanding of prototype attributes to write reusable complex components. It is not easy. I will write some views on JQuery separately in the future.
Proficient in CSS: You must need a book This is a book that introduces CSS. I haven’t used CSS in depth at work, so I won’t give a special introduction.
You must know regular expressions: You must need a book on regular expressions. This booklet is very convenient to check.

HTML5 Secrets and HTML5 Advanced Programming have not been read since I bought them. I still have an understanding of the new features of HTML5. I will read and review them when I can use them.

I hope to see books on NodeJS and introduce them as soon as possible.

Written at the end
I can only recommend books that I have read, so everyone understands.
We don’t compare various electronic products, just compare eggs and rice. Books are very cheap.
When you have someone in the field After a certain amount of practical experience, it is not difficult to read a relevant book, and it does not take a lot of time.
Comprehensive books can steadily improve everyone's skill level Step By Step, allowing everyone to stand tall and steady. .
Sharp books can help you understand the key points and understand how others use the knowledge that you know.
Special books are good at broadening your horizons and helping you complete your work tasks.
For non-English majors, If there is a Chinese translation, we don’t have to worry about reading the original version. We want to learn knowledge as quickly as possible and enter thinking and practice as quickly as possible.
Thanks to the author and translator (there are many translators among my colleagues who say that this is the way to make money) Impossible), and the teachers who chose to publish these books


The above is the recommended content of JavaScript learning books. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template