Best way to learn JavaScript

Source: Internet
Author: User
Tags mootools mozilla developer network

Learning new things is terrible. The biggest problem for me to master a new skill is that I don't know what I understand. In view of this, you should make a plan to learn what you are interested in. The main purpose of this article is: you have made blueprints, routes, and action plans for learning JavaScript! You don't have to worry about finding the best resources. First, sort out some bad resources and determine what to learn next. Follow this step.

Task 0: Understand what JavaScript is

Before you start learning JavaScript, take a minute to know what JavaScript is and what functions it has. JavaScript is not jQuery, Flash, or Java. Unlike them, it is an independent programming language. JavaScript is a browser language (although not completely ). The main purpose is to add interactivity to static pages. In the browser, it won't change PHP or Ruby for you, nor your HTML or CSS; you can use them together. In addition, it is not as difficult as you think. Note: You should have heard of jQuery, which may be the most widely used JavaScript library. You may have heard of other popular JavaScript frameworks, such as Mootools, YUI, and Dojo. You can regard them as a set of JavaScript auxiliary tools. When you use them, you are still writing JavaScript, but they are all very abstract JavaScript. It will make you get twice the result with half the effort. "You may even hear someone say that you should learn jQuery (or other libraries) before learning JavaScript. I respect them, but I totally disagree with them. Learn JavaScript well and use other libraries first, and you will find that you will do better. The result is that you will write better JavaScript ."

Task 1: Use the course on the Codecademy.com site to learn

Codecademy is a relatively new website. Its advertisement is "the easiest way to learn encoding ". Currently, this website has only two courses, "Beginner programming" and "JavaScript Quick Start Guide ". Immersion in JavaScript is a good experience. Similar to Try Ruby, you will learn a short course, code it in a browser, and view the results. Get all scores and open achievement badges. (Ruby, a scripting language created for simple and quick Object-Oriented Programming (Object-Oriented Programming .) If you are familiar with another programming language, you may first learn "JavaScript Quick Start Guide"; if this is your first programming (except for HTML and CSS ), you will find that the "Elementary programming" course is quite useful. Codecademy is a free website but must be registered.

Task 2: appendTo screenshot Method

AppendTo video has a set of screen capture methods that are especially suitable for beginners. If you want to learn JavaScript in the correct (easy) way, these courses are absolutely useful. Visual training is always effective! "We use our on-demand content and practical training solutions to improve our skills. You do not need to register, bind, or cheat ."

Task 3: read a good JavaScript instruction book

Once you learn through the course on Codecademy, you will want to get a detailed instruction about JavaScript-introducing all types, operators, control architectures, and so on. If you can, let me introduce some good instructions: "Let's talk about JavaScript"-This instruction can be found on the Mozilla Developer Network, and the language is fair. This book is rich in content and contains many code examples and Text sections. Eloquent JavaScript-This book is written by Marijn Haverbeke and can be read online for free. If you want to get a hard copy, you can purchase it on the Amazon website. It is more detailed than MDN because it not only covers the JavaScript language, but also the encoding style and the use of JavaScript in the browser. Of course, "eloquent" is not an exaggeration. (Eloquent-eloquent) "Getting Good with JavaScript"-Yes, I wrote this book, but I introduced it for another reason. It is different from the two descriptions I introduced earlier. In this book, I only introduced what programmers need to quickly master programming skills. In addition, it also includes screenshots of more than 6 hours, so you can check it out if you want. (Of course, this is not free .)

Task 4: Install and learn Firebug (or developer tools)

Once you start using JavaScript in your browser, you need to install Firebug and be familiar with its performance. Firebug is a plug-in for Firefox. It can help you create and debug web pages: for Web developers, it is like a surgeon's surgical knife '. If you don't need Firefox? What if I like Safari or Chrome? No problem: You can find built-in Developer Tools similar to Firebug. "You can press the options + command + I in the Mac address bar or press the shortcut key Control + Shift + I to open the design tool panel ." By opening the tool you selected, you only need to click on one of your favorite websites and you will learn a lot. Here are some resources that can accelerate your Learning: The FirebugFirebug website and the CSS-tips of Firebug in Wikipedia, which explain the 10 reasons you should use Firebug on Nettuts +. Firebug: from white to black, Tuts + Marketplace website (http://marketplace.tutsplus.com/item/firebug-white-to-black-belt/118795) Design Tools Design tools site Google I/O 2011: a browser design tool restructured by Paul Irish Google browser design tools: paul Irish's quick development 12 skills

Task 5: read a book about JavaScript

Now you are familiar with some basic knowledge, but there are still many things to learn. Although some books I recommend may make you 'broke broke ', you will find that I will recommend four high-quality books at any time:

The first two are general and in-depth JavaScript resources, which will help you gradually understand from the introduction to the deeper level. Of course, there will be some overlapping descriptions in the introduction, but not much: it makes you look comfortable. (Note: although these books can be purchased on the Amazon website, I have linked to the publisher's website. Therefore, you can refer to the example section .) JavaScript advanced programming-written by Nicolas C. Zakas, this book covers everything it can cover. If you have read any Zakas works before, you will find that Zakas is a perfect genius. In addition to the JavaScript language, this book also allows you to use JavaScript in your browser. JavaScript 24-hour Trainer was compiled by Jeremy McPeak and written by Nettuts +. It is not just a book: it also comes with a four-hour teaching CD. This book has a total of 43 courses, involving code syntax guidance and code optimization. Although these books are perfect for programmers to learn the JavaScript language and how to use it in browsers, there is no end to learning. Although these books have indeed entered some patterns and practices, I recommend two more books that I think are useful. 1) JavaScript Patterns-Stoyan Stefanov. I have just finished reading this book. I really hope I can finish it as soon as possible. After reading the above resources, you can learn how to write JavaScript, but this book will teach you how to restructure the resources. This skill is very important and not as simple as you think. 2) JavaScript: The Good Parts-Douglas Crockford. This book introduces the advantages and disadvantages of JavaScript.

Task 6: Do something!

After learning the above resources, you should have tried some code samples: modify the code and integrate the code to see what will happen. However, it's time to take a break and make something out. What can you do? You can do a lot. Here are some comments. 1) Image Library: displays a set of image thumbnails and master images. When you click a thumbnail, use a large Thumbnail (not the original thumbnail) to replace the current master image. If you can overwrite the title marked by the thumbnail alt, you will be rewarded with points, or you will loop through the images if you do not click it within one minute. 2) to-do list: It sounds a little difficult. I don't recommend you to create a complete to-do list. You only need to create a text box and put a button next to it. When you click the button, the entered text will become a project under an unordered list. Click the list item to remove it. This sounds easy, but there are several traps that are good for beginners to think about. 3) animation frame: animation is actually a little trick and does not need to be too complicated. Make a div that contains a little text. there must be several buttons on it. One button is used to adjust the width, the other is used to adjust the height, and the other is used to adjust the background color. The key is not to make changes happen too fast, but within one second. Remember, Google is your friend, especially if you haven't used JavaScript to do any animations so far. I believe you can think of other good exercises. Of course, the only way to learn is to pull yourself out of the nest. "In addition, at all skill levels, make sure that the JavaScript class has a large list of tutorials on Nettuts + ." (Nettuts is a website dedicated to providing network development tutorials .)

Task 7: start to learn how to use the JavaScript Library

If you have learned this, you will realize that some JavaScript writing tasks are difficult (or cannot) to implement through a cross-browser approach. The most likely violation is excessive DOM operations, AJAX and animation. That's why we need a JavaScript library. As I mentioned earlier, the details of a JavaScript library are like honey to ease the pain. Therefore, it is necessary to take a look. There are a large number of databases for you to choose from. I will let you decide where to start. Whether it's jQuery, Mootools, YUI, or Dojo, their respective websites provide you with all the information you need to start learning. If you think it is useful, try it. The most popular Library: although it is easy to get a large number of databases, you should choose a popular one-at least the top. JQuery Dojo YUI MooTools Prototype

Task 8: keep pace with masters

There are a lot of incredible JavaScript talents who have been doing something cool and you don't want to miss it. Fortunately, our workaholic Siddharth deputy editor has obtained a list of 33 designers. To become a JavaScript enthusiast, you must subscribe to it. Drop the work at hand, subscribe to/follow these designers. This is required. However, you can do more. This fair website often publishes JavaScript Information, so do not go away. In addition, follow JavaScript Show, the world's latest and largest dashboard about JavaScript. You may also want to register a JavaScript weekly message. Do you want more? Focus on the JavaScript class of Tuts + Marketplace.

Finally, undefined. Thank you for reading this article! I sincerely hope it will help you become a JavaScript enthusiast. If you are familiar with JavaScript, you can recommend any other related resources in the comments.

Original article: http://article.yeeyan.org/view/188878/225166

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.