web server && web framework角色区分

时间:2021-01-25 23:28:42

问题

web framework是否包括webserver? 是否可以包括?

webserver 和 framework的关系是?

https://www.quora.com/What-is-the-difference-between-a-web-server-and-a-web-framework

A web server is an executable that handle http requests and serve your files to the client.

A lot of web frameworks have a web server executable so you can test your code easily, but usually these web servers are for developer only. It means that you shouldn't use them for production, since they are not safe at all.

web server

A web server listens for web connections and either serves static content from files, or passes requests onto other code.

服务器服务静态内容, 传送请求到其它代码中, CGI程序中(CGI程序实现 framework)。

web framework

Originally, the "passing on" meant executing programs (usually scripts) separate from the WS, using a protocol called CGI (just a standard way to describe call the script, communicating the request, who it came from, etc.)  Script libraries, for parsing CGI requests, or generating HTML became the first web frameworks.

实现CGI协议的程序, 脚本库, 解析CGI请求, 产生HTML, 这个编程了第一代的 WEB框架。

It became common to reduce the overhead of these external scripts by grafting the script interpreter onto the WS.  Web frameworks have, over time, started to take over much of the request-parsing aspect of the WS ("routing") - enough so that some frameworks decided to dispense with the WS entirely.

通常的做法是, 将脚本解析器移植到webserver中,这样可以减少外部脚本的负载。

webframework, 经过时间演变, 开始接手请求解析部分(ws的routing), 导致一些框架开始可以不适用webserver就可以跑。

The style of web programming has also changed: javascript now puts a lot of the WF's logic into the browser, so that whatever logic is still on the WS may be much reduced (as opposed to the original CGI notion, where the browser really only handled rendering of a static blob of HTML provided by the WS.)

时间又在演变, 现代web编程的风格, 又有了新的变化, js现在实现了很多webframework的逻辑, 在浏览器中,

所以服务器段的业务逻辑可以被大幅缩减。

So, usually when people say WS, they mean a generic WS like Apache.  When people say WF, they usually mean something like PHP or more modern JS-based system that includes templating, ORM, routing, etc.

所以, 我么说ws是指通用webserver, 当我们说webframework, 是指PHP或者现代js系统, 模板, ORM,路由等。

ORM

http://*.com/questions/1279613/what-is-an-orm-and-where-can-i-learn-more-about-it

down vote

 

Introduction

Object-Relational Mapping (ORM) is a technique that lets you query and manipulate data from a database using an object-oriented paradigm. When talking about ORM, most people are referring to a library that implements the Object-Relational Mapping technique, hence the phrase "an ORM".

An ORM library is a completely ordinary library written in your language of choice that encapsulates the code needed to manipulate the data, so you don't use SQL anymore; you interact directly with an object in the same language you're using.

Python web framework

https://jeffknupp.com/blog/2014/03/03/what-is-a-web-framework/

By now, the purpose of web frameworks should be clear: to hide the boilerplate and infrastructural code related to handling HTTP requests and responses. Just how much is hidden depends on the framework. Django and Flask represent two extremes. Django includes something for every situation, almost to its detriment. Flask bills itself as a "micro-framework" and handles the bare minimum of web application functionality, relying on third-party packages to do some of the less common web framework tasks.

Remember, though, that at the end of the day, Python web frameworks all work the same way: they receive HTTP requests, dispatch code that generates HTML, and creates an HTTP response with that content. In fact, all major server-side frameworks work in this way (excluding JavaScript frameworks). Hopefully, you're now equipped to choose between frameworks as you understand their purpose.

web server && web framework角色区分的更多相关文章

  1. Difference between web server ,web container and application server

    In Java: Web Container or Servlet Container or Servlet Engine : is used to manage the components lik ...

  2. C# .net基于Http实现web server(web服务)

    原文:C# .net基于Http实现web server(web服务) 什么是 web server?  百度百科是这么解释的: Web Server中文名称叫网页服务器或web服务器.WEB服务器也 ...

  3. 区分Web Server和应用服务器

    一般的信息服务系统架构如下图所示: Web Server:提供Web信息浏览服务,主要处理的静态资源(session,request,js,html,cs等),如响应http请求,响应请求返回静态ht ...

  4. 【Python Programe】WSGI (Web Server Gateway Interface)

    Part1: What is a Web server? 一个位于物理服务器上的网络服务器(服务器里的服务器),等待客户端去发送request,当服务器接收到request,就会生成一个respons ...

  5. C#中自己动手创建一个Web Server(非Socket实现)

    目录 介绍 Web Server在Web架构系统中的作用 Web Server与Web网站程序的交互 HTTPListener与Socket两种方式的差异 附带Demo源码概述 Demo效果截图 总结 ...

  6. Setting up Django and your web server with uWSGI and nginx

    https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html Setting up Django and your we ...

  7. [r]Setting up Django and your web server with uWSGI and nginx

    Setting up Django and your web server with uWSGI and nginx This tutorial is aimed at the Django user ...

  8. [转载]Web前端和后端之区分,以及面临的挑战

    原文地址:Web前端和后端之区分,以及面临的挑战[转]作者:joyostyle 在我们实际的开发过程中,我们当前这样定位前端.后端开发人员. 1)前端开发人员:精通JS,能熟练应用JQuery,懂CS ...

  9. Web Server CA证书签名步骤和自签名测试,支持多域名

    Web Server支持HTTPS访问需要两个文件,私钥和证书.私钥和证书都放在服务器上,私钥用来加密数据,证书传递给客户端.自己签名的证书在传递给浏览器的时,因为证书不被信任,所以会弹出连接不安全, ...

随机推荐

  1. Visual Studio添加dll程序集引用操作步骤

    Visual Studio 中添加引用的操作: 在“解决方案资源管理器”中,先右击项目图标,在弹出菜单选择“添加引用...” 然后在弹出的窗口中选择所要添加的选项,点击确定就可以了. 原文:http: ...

  2. linux服务器挂载第二块磁盘图文解说

    文章来源:http://www.cndns.com/help/help_con.aspx?hid=394 Linux磁盘挂载是比较常见的管理操作之一.我司橙云预装的linux系统有2块盘,一块为系统盘 ...

  3. UI设计学习路线图

    文章转载自「开发者圆桌」一个关于开发者入门.进阶.踩坑的微信公众号 这里整理的UI设计学习路线图包含初中高三个部分,你可以通过百度云盘下载观看对应的视频 链接: http://pan.baidu.co ...

  4. Python——一个简单的类的创建和应用

    1.创建类,设置属性和给属性设定默认值,设置方法并访问类的属性: 2.利用类创建多个实例,以及调用类的方法的两种办法: 3.设置更新属性的函数,并更新实例的属性. class dog(object): ...

  5. Servlet执行流程和生命周期

    Servlet执行流程 Get方式请求HelloServlet ---> <a href="servlet/HelloServlet"> ↓ 服务器在配置文档中查 ...

  6. 力扣(LeetCode) 509&period; 斐波那契数

    斐波那契数,通常用 F(n) 表示,形成的序列称为斐波那契数列.该数列由 0 和 1 开始,后面的每一项数字都是前面两项数字的和.也就是: F(0) = 0, F(1) = 1 F(N) = F(N ...

  7. ArcGis For Silverlight API&comma;地图显示Gis&comma;绘制点,线,绘制图等--绘制点、线、圆,显示提示信息

    ArcGis For Silverlight API,地图显示Gis,绘制点,线,绘制图等--绘制点.线.圆,显示提示信息 /// <summary> /// 绘制界面上的点和线 ///  ...

  8. &lbrack;NOI1999&rsqb; 棋盘分割

    COGS 100. [NOI1999] 棋盘分割 http://www.cogs.pro/cogs/problem/problem.php?pid=100 ★★   输入文件:division.in  ...

  9. Robot Framework中使用HttpLibrary教程and中文支持

    Robot Framework中使用and转参数时,默认不支持中文模式,如图场景: 会出现这种错误 FAIL : UnicodeDecodeError: 'ascii' codec can't dec ...

  10. CSS 引用外部字体

    @font-face { font-family: W5; src: url('../font/W5.TTF'); } .wallect .wal_body .textBox{ font-family ...