> because if you are making an HTTP server, then yea stuff is going to be calling you.
Not necessarily. You could write the
while True:
request = getNextRequest()
...
yourself. A web server library would have functions for parsing headers, creating http responses, handling cookies, generating html, etc., and could have data structures that make it easier to dispatch requests to individual handlers, but your code would be in the driving seat as to what gets called.
Also a web framework could call a function to extract an URL from an incoming http request without any involvement of code you write.
A framework provides a main method; a library doesn’t.
Not necessarily. You could write the
yourself. A web server library would have functions for parsing headers, creating http responses, handling cookies, generating html, etc., and could have data structures that make it easier to dispatch requests to individual handlers, but your code would be in the driving seat as to what gets called.Also a web framework could call a function to extract an URL from an incoming http request without any involvement of code you write.
A framework provides a main method; a library doesn’t.