ajax front and rear end interactive principle (1)

1.Node.js Profile

1.1. The front and back office data exchange process

In web development, we often hear the foreground and background, they are doing what specific work? How do they interact? We have to put these basic issues are figured it out, have a general direction to learn, first of all, we look almost everyone experienced a scene of a life, as shown below:

When you go to a restaurant, the waiter will sit down with a menu over, you need to ask what to order, this time you browse the dishes on the menu, the waiter told to eat the food, the waiter put the dish you get backstage, backstage dish according to your point, one by one complete, finished the dish called the waiter to serve you, in fact, just such a scene and interact with our web development around the station could be so similar, we look at what point is similar:

1 Menu --- browser page, if you see the menu in web development, equivalent to the user's browser to see the page

2 a la carte (record favorite vegetables) --- click on the page (and interactive pages, for example: click on the login)

3 --- The waiter Houchu menu to send data (the data can be understood as a menu) to the background (the background can be understood as Houchu)

4 Houchu cooking --- spool data

5 Serve --- send processed data back to the front

According to some similarities above, we summarize the characteristics of the front and back:

1, the front desk is visible to the user, for example, the menu, you can see web pages (such as screws University home page)

2, the background is not visible to users, users do not care about doing specific background, the user only needs to know what to eat food (specifically want to see those pages of data), and does not care how they do the dishes (usually not outside Houchu open)

3, and table Houchu between the need to establish a communication connection, this thing is done by the staff, in particular those that network equipment to complete the transmission network

To sum up, I think you should guess roughly front-end and back-end engineers, engineers what to do specific work, front-end engineer is responsible for page display here, including the pc, mobile terminal, TV and other end, back-end need to consider how to my data show that more good-looking, that I have to do very nice menu, a la carte customers are more desire, which the customer ordering the interaction is very important, related to the user experience, as well as a very important responsibility is to take the data sent to the background to deal with, and when the user needs to interact with the page and does not need anything, what to do to improve the experience but also need to care about the front end, the front end of one sentence that is responsible for the user experience, background mainly processing of data, this process does not need to let the user know, you can get to the warehouse of raw materials, a variety of ways using a variety of tools to complete a variety of dishes on the menu, only the final goes to a delicious dish on the line, summed up The front end and user interaction, responsible for processing the data back, let's give you a picture exhibition by Shows:

What is 1.2.Node.js

Node.js is a Javascript runtime environment (runtime), released in May 2009 by Ryan Dahl developed, in essence, Chrome V8 engine package

Let's look at when speaking in front of a dom diagram

Summarize the main points:

1 ECMAScript is JavaScript standard

2 JavaScript on the browser side depends on the BOM and DOM interfaces provided, with these interfaces may operate the web browser and the elements

3 JavaScript capabilities in the back end also need to run the environment that is Node.js, which extends the number of modules, so that there is back-end development js

4 related specifications organization W3C, ECMA, CommonJs

1.3.Node.js installation

Download: https://nodejs.org/en/download/

According to their own platforms and operating systems median download, the download is complete, double-click the installation, the next step has been point on it, it is best to install in the default location to avoid unknown problems

After installation test whether the installation was successful:

node -v

If a node appears the version number of the installation is successful

1.4. Developer Tools installed

This time we will change a Node Editor to develop the code, the editor called webstorm, more development-friendly Node, Download Address: Click to enter official website

安装方法也是直接点击下一步

1.5.第一个程序

1 启动webstorm,第一次打开会问你是否导入已经有的配置文件,通常选择第二个

2 询问你是否同意一些条款,这个你必须同意才能使用 选择第一个按钮

3 询问你是激活版本还是说试用30天,可以自己购买,也可以先免费使用30天,关于如何激活的问题,请联系QQ解决

4 最好一个弹出项目 点击接收

5 选择一个你喜欢的主题色吧,白色或者黑色

6 如果你不喜欢现在的主题,也可以安装新主题,最后开始代码边写

7 创建项目

8 选择项目存放位置,然后点击create

9 进入到主界面就可以新建文件,写代码了,关于设置问题,可以看视频教程

10 在新建的文件里面输入一段代码 然后右键 --> run 就可以运行了

螺钉课堂视频课程地址:http://edu.nodeing.com

Guess you like

Origin www.cnblogs.com/dadifeihong/p/12030656.html