7 Web Programming

7.1 Overview

Due to the ubiquity of the world wide web (WWW or “web” for short), many applications offer web-based interfaces in order to support convenient access to them. This chapter describes how one can implement web-based interfaces in Curry. We will see that the functional and logic programming features of Curry are quite useful in providing a high-level programming interface for such applications so that Curry can also be used as a language for “web scripting,” i.e., for writing web interfaces in a concise manner.

This chapter requires some basic knowledge about the structure of HTML, the “Hypertext Markup Language” for describing the general form and layout of documents presented by web browsers. Up-to-date information about HTML is available from the World Wide Web Consortium (W3C).

The approach to web programming described in this chapter is based on the library “HTML” contained in the PAKCS distribution. Details about the ideas and the implementation of this library can also be found in [17].