JavaScript how to systematically study

2010-11-12  来源:本站原创  分类:Web  人气:145 

In the past, JavaScript is used to do some simple web effects, such as form validation, floating ads, etc. So then JavaScript is not taken seriously. Since the AJAX became popular, people found that using JavaScript can give users a better experience, or even the development of large-scale use of the advantages of web games, so that the door has been little attention to the language up. Now, many companies recruit engineers specialized JavaScript, JavaScript is often essential WEB front-end development skills. The benefits of a brief introduction JavaScriptr does not mean that everyone will learn or even learn it, interest is very critical, I think the interest is the best teacher, it is that you concentrate on one thing and do it the driving force . In addition, we have to think big as a small language, I had to use Greasemonkey wrote some very useful tools, such as JavaScript + Greasemonkey you can write plug-ins online web games. Here I talk about the process of learning JavaScript, and experience it.

Introduction to learn the layout of DIV + CSS DIV + CSS layout using standard web pages, you can make the code less front-end XHTML, structure more clearly, which is conducive to easy operation using JavaScript DOM, for example, to display a list of 3 rows 3 columns, if the traditional The table layout, and now want you to dynamically generate this list using JavaScript, you need a nested loop, if the structure by adding CSS float layout li, a loop just fine. Of course, WEB can not use the standardized form is not necessarily, I mean, clearly structured XHTML is easier to effect, or JavaScript function into the project.

Several development and testing tools to master as a developer, familiar with the test tool is a must, which helps to identify problems and improve your problem-solving efficiency, especially for large projects in particular. JavaScript and XHTML development and testing tool I recommend the first two of the most commonly used, they are: Web Developer and Firebug.

Familiar with the JavaScript function for each method that request may sound impossible, I think this requirement for as C #, JAVA language, which is indeed large, as libraries for these languages is too large, no one can fully remember it, but also all remember that there is no need, such as web and mobile phone with JAVA to do the concerns of library development is not the same. The JavaScript is not, it's really not much built-in method functions, the first comprehensive look familiar, being developed will also be handy, for example, you might think the start has JavaScript trim () that many languages have the space to the line of the first end of line grid method, when you understand the JavaScript function library you will find the original post of these methods in JavaScript is to themselves to achieve. As another example, if you are the stronger language from other play turned JavaScript, you might think they should have JavaScript MD5 encryption method, of course, this is not, but someone with a JavaScript implementation of such methods, the JavaScript MD5. After all JavaScript built-in method of pitiful, but a lot of cattle, some new ways to increase writing JavaScript functions, such as the prototype JavaScript framework based mainly on the extended prototype function.

Learn to understand programming DOM JavaScript DOM programming process be more important to learn the curriculum, because in addition to writing some JavaScript pure data processing logic, the more dynamic changes in the structure and content of XHTML, in order to achieve the purpose of dynamically updated interface, which work, we must rely on DOM programming. jQuery framework packages in this area very well, providing a rich DOM operation method allows you to easily find one anywhere in the page DOM node (XHTML tags), and the related operations (add, delete, change, search). For operations over XML documents in other languages, experience of a friend, I believe this one will soon get started.

Access to and use AJAX
Today, learning the JavaScript without using AJAX, JavaScript an advantage that is buried (AJAX JavaScript itself can not be content). AJAX for the user and the server is good for the user, provide a better user experience, one of the most typical scenario: the availability of the registration page the user name pre-testing, the traditional may encounter such problems: User After completing the form is submitted a bunch of data, the results inform the user by the server is registered, fill out the information to the user to re-register, which for large multi-user Web site that is fatal, because the user input 10 may be half over user name was used. For the server, reducing web traffic, as AJAX, the general on-demand loading of data, not because of local updates to reload the entire page. For example, a web account for three-screen high, we can only load the first screen of the default contents of the scroll bar when the user pulling down of the time, and then load the contents of two or three screens. WEB applications such as online map also is an example of using AJAX.

JavaScript this keyword to improve understanding
JavaScript this point with a lot of the role and development of a real object-oriented language is very different, it does not always point to the current object, it will change. If you pay attention to this problem, it may encounter error code seems right, or does not perform so on.

Learning JavaScript OOP Programming
OOP is a good thing, it allows programmers to think more organized, the organization of the code more clear. JavaScript can also be OOP, but also some of the traditional OOP languages there is a big difference, so really need to use familiar JavaScript OOP is under the point of martial arts.

Learn closure
JavaScript closures and it was more talk about a topic of closure so complicated JavaScript variable scope, but this feature makes the language and become more flexible.

Learning specification development team believe that everyone is heard a great deal, and the inauguration of a company to develop, of course, inseparable from the team, the team in order to co-operative, each member must meet a certain coding standard, this is also the programmer of each company the basic requirements. Usually refers to the variable name on the specification, document organization, annotation and norms, in this respect the norms of knowledge and other languages are interlinked nature.

Read the book to find the algorithm to learn and I think the use of a language is not difficult, difficult it should be the basic language syntax and statements to solve complex problems. To solve some complex problems, it can take some algorithms, some algorithms may be a team to do, such as Chinese Academy of Sciences of the concrete realization of Chinese word, the other commonly used as the game automatically routing A * algorithm. Maybe you think you can encounter in the JavaScript Development of such a complicated issue, in fact, this depends on what you are doing the project, if you are in the development of large web games, often face more challenging problems, if you have Some algorithms have read books, learn some common solutions to problems in the development process will naturally be even more powerful. In addition, the algorithm is obviously familiar with the other contacts for your future development language is also helpful.

Habits compatibility, BUG problems take notes
CSS browser compatibility issues with JavaScript to do the best notes, because these problems, or BUG is more strange, these browsers do not prompt you went wrong, IDE will not prompt you, in particular CSS compatibility issues This will lead to the development process you will encounter this problem unresolved waited a long time cards. Even solved similar problems before, probably will run into the future, the result did not take notes to enhance memory, doomed to suffer once again you, because these issues are not compatible with one or two temporary memory effect is not obvious. In my experience, many problems occur in IE6, and now even Microsoft IE6 want to accelerate its own destruction, which we developed for the front end is certainly good news.

Read good code, such as jQuery
Read good code is self-improvement is absolutely a good way, not only can learn about the code of the organizational norms, but also to understand some of the features of the realization of ideas. JQuery is a great example to learn the value of JavaScript framework. Of course, to read such a framework for professional JavaScript, JavaScript should be a solid foundation, otherwise the process will meet to see too much doubt, even self-confidence is also a blow.

Note that prior to entry to avoid the direct use of JavaScript JavaScript frameworks development JavaScript if you do not have any basis, please do not make direct use of JavaScript development framework, I think it may have misled your understanding of a language, for example, you use jQuery with the point directly link the written statement, do you think this is a JavaScript syntax it? For another example, do not you make a prototype extended the framework of the base class method that is built-in JavaScript. I think the JavaScript is used to improve the efficiency of the framework, it is definitely not the JavaScript entry should learn.

Find online may not be many examples of cross-browser compatible JavaScript effects, many years ago, a User Source is written in N, N years ago, IE's world, so too lazy to solve a number of front-end script cross-browser compatibility issues, so write out script only applies to IE. When you get this piece of code, please do not trash, do not do complain, because the code is not no point value, if you know JavaScript cross-browser compatibility issues, I believe you can easily be modified by the less code has better compatibility.

相关文章
  • JavaScript how to systematically study 2010-11-12

    In the past, JavaScript is used to do some simple web effects, such as form validation, floating ads, etc. So then JavaScript is not taken seriously. Since the AJAX became popular, people found that using JavaScript can give users a better experience

  • JavaScript Introduction to the study of the phase selection of books! 2009-11-15

    For many of the friends want to learn JavaScript is no doubt how to select the entry Books Is the most headache problem, and perhaps they have been afraid, or even give up the reasons for learning JavaScript. In the JavaScript context, what they are

  • JavaScript inheritance between objects study notes _ 2010-11-17

    Because of work, mainly to learn JavaScript Reference "JavaScript language of essence" and "JavaScript Definitive Guide" is now to sum up the learning experience. A question about object inheritance. Fruit parent / / This object has se

  • [Transferred] from the prototype.js javascript depth study of object-oriented features 2010-12-16

    Javascript prototype.js in-depth study from the object-oriented features js is a very powerful language, flexible and convenient. At present, I come into contact with the language which, from the grammatical point of view, only the Ruby than it Gengs

  • Javascript object on the constructor property of 2010-02-09

    In Javascript you often have some incredible results, I think one of the main reason is that everyone is most of its specification are poorly understood. In fact there's nothing wrong, JS was not beautiful enough, there are too many places, and the E

  • Learn jQuery beginning 2009-06-20

    Reprint: OneChen's Blog Read some basic knowledge about the Jquery. Posted about sharing. A lot of excellent online article. Study hard in ~ With the rise of JavaScript, JavaScript libraries have a series of flourishes. From the Early Prototype, Dojo 2006

  • Started learning jQuery 2009-06-22

    Reprint: OneChen's Blog Read some basic knowledge about the Jquery. Posted about sharing. A lot of good articles online. Study hard in ~ With the rise of JavaScript, JavaScript libraries have a series of flourishes. From the Early Prototype, Dojo 2006 jQu

  • Introduction of a Road VC 2010-03-02

    At the outset, I'm not what master, that is just out of poverty. As good luck, buy a few good book, in the learning process hardly take any detours, no fee what strong a beginning, is now generally a small program can do it. Because I do not know whe

  • Shenzhen Embedded Training - lead you to the charm of life 2010-05-27

    QQ: 551516789 15218732197 Zhang Gong Hou MCU studio work has focused on the development, the development of electronic products. In recent years, precipitated a great deal of product development experience, Fabric of the number of outstanding electro

  • SCM Training in Shenzhen - Shenzhen Embedded Training - End the monthly salary is not a dream 2010-05-27

    Official Website: http://www.51-arm.com Reservation Tel: 15218732197 QQ551516789 Hou Chang Engineering MCU studio work has focused on the development, the development of electronic products. In recent years, precipitated a great deal of product devel

  • Shenzhen SCM Training - Your success is our goal 2010-05-27

    QQ: 551516789 15218732197 Zhang Gong Hou MCU studio work has focused on the development, the development of electronic products. In recent years, precipitated a great deal of product development experience, Fabric of the number of outstanding electro

  • October 2010 Shanghai PMP exam training hot application 2010-06-23

    October 2010 Shanghai PMP exam training hot application * Yan Xuan advantages: 1. Science course arrangement, rolling classes, one day a week, learning easy 2. Full-time instructor, extremely responsible, root out the question bank, online Q & A 3. T

  • Introduction to WAP development and improvement of the basic concepts WML - WML simple example and editing. Test methods 2010-07-30

    Part II: WML basic concepts - WML simple examples and editing, test methods Complete the WAP server and WAP browser, the establishment of the installation, we then can use WAP WML language to write Web pages or applications, and through WAP server an

  • Books of the required network programming must see (change) 2010-08-08

    TCP / IP protocol is the current common WAN and LAN network protocol, therefore, based on TCP / IP programming is particularly important. From the application point of view, now directly use the C-level Socket API for TCP / IP programming, people do

  • Huawei Interview Summary 2010-09-09

    The day before yesterday to attend a human outsourcing project team candidates, because the project team is to do web side, so recent has been prepared in unix command, but also in the performance optimization oracle, javascript's review and study. B

  • Project Management Classic Monitor 2010-09-15

    1, China is full of a lot of very dedicated professional project managers but not enough, do not understand this, it is good to do projects in China. 2, the real reasons are often hidden behind the surface of the ground. 3, the highest state of a pro

  • I do the project all these years (autumn is how well the project manager - the black humor 313) | How to Project Manager after -70 ... (Reprinted) 2010-09-25

    Akiba , Xiao Qiushui co new book, " ahead of the competition - big projects before and after sales of 30 kinds of skills , "wrote the book side of Akiba attention big project consultants, business and implement some of the sentiment, the section

  • Getting Started with DB2 Performance Optimization 2011-05-10

    Overview of DB2 Performance Optimization DB2 performance tuning is a more complex and comprehensive work on the root of the problem need to make a comprehensive exploration and reflection. Also need a more profound knowledge of database management an

  • Paid the road network 2011-05-27

    Choice as to whether you are still hesitant to network management profession, it? Are you still as a professional network of your choice whether to worry about paying it? Do you know what should have paid the basic quality of network management and a

  • Structural risk minimization (Structural Risk Minimization, SRM) 2011-09-01

    1, define Statistical learning theory proposed a new strategy that is set to function as a function of subset construction sequence, so that each subset of the arrangement according to the size of VC dimension; in every subset of experience to find t