manpagez: man pages & more
info gawkinet
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Some Applications and Techniques

In this chapter, we look at a number of self-contained scripts, with an emphasis on concise networking. Along the way, we work towards creating building blocks that encapsulate often needed functions of the networking world, show new techniques that broaden the scope of problems that can be solved with gawk, and explore leading edge technology that may shape the future of networking.

We often refer to the site-independent core of the server that we built in A Simple Web Server. When building new and nontrivial servers, we always copy this building block and append new instances of the two functions SetUpServer and HandleGET.

This makes a lot of sense, since this scheme of event-driven execution provides gawk with an interface to the most widely accepted standard for GUIs: the web browser. Now, gawk can rival even Tcl/Tk.

Tcl and gawk have much in common. Both are simple scripting languages that allow us to quickly solve problems with short programs. But Tcl has Tk on top of it, and gawk had nothing comparable up to now. While Tcl needs a large and ever-changing library (Tk, which was bound to the X Window System until recently), gawk needs just the networking interface and some kind of browser on the client's side. Besides better portability, the most important advantage of this approach (embracing well-established standards such HTTP and HTML) is that we do not need to change the language. We let others do the work of fighting over protocols and standards. We can use HTML, JavaScript, VRML, or whatever else comes along to do our work.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.