Вопрос

Is an HTTP framework and a web framework the same?

For example:
Sometimes I read that CherryPy is an HTTP framework and sometimes it is called web framework (look at this post or under the Basic Frameworks on the python.org site).

Это было полезно?

Решение

CherryPy calls itself an HTTP framework because it focuses on providing an API for managing HTTP. Frameworks which call themselves "web frameworks" typically ship with additional API's for managing databases, HTML/XML templating, javascript generation, RPC protocols and media types, and other components which are deemed useful for web development. CherryPy does not ship such components or API's, and therefore does not call itself a "web framework", although third parties may understandably do so when comparing CherryPy to other frameworks.

Другие советы

HTTP is a web protocol; there are other web protocols in use. An HTTP framework is a type of web framework.

CherryPy now calls itself a web framework. I guess HTTP framework that it used to be named was simply a poor name choice, probably influenced by the fact it incorporates a pretty advanced HTTP server.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top