Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to JavaScript Foundation-- introduction to JavaScript

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Easy to learn and expressive-- A brief introduction to JavaScript 1.1 the use of JavaScript

JavaScript is used to create interactive effects on web pages and enhance the user experience.

Briefly list a few page effects that JavaScript can create and what it can do:

Broadcast map

Tab bar (tab)

Map

Form validation

The front end of web is divided into three layers:

The structure layer HTML describes the page structure from a semantic point of view.

Style layer CSS beautifies the page from an aesthetic point of view

The behavior layer JavaScript enhances the user experience from the perspective of interaction.

1.2 introduction to JavaScript's historical background

Brandon Ikey (Brendan Eich, 1961 ~), at Netscape in 1995, invented JavaScript. At first, JavaScript was called LiveScript, but because the language Java was very popular at that time, it changed its name to JavaScript in order to be a big name. Like the relationship between "Peking University" and "Peking University Bluebird". "Peking University Bluebird" is near the "Peking University" big name. At the same time, there were other web languages, such as VBScript, JScript, etc., but they were later defeated by JavaScript, so today's browsers run only one scripting language: JavaScript.

1.3 the relationship between JavaScript and ECMAScript

ECMAScript is a standard developed by Ecma International, formerly known as the European Association of computer Manufacturers, whose English name is European Computer Manufacturers Association.

JavaScript is developed by the company, the company developed by the company must have some problems, not easy for other companies to expand and use. So the European organization of ECMA, which takes the lead in developing the standard for JavaScript, is called ECMAScript.

To put it simply, ECMAScript is not a language, but a standard. The more common ones that meet this standard are JavaScript and Action Script (the language used in Flash). That is to say, if you have finished learning JavaScript, the programs in Flash will be written.

ECMAScript released ECMAScript 6 in June 2015, with stronger language capabilities. However, browser manufacturers can't catch up with this standard so quickly. These new features will be introduced to you later in our study.

1.4 Today's JavaScript: take on more responsibility

Before 2003, JavaScript was considered "cowhide fresh" and was used to make ads on pages, pop-up windows and floating ads. What is annoying, what is developed by JavaScript. So the browser introduced the function of blocking advertising.

The fate of JavaScript began to change in 2004, when Google took the lead in using Ajax technology, which is an application of JavaScript. And, at that time, people gradually began to improve the user experience.

Baidu's Intelligent Induction

Another example is:

NetEase's Ajax Verification

Jobs launched iPhone in 2007, and since that year, users have had more ways to surf the Internet, that is, using mobile devices.

JavaScript is also indispensable in mobile pages. And in this year, the Internet began to be standardized and separated according to W3C rules, and people paid more and more attention to JavaScript.

Gather a cost-effective mobile phone page

In 2010, when people knew more about HTML5 technology, HTML5 introduced something called Canvas (canvas), and engineers could make games on Canvas using JavaScript.

Fruit ninja made by canvas

In 2011, Node.js was born, enabling JavaScript to develop server programs.

Today, JavaScript engineers are absolutely popular and can be compared with iOS and Android engineers.

Now, companies are popular with WebApp, which uses web technology to develop mobile applications. What do you mean? Mobile systems include iOS, Android and windows phone. For example, to develop a "Ctrip" APP, the company needs to recruit three teams of people, such as 10 iOS engineers, 10 Android engineers and 10 windows engineers. A total of 30 people, high wages and expenses. And, if you want to change the version, you need to change three versions. Therefore, now the company, all use web technology, use html+css+javascript technology to develop app. The advantage is that you don't need to recruit so many engineers, just a few front-end development engineers. And it is also easy to iterate, that is, as soon as the web page changes, all terminals change.

1.5 JavaScript is very easy to learn.

JavaScript ranks first in the list of "beginner-friendly languages".

JavaScript has interface effect, for example, you learn C language, sorry, black and white background. And JavaScript has a gorgeous effect, the effect is visible. Your work is really effective.

JavaScript is a language of weak variable types, and variables only need to be declared in var. The declaration of a variable in Java is based on what type the variable is:

1 int a

2 float a

3 double a

4 String a

5 boolean a

In JavaScript, only one:

1 var a

JavaScript doesn't have to worry about other things, such as memory release, pointers. Programmers only need to care about their own business, do not need to care about these trivial things.

1.6 our course

JavaScript is divided into several parts:

● language core-the basic class only studies the language core, variables, expressions, operators, functions, if statements, for statements

● DOM-you will learn later to control the elements in the HTML, such as moving the box, changing color, and broadcasting pictures. What is DOM? I will learn in the future.

● BOM-you'll learn later, something that controls the browser, such as letting the browser scroll automatically. What is BOM? I will learn in the future.

The learning method of JavaScript is very different from that of HTML and CSS:

● should go to "taste" programs and think more about inner logic. HTML and CSS are like Foxconn, labor-intensive; JS is like a wind-up watch, very sophisticated and amazing.

The mechanical repetitive work of ● JS is almost zero, which is basically creative work. Unlike HTML and CSS, margin and padding are all mechanical repetitive work.

● should never memorize programs. Each program must be written on its own. In the future, there will be a hidden assignment, re-beating every case of the teacher.

The biggest purpose of our basic JS course is to let pure rookie, pure 0 basic students experience what is programming, what is logic, how to program, how to think about programming? The fun of programming. Therefore, we JS basics, do not introduce the details, we will learn later. In other words, the basic knowledge is something that should be scratched. Some strange things are not introduced in the basics, such as:

1 13 + true;1 13 & & true

These things will be introduced with the deepening of later study. Finally, I can become an interview expert for JS.

Second, JavaScript is a foreground language, not a background language

JavaScript runs on the client's computer, not on the server, so we call it the "foreground language". JavaScript is a simple language for creating page effects and cannot operate the database. Is to serve the interactive effect of the page, beautification, gorgeous.

"background language" is run on the server, such as PHP, ASP, JSP and so on. These languages can operate the database and "add, delete, change and check" the database.

(except for Node.js, never mind what Node.js is).

● such as a library, to develop a "book lending program", can record each student borrowed what books, whether returned on time, can not be developed with JS! Because, design the data record of the database.

● for example, a company wants to develop a "reservation system" to count what all employees want to eat at 11:00 every morning. Cannot be developed with JS. Because it involves data records in the database.

● for example, a company's web page wants to be beautiful, interactive, and gorgeous. Develop with JS.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report