Some thoughts about NodeJS

Insert picture description here

Q1: What are the advantages of Node.js?

  • Language reuse
  • Easy to transform for developers
  • Lightweight
  • Support object database
  • Widely supported by IDE and code editor
  • Can host services anywhere

Q2: What is the essential difference between Node.js and JavaScript?

  • Node.js is a platform
  • JavaScript is a programming language that runs on the browser (browser is also a platform)

Q3: What is a platform?

  • Different levels of services implemented by different programming languages

Q4: Platform division

  • Client software
  • Server software

Q5: What are the client software platforms?

  • Browser
  • Android
  • IOS
  • windows

Q6: What are the server software platforms?

  • Java 、C++ 、Node.js 、Python 、PHP 、C …

Q7: What is a programming language?

  • Programming languages: console.log, system.out.println and other languages ​​that only developers know
  • The front-end JS code and the back-end Java code are not recognized by the computer and need to be compiled on different platforms.
  • Java is compiled by JDK, and JS depends on the browser.

Q8: What are the common programming languages?

  • Java C C++ Python PHP VB C# Objective-C …

Q9: What computer language?

  • Computer language: the language of communication between man and computer

Q10: What is compilation?

  • Compiling refers to a translation program that translates a source program written in a high-level programming language into an equivalent machine language format target program

Q11: What are the compilation processes?

  • lexical analysis
  • Gramma analysis
  • Semantic Analysis

Q12: What is lexical analysis

  • Keyword eg: var if else function…
  • Identifier eg: letters, numbers, underscores ...
  • Decomposition character eg: {} ()…
  • Operator eg: +-* /% ^…

Q13: What is grammatical analysis

  • The process of converting code into command statements, that is, instructional statements.

Q14: What is semantic analysis

  • The program is ultimately run on the operating system, semantic analysis shows what system interface it calls
  • For example: JavaScript calls the browser interface (windows), Node.js calls the linux interface

Q15: How to judge whether two languages ​​are the same?

  • If the lexical analysis of the two languages ​​is the same, are the two languages ​​the same?
    • Not necessarily, for example: int has the same lexical (keyword) in Java and C
  • If the lexical analysis and grammatical analysis of the two languages ​​are the same, are the two languages ​​the same?
    • Analyze specific issues
    • Node.js and JavaScript are lexical analysis, the syntax analysis is exactly the same, but the semantic analysis is different
      • In some cases, the definition thinks that lexical analysis and grammatical analysis are the same, it is the same language
      • In some cases, it is considered that lexical analysis, grammatical analysis, and semantic analysis must be exactly the same, that is, the same language

Some of the thoughts of NodeJS above are derived from the learning and exploration of Node. Thank you for correcting any mistakes or lack of rigour ~~

Published 40 original articles · won 31 · views 2760

Guess you like

Origin blog.csdn.net/CodingmanNAN/article/details/105522874