当前位置:网站首页>1-2 characteristics of nodejs

1-2 characteristics of nodejs

2022-04-23 16:58:00 Endless cake

NodeJS brief introduction

NodeJS The reason why we think it is a background programming language , Because of the following :
(1) Can be node Install on server
(2) Can be js Put the code on the server , adopt node To execute it. .

Put it another way . In fact, that is node Given js A function of modifying server-side code , So it's not so much node It's a background language , It's better to say js Is a full stack language , It can run in the browser , adopt node It can also run on the server , say js Is a full stack language , Not at all .

NodeJS Advantages and characteristics of being a backstage

(1) NodeJS A single thread
(2) be based on V8 Engine render : fast
(3) Asynchronous non blocking I/O operation
there I/O refer to INPUT and OUTPUT, Reading and writing files .
(4)event-driven Time driven :

JS Run in browser , It can be understood as a front-end development language .
The browser gives JS Provides many global properties and methods . Such as window
front end ( Browser running JS), It's a limitation I/O Operation of the .( Restrictions do not mean there is no )
for example Upload of files , Namely I/O operation . This is just a read , Instead of writing . So the front end is for
Protect customer privacy and customer security , It's a limitation I/O Operation of the .

JS Running on the server node in , It can be understood as a background development language .
node Also give JS Provides many built-in properties and methods . Such as http、url、path And so on api for js operation
node There is no limit in I/O Operation of the .

版权声明
本文为[Endless cake]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554520328.html