Write to a friend who wants to learn JavaScript a little bit of learning experience-basic knowledge

Source: Internet
Author: User
Tags closure xml xpath xpath
Of course, just personal experience, there is nothing wrong also please master forgive and correct.

Advice to training schools: don't say that there is no such school, there is a special school also do not go, because there will be no good teachers. Don't waste your money and time on yourself (most likely your parents). The idea of dying early.

About the training of this school I think I have a better voice than the average friend, because I myself in English training for nearly 2 years, I am very aware of the training market situation, you can hardly meet a good teacher. English may also be better, after all, English speaking good teacher still more, long-term with the foreigner bubble together, indeed the oral ability of the improvement is very significant, but the price is very expensive. And now you want to learn is JavaScript, oh, good front-end engineers are not many!

My personal point of view, qualified and able to teach the good JavaScript teacher, must be a good front-end development experience with rich front-end engineers. University teachers, professors probably few of them meet this requirement, and good front-end engineers are busy with their work. The rest of us have time to teach JavaScript, hehe, don't say much.

Here also grumble, we learn in the university campus, you do not know what the meaning of this thing, you do not go to study, the teacher he will not tell you. In the training school, hehe, also similar.

If not a good front-end engineer, he can hardly tell you why we are now advocating the use of closures to put the previous global variables in the closure as a closure function of the local variable? It's also hard for him to tell you a little about the scope of JavaScript variables. What is there in JavaScript that can form scope (scope)? Why is the global variable the devil? What is the scope of closure? This is a very basic, but important knowledge of the meaning that he is not clear, will give you a hearing, so that you understand the knowledge and their meaning is more difficult.

Oh, so my suggestion, want to learn JavaScript, or more with your friends around, especially those engaged in front-end development engineers more exchanges and learning. Myself to delve more. Oh, do not know the front-end engineers, to the cloud habitat community and blue ideal to see more (bbs.blueidea.com, remember!) This is not an advertisement. , but I would like to say a good study habit here. When do you ask questions?

When do you ask questions? Is that a problem? Yes, a lot of people, but also a lot of students in the school a bad study habits, a problem asked others ask for help. I personally this is a bad habit. Is it a bad habit to ask questions? Right, I personally feel that you ask questions and seek help from others, should be in your own brain after thinking, through a variety of ways to access the relevant information can not obtain the final solution of the problem to ask again? So you've done a research on the problem you're trying to solve, and you know, you can tell people in more detail what kind of answer you want, or you can talk more clearly about the problem you want to describe. This way, when someone else is going to solve your problem, you can make a quick answer. I think you will learn more and understand the problem more deeply.

Well, it seems to be a little far away. Let's talk about how to learn JavaScript! First pour some cold water on everyone, I want to tell you is: JavaScript than other development language is difficult to learn!

Why? Because for now, everyone (domestic and even foreign programmers) are generally familiar with the programming language of JavaScript (allow me to say so) not enough to understand and research, at least not as much as we know about java,c# and so on. So this raises another question, and now the JavaScript books on the market are not sufficiently in-depth and comprehensive to explain the language of JavaScript. Of course it is relative to java,c# such language. So this leads to the difficulty of learning JavaScript. Of course, learning any programming language, especially learning, not easy to learn sperm.

But there is also good news, that is now the emphasis on JavaScript and more in-depth research, now JavaScript books to explain the content is much higher than the 4 years ago the quality of too many, so to speak, you now start JavaScript is just the time Oh! Oh! So here is also a lesson to you, buy JavaScript books, it is best not to buy 4 years ago, that is, 2005 ago published. It's best to buy books published nearly two years ago.

Here, I want to talk about a phenomenon, with this people in recent years to the importance of JavaScript and research, mainly many traditional programmers began to learn and study JavaScript, they put object-oriented programming ideas into the front-end development of JavaScript, Greatly promoted the promotion and development of JavaScript. Thank them very much for this. Maybe it's the influence of the traditional development ideas of these programmers, and now our JavaScript libraries are springing up.

Oh! Java has a library of Java and a variety of frameworks, C # is also modeled Java, but also has a rich development library. These libraries have brought great convenience to our development, which is a very good thing. So these traditional programmers in the front-end development, but also for themselves to write a library. We are familiar with the prototype,jquery,yui,ext and so on, I will not enumerate. Of course, the emergence of these libraries for our front-end development has brought great convenience, but things have two sides, in the emergence of these libraries, in the development of our convenience at the same time, but also let many of our friends to create a dependency on the library, may be serious, there is no library, Give him a notepad (we don't mention development efficiency) may not know how to do it.

If you think about it, it's also a terrible thing. Why? Because everyone is no longer trying to study the basics of JavaScript, it's just the help of these libraries to build those dazzling effects (it's okay, these libraries are free). Or simply write the plugin directly with someone else. I don't know what to do if these libraries start charging (just think about it). There are these libraries, such as the people with ulterior motives, in the dot what malicious things, I think it is very difficult for someone to start from the beginning of a library to study a thoroughly. What are you going to do? The most serious is the decline in programming ability, but the feeling is that the threshold of entry is more at the bottom. Don't be fooled by ads like "The Write less, do more", because while you're loading the library, don't forget the "size of your Web page is much bigger, or say the the size is HUGE".

So when you use these libraries, I hope that we are not only users, but also to read the code of these libraries, learn from them. It's going to be great, and maybe you'll find a better place to go, or even a mistake. This is very possible. And what I've just mentioned is that many of these libraries have been transformed from traditional programmers, or have started learning Javascript because of development needs, and there are likely to be errors. Or, by the influence of previous language learning, writing programs are more like writing other languages than writing JavaScript, and execution is not efficient. So don't be superstitious about the library.

Ask a few questions, do you know how jquery implements CSS (3) and XML XPath selectors? How does jquery achieve Eventhandle? How do I deal with the browser compatibility problem?

If you don't understand my question, please take a closer look at how jquery is implemented. If you still can't read it, take a look at the JavaScript that I want to introduce to you, and learn the basics of JavaScript. Let yourself be able to read jquery, so that you do not jquery can also implement the DOM drag, so that they can write their own library. Of course I said it too much. But as long as you're really studying JavaScript and related knowledge, you can do it.

Around this big circle, now let's officially start, to introduce some books to learn JavaScript. (The following introduction of the book is my own purchase read, the right I do not worshiper, a truth: Do not buy Chinese-written JavaScript books)

Getting Started with the book:

"JavaScript Advanced Programming Technology": Don't be intimidated by the word "advanced", the book is actually a very good primer because it also introduces all the built-in objects and syntax of JavaScript, and introduces object-oriented thinking, DOM, BOM knowledge, Regular expressions, advanced DOM processing. The knowledge of Ajax is still very comprehensive. And personally think that the book on the basics of the introduction is not inferior to other similar books. I think it's more detailed and clearer than the JavaScript Authority Guide (which I bought in the 4th edition). In the 4th edition of the Guide, I found the book to be a bit confusing. Feel a knowledge point has not yet made clear, give you a what kind of, look at the shady. Because I did not read the fifth edition of the Guide, it is not recommended here. and "Advanced Programming" is a much cheaper book than the guide. In advanced programming, the process of using functional (future) probes to replace browser version probes to handle script compatibility is also proposed. Personally, I think the guide has some, this book also said. And I mentioned earlier, the author of this book is Yahoo's senior front-end engineer, you can download the relevant code on his website.

Javascript DOM Programming Art: My personal feeling is to learn the classic DOM programming books, the author is one of the founders of Webstandards.org, in the book in plain Language, teach you step-by-step to explain the DOM programming, a little bit to enhance the site's user experience. The book has been emphasizing the development of not abrupt script, the site to be backward compatible, emphasizing the accessibility of the site. This is what we should strive to pursue in the front-end development, but also must have the development of the guiding ideology. Unfortunately, many of the background developers do not have this concept, so you in the development, you must give your programmer more brainwashing. Oh!

"CSS authoritative guide" third edition: To do front-end development, you have to understand the CSS, the book on the introduction of CSS2 is very detailed. Look carefully, every time I look, there will be a new harvest.

"Website refactoring", "CSS website layout" (the only book recommended by the Chinese people): After reading, you will know why to learn Web standards? You will know that the work of the front-end engineers is very important.

Improvement phase:

"Javascript DOM Advanced Programming": This book is not just a detailed description of the techniques of DOM programming, but also the use of object-oriented programming methods, using namespaces to manage the development library written in the book, in the continuous learning, your personal DOM Javascript library is constantly enriched. Oh, as I said before, you can write your own library. Of course, the book's code is relatively loose, it can not be applied to the actual enterprise-level development. But the book on the closure of the introduction and object-oriented development ideas, will make your knowledge of JS increased a level, although the object-oriented development of the explanation is not deep enough.

XML Development Guide: We know Ajax, where x refers to XML, so to understand the relevant knowledge of XML, you must see this book. When you look at it, you'll find that XML has so much to learn that it may be more than what you know. By the right, I don't recommend you use XML as the carrier of your AJAX program's data. Why? Because it's not very economical. You first convert the data into an XML document, and then use JavaScript to bring the data from the XML document to the data. and the browser handles the compatibility of XPath processing, you will be very crazy. Now we have a thing for him to replace JSON. But because XML is already a lot of standard default data communication carrier, such as RSS, so you still have to master.

Personally think that learning JavaScript reading these books is almost the same. Of course, these books also suggest you take a look at "proficient in JavaScript", "PPK JavaScript", "CSS Advanced Techniques", "Ajax in Action", "Ajax Advanced Programming", "Javascript:the good Parts (photocopy)."

After reading these books, you learn about JavaScript, learn about CSS (you know what selectors are in CSS), and you know the knowledge of XML. Oh, the foundation of the development you should be able to solve their own. And you have an understanding of JavaScript's object-oriented development, with backward-compatible development ideas. Obviously you read these books and you have a deeper understanding of web standards.

Of course, want to become a good front-end engineers, you have to learn the knowledge is not only these, you also need to know the optimization of SEO knowledge, because you write the page to search engine also to be friendly, to structure reasonable. You also need to understand the SQL and database, it is best to know C # and other background programming language. Two main reasons, to fully improve themselves, and to fully understand object-oriented programming, these traditional language ideas more mature, but to know that JavaScript and these traditional programming language inheritance mechanism is not the same. So don't use JavaScript to write C #. Another important reason is that you have to work with backstage programmers to be more determined to implement your unobtrusive development ideas, and you must always brainwash them. But what you say will make them listen, what he says you need to know, and you'd better give him some good advice, and they'll listen to you. In order to our web standard development, the hard point of hard!

Here's the thing to add is that front-end development you have to work your own and JSON and regular expressions, there is no detailed introduction to the regular book, and then the AJAX program in lieu of XML JSON data carrier, it is much easier to master JSON than XML. In the end, it is the idea of the use of closures and object-oriented development that I have mentioned many times.

Oh, the last is more practice, you learn to apply the knowledge to the actual development, often with friends more exchanges, I also hope to communicate with you more experience. Everybody progress together!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.