web server && web framework角色区分

问题

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://stackoverflow.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.

时间: 2024-10-08 23:37:00

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

Mongoose(web server)web服务器

来至于维基百科,原地址:http://en.wikipedia.org/wiki/Mongoose_(web_server) Mongoose是一个跨平台的Web服务器.源于Cesanta软件公司. Mongoose在Mongoose嵌入式库之上建立.Mongoose库被用于执行RESTful架构服务,在嵌入式设备上服务网络图形用户界面,创建RPC框架(例如JSON-RPC),处理遥测数据交换,并且在各种不同的行业执行许多其他的任务,包括航空航天.制造业.金融.科研.汽车.游戏.IT. Mong

The web application you are attempting to access on this web server is currently unavailable.......

今天去服务器安装了个.net 4.0 framework(原本有1.0和2.0的),配置好站点后,选择版本为4.0,访问出错,错误代码如下 Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web brows

DICOM:剖析Orthanc中的Web Server,Mongoose之 Flag bit & Event(三)

背景: Orthanc是本专栏中介绍过的一款新型DICOM服务器,具有轻量级.支持REST的特性,可将任意运行Windows和Linux系统的计算机变成DICOM服务器,即miniPACS.Orthanc内嵌多种模块,数据库管理简单,且不依赖于第三方软件.因此通过剖析Orthanc源码可以学习到搭建DICOM系统中的各个环节,例如SQLite嵌入型数据库.GoogleLog日志库.DCMTK医学DICOM库,以及近期要介绍的开源Web Server,Mongoose. 上一篇博文中简单的分析了M

ubuntu16.04-x64系统中Jexus web server部署.NetCore和端口分析引发的猜想!

您有这样的牢骚么? 有一周没更新博客了,简单说下在干什么吧:主要是公司安排对接某旅游大公司的接口,接口数量倒也就10个左右,对接完后还需要加入到业务系统中和App端,因此还是需要花点时间的:时间上来说业务需求安排在6月最后一周上线,整个3周的时间,就本人一人负责,由于在这之前对接过另外一个公司接口,我已经搭建好了整体架构和提供给app端接口了,因此主要还是对接某公司接口而已,至于细节上的东西改改后台系统,调调数据格式应该就差不多了:就本人开发的熟练度来讲一周时间基本能搞定,其他剩余时间就测试,喝

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

Web Server支持HTTPS访问需要两个文件,私钥和证书.私钥和证书都放在服务器上,私钥用来加密数据,证书传递给客户端.自己签名的证书在传递给浏览器的时,因为证书不被信任,所以会弹出连接不安全,一般点高级->继续浏览,还是可以访问网页.如果我们的证书被根证书厂商签名过的话,就不会弹出不安全的提示,浏览器地址栏一般还有绿色小锁标志.以下来说一下怎么一步步生成证书. 1. 使用openssl生成私钥文件server.key,以下的步骤都是在Ubuntu上的使用openssl操作的,需要注意一下

How to Install Laravel with an Nginx Web Server on Ubuntu 14.04(Composer,laravel,nginx)

http://ubtutorials.com/tutorial/441/how-install-laravel-nginx-web-server-ubuntu-1404 https://github.com/huanghua581/laravel-getting-started/wiki/Ubuntu-14.04-%E4%B8%8A%E4%BD%BF%E7%94%A8-Nginx-%E9%83%A8%E7%BD%B2-Laravel http://www.ahlinux.com/ubuntu/2

nginx学习笔记之二:nginx作为web server

一.nginx的配置文件:nginx.conf 1.nginx配置文件的结构: main(全局配置段) events {...} http { ... server { location ... {...} location ... {...} ... } server { ... } } 2.配置参数需要以分号结尾,语法格式: 参数名  值1 [值2 ...]; 3.配置文件中还可使用变量: 模块内置变量 用户自定义变量:set var_name value 4.配置文件检查:nginx -t

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 web server with uWSGI and nginx This tutorial is aimed at the Django user who wants to set up a production web server. It takes you through the steps re

NGINX Web Server Nginx web 服务器

原文地址:http://nginx.com/resources/admin-guide/web-server/ NGINX Web Server Nginx web 服务器 This section describes: the most common configuration of a web server how to set up virtual servers and define locations for request processing how to use variable