tkWWWInternals

Basic architecture

tkWWW consists of two processes
A frontend GUI (Graphical User Interface)
the frontend GUI is responsible for all user interaction and is coded completely in tk. It responds to user input and issues commands to the server backend.
A backend server (tkWWW.server)
the backend server is written in C using TCL and www libraries, and is responsible for getting html files over the network and parsing them into commands that are to be executed by the frontend GUI.
The design philosophy behind tkWWW is to put as much as functionality as possible into the interpreted frontend GUI rather than the compiled backend server. The server is responsible ONLY for network interaction and parsing HTML files. All of the special functions of tkWWW (like the history mechanism, bookmarks, and annotations) are coded in interpreted frontend rather than in compiled backend.

General guidelines

Naming and Programming Conventions -- Frontend

All tk procedures and global variables should be named tkWWW(filename) where filename is the name of the tk file in which that procedure or variable is found . Exception: The procedures in hypertext.tcl begin with tkW3Ht. This is to minimize the amount of traffic between the frontend and the backend.

Naming and Programming Conventions -- Backend

All commands to the backend server should begin with Ht. The only file in which Ht commands should be found is navigate.tcl. All other files should call procedures in navigate.tcl to communicate with the backend. The frontend should not expect the backend to save any state.