Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Frameworks versus Web Servers? [closed]

What are the differences between technologies like Flask, Django, NodeJS, and Apache? With Apache and NodeJS, they can function as a web server, interfacing your server-side code with HTTP requests. Do Flask and Django also provide this capability or do they provide different functionality?

like image 769
Noah Stebbins Avatar asked Jul 08 '15 15:07

Noah Stebbins


1 Answers

Apache/nginx are web servers, they can serve both static content(html,jpg, etc), and dynamic content generated by web apps.

Django/Flask/Express on NodeJS are web frameworks, they provide the common functionality for writing a web application, like request routing/ORM/session/template. It makes writing a web app much easier - you only need to 'fill in the blanks'.

Most of the time, a web app (implemented in a web framework) sits behind a web server, and process requests handed over by the web server. But sometimes, the framework itself can function as a web server, like Tornado/Express.

NodeJS is neither a web framework or a web server. You can think of it as a Javascript cross-platform runtime environment.

like image 72
NeoWang Avatar answered Nov 07 '22 09:11

NeoWang