Page 279 -
P. 279

web development





                                                Tonight’s talk: To be CGI or not to be CGI, that is the question.






           A Python Program:                                     A Python CGI Script:
           Listen: you’re really not all that different than me;
           you just work on a web server, whereas I can work
           anywhere.
                                                                 Yes. I like to think of myself as special.

           Special?!? But you only work on the Web, nowhere
           else. How’s that “special”?

                                                                 Because all the cool stuff works on the Web these
                                                                 days and I’m designed, optimized, tailored, and
                                                                 engineered for the Web. Because the Web’s a cool
                                                                 place, it follows that I must be cool, too. See: special.
           Nonsense! The truth is that you work only on the Web
           and break pretty quickly when used elsewhere. You
           don’t even have control over your own I/O.
                                                                 I don’t need control over my input and output. I
                                                                 have a friendly web server to take care of that for
                                                                 me. My input comes from the web server and my
                                                                 output goes to the web server. This arrangement
                                                                 allows me to concentrate on the important stuff.

           Like [sniggers] generating text in the form of
           HTML? That’s really taxing…
                                                                 Smirk all you want; HTML makes the World Wide
                                                                 Web go around and I’m a master at generating it
                                                                 dynamically, on demand, and as needed. Without me,
                                                                 the Web would be a pretty static place.
           Oh, get over yourself! You’re a regular program,
           just like me. I can generate HTML, too, I just
           choose not to.
                                                                And if you did generate HTML, you’d want it
                                                                 displayed somewhere…like in a browser?
           I guess so…

                                                                And to do that you’d need to rely on the services of
                                                                 a friendly web server, right?

           Ummmm…I guess so.

                                                                 Which would make you a CGI script. So, you’d be
                                                                 special, too. Q.E.D.


                                                                                      you are here 4    243
   274   275   276   277   278   279   280   281   282   283   284