Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let's talk about mod_python vs. mod_php.</p> <p>Since the Python language is NOT specifically designed for serving web pages, mod_python must do some additional work. </p> <p>Since the PHP language IS specifically designed to serve web pages, mod_php simply starts a named PHP module.</p> <p>In the case of mod_python (different from mod_fastcgi or mod_wsgi), the designer of mod_python decided that the best way to invoke Python is to call a method of an object defined in a module. Hopefully, that method of that object will write the headers and web page content to stdout. </p> <p>In the case of mod_wsgi, the designer decided that the best way to invoke Python is to call a function (or callable object) in a module. Hopefully that function will use the supplied object to create header and return a list strings with the web page content.</p> <p>In the case of mod_php, they just invoke the module because PHP modules are designed to serve web pages. The program runs and the result of that run is a page of content; usually HTML.</p> <p>The reason mod_php works one way, mod_python works another and mod_wsgi works a third way is because they're different. Written by different people with different definitions of the way to produce a web page. </p> <p>The php page can be object-oriented. A mod_wsgi function may be a callable object or it may be a simplef unction. Those are design choices.</p> <p>The mod_python requirement for a class is a design choice made by the designer of mod_python.</p> <p>The reason "why" is never useful. The reason "why" is because someone decided to design it that way.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload