Currently CGI is re-implemented in every different ways in-place in various J scripts and frameworks.
CGI is proposed to be implemented as a standard general framework and addon to serve the needs of all other related areas: Web Server, JHP, special apps like Forums Search, other protocols like FastCGI, etc. Naming conventions: Addons/web/cgi (addon location) CGI/... (Wiki location) CGI/Comments (area to continue this discussion) What CGI framework will contain: * external interface: command-line call and configuration conventions * boot script: for jconsole for general processing of command-line params and environment variable and discover and call application script * handling environment variables and representing them to J consumer scripts in common form, hiding platform specifics, e.g. SCRIT_URL vs SCRIPT_NAME, etc. * handling HTTP parameters in GET, POST and multipart/form-data (for upload) should include high-level "qparams" to extract parameters (possibly typed) regardless of method close to declarative form as in JHP; also process structures, such as common prefix as J locale with names, and same name params to list of values, as from a set of checkboxes. * maintain headers: declare content type, etc. like JHP calculate content length * support mime types and related headers * provide output writer with encoding: binary or charset like utf-8; buffered mode; hide Windows text mode stdout issue * redirect to other URLs and execute other CGI scripts * handle errors: try/catch; Respond.End() as special throw; error reporting * encoding/decoding utilities: url and HTML encoding Basically it's CGI part of JHP split out and enhanced, so that it is standard, general and flexible to handle other applicationas and framework needs. Doing so it makes sense how it is done in other languages, notably Perl, PHP, python and ruby. It's good to make sure nothing essential is missed and possibly borrow some implementation. Please see if I missed anything in the list above. ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
