简体   繁体   English

IIS/ASP.Net 与 NodeJs/ExpressJS

[英]IIS/ASP.Net vs NodeJs/ExpressJS

I'm very new to NodeJs/expressJs, i read tons of articles on internet and still don't understand it我对 NodeJs/expressJs 很陌生,我在互联网上阅读了大量文章,但仍然不明白

is NodeJs a web server like IIS? NodeJs 是像 IIS 这样的 web 服务器吗? if so can i host an asp.net app in NodeJS?如果是这样,我可以在 NodeJS 中托管 asp.net 应用程序吗?

Is expressJs a framework like ASP.NET? expressJs 是像 ASP.NET 这样的框架吗?

I currently work on both IIS ASP.NET applications as well as NodeJS/ExpressJS systems and the below is what I have noted to be different:我目前在 IIS ASP.NET 应用程序以及 NodeJS/ExpressJS 系统上工作,以下是我注意到的不同之处:

IIS: IIS:

  • Windows server based基于 Windows 服务器
  • Can have strict setups such as MVC etc可以有严格的设置,例如 MVC 等
  • Built in deployment that compiles the entire website编译整个网站的内置部署
  • Setup can take quite some time to create all modals and get all plugins working etc设置可能需要相当长的时间来创建所有模式并让所有插件正常工作等
  • Services can take some time setup and modal mapping can be tedious服务可能需要一些时间设置,并且模态映射可能很乏味

NodeJS/ExpressJS: NodeJS/ExpressJS:

  • Not Windows based.不基于 Windows。 I run this typically on an Ubuntu server with Nginx to push the domain to the public我通常在带有 Nginx 的 Ubuntu 服务器上运行此程序,以将域推送给公众
  • Easy to setup and fast to get something basic online易于设置,快速在线获取基本内容
  • Does not natively compile and runs files as they are不按原样编译和运行文件
  • Uses npm package manager with easy to install packages使用 npm package 管理器和易于安装的软件包
  • Does not have strict setups but you can technically create your own MVC style system没有严格的设置,但您可以在技术上创建自己的 MVC 样式系统
  • Code can quickly become messy however with the correct approach you can manage the amount of code easily.代码很快就会变得混乱,但是通过正确的方法,您可以轻松管理代码量。

NodeJS is not a web server. NodeJS 不是 web 服务器。 It is a backend server (Such as a REST API etc) ExpressJS sits ontop of NodeJS to add functionality and is essentially a framework.它是一个后端服务器(例如 REST API 等)ExpressJS 位于 NodeJS 之上以添加功能,本质上是一个框架。 Coupled with jade/pug you can write js inside the html.再加上jade/pug,你可以在html里面写js。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM