Problem
Does the web framework include webserver? Is it possible to include?
What is the relationship between the Webserver and the framework?
Https://www.quora.com/What-is-the-difference-between-a-web-server-and-a-web-framework
A Web server is A executable this handle HTTP requests and serve your files to the client.
A lot of web frameworks has a Web server executable so can test your code easily, but usually these Web servers a Re for developeronly. It means that the shouldn ' t use them for production, since they is 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.
The server serves static content and transmits the request to other code in the CGI program (the CGI program implements the framework).
Web Framework
Originally, the ' passing on ' meant executing programs (usually scripts) separate from the WS, using a protocol called CGI (Just a standard-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.
Implement CGI Protocol program, script library, parse CGI request, generate HTML, this programming the first generation of web framework.
It became common to reduce the overhead of these external scripts by grafting the script interpreter onto the WS. Web frameworks has, over time, started to take over much of the request-parsing aspect of the WS ("Routing") – enough so That's some frameworks decided to dispense with the WS entirely.
It is common practice to port script parsers to webserver, which can reduce the load on external scripts.
Webframework, after the evolution of time, began to take over the Request parsing section (WS routing), causing some frameworks to start running without webserver.
The style of Web programming have also changed:javascript now puts a lot of the WF's logic into the browser, so that whate Ver logic is still on the WS-much reduced (as opposed to the original CGI notion, where the browser really only Han dled rendering of a static blob of HTML provided by the WS.)
Time is evolving, the style of modern web programming, and new changes, JS now implements a lot of webframework logic, in the browser,
So the business logic of the server segment can be drastically reduced.
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, Rou Ting, etc.
So, I say WS refers to Universal webserver, when we say webframework, refers to PHP or modern JS system, templates, ORM, Routing and so on.
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 so lets you query and manipulate data from a database using an Object-ori Ented paradigm. When talking on ORM, most people is referring to a library that implements the object-relational Mapping Tech Nique, hence the phrase "an ORM". An ORM library are a completely ordinary library written in your language of choice that encapsulates the code needed to Ma Nipulate the data, so you don't use SQL anymore; You interact directly with a 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 is clear: to hide the boilerplate and infrastructural code related to Han Dling HTTP
requests and responses. Just How much are hidden depends on the framework. Django and Flask represent the 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 does some of the less common web framework tasks.
Remember, though, that's at the end of the day, the Python Web frameworks all work the same-in: they receive HTTP
requests , dispatch code that generates HTML, and creates a HTTP
response with that content. In fact, the all major server-side frameworks work on this (excluding JavaScript frameworks). Hopefully, you ' re now equipped to choose between frameworks as you understand their purpose.
Web server && Web Framework role differentiation