A summary of the learning experience for those who want to learn Javascript

Source: Internet
Author: User
Tags xml xpath

Of course, this is just my personal experience. If you have any mistakes, please forgive me and correct me.

Advice on attending training schools:Don't say that there is no such school, that is, there is a dedicated school, and there will be no good teachers. Do not waste money or time on yourself (probably your parents. The idea of dying early.

I think I want to have a higher say than a common friend about the training school, because I have been doing English training for nearly two years, and I know the training market situation very well, it's hard for you to meet a good teacher. English may be better. After all, there are still many teachers who speak English well. They have been spending time with foreigners for a long time. They have indeed improved their oral skills significantly, but the cost is very high. What you want to learn now is Javascript. Haha, there are not many good front-end engineers!

In my personal opinion, qualified and competent Javascript teachers must be front-end engineers with rich front-end development experience. University teachers and professors may rarely meet this requirement, and good front-end engineers are busy with their own work. The rest of the people who have time to teach Javascript will not talk much about it.

Here, I also complained about the things we learned on campus. You didn't know what the things mean when you learned them. You didn't study them yourself, he won't tell you, teacher. At the training school, it's similar.

If it is not a good front-end engineer, it is difficult to tell you why we advocate the use of closures to put the previous global variables in the closure as the local variables of the closure function? It is also difficult for you to thoroughly understand the scope of Javascript variables. What are the things that can form scope in Javascript? Why is global variables a devil? How does a closure produce a scope? It is very basic, but it is very important to understand the meaning of the knowledge. It is more difficult for you to understand the knowledge and their meaning.

Oh, so I suggest that you want to learn Javascript and talk to your friends, especially those who are engaged in front-end development. You need to study more. If you don't know the front-end engineers, go to the home of your feet and have a look at the blue ideal (bbs.blueidea.com, remember! This is not an advertisement !), Raise your questions that you don't know, but I want to talk about a good study habit here. When can I ask questions?

When can I ask questions? Is this also a problem? Yes, many people are also a bad study habit of many students at school. If you have any questions, ask for help. Personally, this is a bad habit. Is it a bad habit to ask questions? Yes, I personally think that when you ask questions and seek help from others, you should be thinking about it yourself, if you cannot obtain the final solution to the problem through various ways to access relevant materials, why? In this way, you have studied and understood the problems you want to solve. You can tell others in more detail what the answer you want is, or you can clarify the problem you want to describe. In this way, you can quickly answer your questions. I think you will learn more deeply about this problem.

Well, it seems a little far away. Let's talk about how to learn Javascript! I 'd like to tell you that Javascript is more difficult to learn than other development languages!

Why? For the time being, everyone (domestic or even foreign programmers) is generally familiar with the Javascript programming language (please allow me to say so, at least not as well as everyone knows and studies such languages as JAVA and C. This has caused another problem. Currently, the Javascript books on the market do not provide in-depth and comprehensive explanations on the Javascript language. Of course, it is relative to JAVA, C # and other languages. Therefore, it is very difficult to learn Javascript. Of course, it is not easy to learn any programming language, especially to learn well.

However, there is also good news, that is, everyone's attention to and more in-depth research on Javascript. Now, the content in Javascript books is much higher than the quality four years ago. You can say that, it's time for you to start Javascript! Haha! Therefore, I would like to give you an experience here. It is best not to buy a Javascript book four years ago, that is, it was published before 2005. It is best to buy books published in the past two years.

Speaking of this, I want to talk about a phenomenon. With the attention and research on Javascript in recent years, many traditional programmers have begun to learn and study Javascript, they bring the idea of object-oriented programming into the front-end development of Javascript, which greatly promotes the promotion and development of Javascript. Thank you very much for this. It may be due to the influence of traditional development ideas of these programmers. Now our Javascript library has sprung up.

Haha! JAVA has a JAVA library and a variety of frameworks. C # is also an imitation of JAVA and a rich development library. These libraries bring great convenience for our development, which is a good thing. So these traditional programmers also write their own libraries when they are engaged in front-end development. We are familiar with prototype, jQuery, YUI, Ext, and so on. I will not list them one by one. Of course, the emergence of these libraries has brought great convenience to our front-end development, but everything has two sides. After the emergence of these libraries, while bringing convenience to our development, many of our friends may be dependent on the database, which may be a serious problem, give him a notebook (we should not mention the development efficiency) and we may not know how to start it.

If you think about it, it is terrible. Why? Because we don't bother to study the underlying knowledge of Javascript, we just try to build the dazzling special effects with the help of these libraries (Fortunately, these libraries are free of charge ). Or simply use a plug-in written by someone else. I don't know what to do if these databases start to charge (just think about it? There is also something malicious to add to these databases. I think it is difficult for someone to thoroughly study a database from the ground up. What do you do? The most serious problem is the decline in programming capabilities, but it gives people the feeling that the entry threshold is even lower. Don't be confused by advertisements like "The Write Less, Do More", because when you load this library, don't forget "Size of your web page is much bigger, or say the size is HUGE ".

So when you use these libraries, I hope that you will not only be users, but also read the code of these libraries carefully and learn from them. There will be a lot of gains, and you may find some improvements, or even some errors. This is very likely. Also, as I mentioned earlier, many developers of these libraries are transforming from traditional programmers, or learning Javascript Due to development needs, which may lead to errors. Or, due to the influence of previous language learning, writing programs is more like writing other languages, rather than writing Javascript, And the execution efficiency is not high. Therefore, do not trust the database.

Q: Do you know how jQuery implements CSS (3) and XML XPath selectors? How does jQuery implement eventHandle? How can we solve the browser compatibility problem?

If you still don't understand the question, take a closer look at how jQuery is implemented! If you still don't understand it, read more about the Javascript book I want to introduce you to understand the underlying and basic knowledge of Javascript. Let yourself understand jQuery, so that you do not need jQuery to implement Dom drag, so that you can write your own library. Of course this is too big for me. However, as long as you really study Javascript and related knowledge, you can do the same.

Now, let's get started. Let's introduce some Javascript learning books. (I have bought and read all the books introduced below. By the way, I don't recommend myself to others. One truth is: do not buy Javascript books written by Chinese people)

Getting started book:

Javascript Advanced Programming Technology: Don't be scared by the word "advanced". This book is actually a very good entry-level book, this book also gives a detailed introduction to all the built-in objects and syntaxes of javascript, as well as the object-oriented ideas, DOM and BOM knowledge, regular expressions, and advanced DOM processing. Ajax knowledge is still comprehensive. In addition, I personally think that this book's introduction to basic knowledge is not inferior to other similar books. I think it is more detailed and clearer than the Javascript authoritative guide (I purchased version 4th at the time. In the 4th version of the guide, I think the things in the book are a bit confusing. I feel that a knowledge point has not been clearly explained, so I will give you a class that is unclear. Because I didn't read the fifth version of the guide, I don't recommend it to anyone here. In addition, the book advanced programming is much cheaper than the guide. Advanced Programming also proposes the use of function (future) testing to replace browser version testing to handle script compatibility. I personally think that the book "Guide" also says. As I mentioned earlier, this book is written by YAHOO's senior front-end engineer. You can download the relevant code from his website.

Javascript DOM programming Art: I personally feel that it is a classic getting-started book for DOM programming. I am one of the founders of webstandards.org. The book uses easy-to-understand languages, we will teach you how to introduce DOM programming step by step to improve the user experience of your website. The book has always stressed that script development is not abrupt, websites should be backward compatible, and websites should be accessible. This is what we should strive for in front-end development, as well as the necessary development guiding ideology. Unfortunately, many backend developers do not have this concept at all. Therefore, you must brainwash your programmers during development. Haha!

The third edition of CSS authoritative guide: for front-end development, you must understand CSS. The introduction to CSS2 is very detailed in the book. Take a closer look. Every time I look at it, there will be new gains.

Website reconstruction and CSS website layout recording (the only book recommended by Chinese people): after reading this, you will know why you have learned WEB standards? You will know that the work of front-end engineers is very important.

Improvement stage:

Javascript DOM advanced programming: This book not only describes DOM programming techniques in detail, but also describes how to use object-oriented programming to manage the development libraries written in the book using namespaces, with continuous learning, your personal DOM Javascript library is constantly enriched. As I mentioned earlier, you can write your own database. Of course, the code in the book is loose and cannot be applied to enterprise-level development. However, the introduction of closures and the idea of object-oriented development in the book will increase your understanding of JavaScript, although the explanation of object-oriented development is not deep enough.

XML Development Guide: We know ajax, where X refers to XML. Therefore, you must read this book to learn about XML. After reading it, you will find that there are too many things to know about XML. You may know something you know better than what you know. By the way, I do not recommend that you use XML as the data carrier of your Ajax program. Why? Because it is very economic. You first convert the data into an XML document, and then use Javascript to present the data in the XML document to convert the document into data. The browser will be crazy about the compatibility of XPath processing. Now we have an alternative JSON. However, XML is already the default data communication carrier of many standards, such as RSS.

I personally think it is almost the same to read these books using Javascript. Of course, these books also suggest you look at "proficient in Javascript", "PPK on Javascript", "CSS advanced skills", "Ajax in Action", "Ajax advanced programming", and "JavaScript: the Good Parts.

After reading these books, you have learned about Javascript, CSS (you will know which selectors are available in CSS), and XML. Well, you should be able to solve the basic development on your own. You also have an understanding of Javascript object-oriented development and have a backward compatible development idea. Obviously, after reading these books, you will have a deeper understanding of WEB standards.

Of course, to become a good front-end engineer, you need to learn more than that. You also need to know SEO optimization knowledge, because the pages you write must be friendly to search engines and have a reasonable structure. You also need to know SQL and database, and better know C # and other background programming languages. There are two main reasons: to improve myself comprehensively, and to fully understand object-oriented programming, the ideas of these traditional languages are more mature, but you need to know that Javascript is different from the inheritance mechanisms of these traditional programming languages. Therefore, do not use Javascript to write C #. Another important reason is that if you want to cooperate with backend programmers and want them to execute your non-abrupt development ideas more resolutely, you must always brainwash them. But what you say must be heard by them. You need to understand what he says, and you 'd better give him some good suggestions before they can listen to you. For the purpose of developing our WEB standards, we have to work hard!

What you need to add here is that you have to study JSON and regular expressions by yourself in front-end development. At present, there is no detailed introduction to regular expressions, then, the data carrier that replaces xml json in AJAX programs is much easier to master JSON than XML. Finally, I have mentioned the use of closures many times and the idea of object-oriented development.

In the end, I want to practice more and apply your learned knowledge to actual development. I often talk to my friends and hope to share my experiences with you. Everyone makes common progress!

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.