gawkinet: Some Applications and Techniques

1 
1 3 Some Applications and Techniques
1 **********************************
1 
1 In this major node, we look at a number of self-contained scripts, with
1 an emphasis on concise networking.  Along the way, we work towards
1 creating building blocks that encapsulate often needed functions of the
1 networking world, show new techniques that broaden the scope of problems
1 that can be solved with 'gawk', and explore leading edge technology that
1 may shape the future of networking.
1 
1    We often refer to the site-independent core of the server that we
1 built in ⇒A Simple Web Server Simple Server.  When building new
1 and nontrivial servers, we always copy this building block and append
1 new instances of the two functions 'SetUpServer()' and 'HandleGET()'.
1 
1    This makes a lot of sense, since this scheme of event-driven
1 execution provides 'gawk' with an interface to the most widely accepted
1 standard for GUIs: the web browser.  Now, 'gawk' can rival even Tcl/Tk.
1 
1    Tcl and 'gawk' have much in common.  Both are simple scripting
1 languages that allow us to quickly solve problems with short programs.
1 But Tcl has Tk on top of it, and 'gawk' had nothing comparable up to
1 now.  While Tcl needs a large and ever-changing library (Tk, which was
1 bound to the X Window System until recently), 'gawk' needs just the
1 networking interface and some kind of browser on the client's side.
1 Besides better portability, the most important advantage of this
1 approach (embracing well-established standards such HTTP and HTML) is
1 that _we do not need to change the language_.  We let others do the work
1 of fighting over protocols and standards.  We can use HTML, JavaScript,
1 VRML, or whatever else comes along to do our work.
1 

Menu