Why Use Tcl?
You can extend AOLserver using Tcl, C, or CGI. However, using Tcl has the following advantages:
- Creating new Tcl scripts is very easy. You can embed Tcl scripts directly into HTML pages using AOLserver Dynamic Pages (ADPs), or you can create .tcl files and register them to handle URLs or URL hierarchies.
- Tcl's scripting language is easier to learn and use than compiled programming languages. It provides general programming capabilities, such as variables, loops, and procedures, but it doesn't require strong type definitions or compilation. Plus, AOLserver's Tcl interface provides a complete set of Tcl extensions specifically oriented towards web server applications, such as returning content to the client, accessing form data, accessing databases, and logging.
- Many of the basic AOLserver services are implemented as Tcl scripts. In fact, most of the database operations such as handling database inserts, queries, and updates, are written as Tcl scripts. Not only has the Tcl interface greatly reduced the development time for the AOLserver engineering team, it also allows you to easily modify the basic database operations by simply editing the Tcl scripts that implement the functionality.
- The Tcl and C interfaces typically provide better performance than CGI. However, if you have existing CGI programs, you may want to use AOLserver's CGI interfaces to take advantage of previously-existing code.
The C interface for AOLserver is described in the AOLserver C Developer's Guide, and the CGI interface is desribed in the AOLserver Administrator's Guide.