Hostname: page-component-76fb5796d-dfsvx Total loading time: 0 Render date: 2024-04-25T20:46:19.788Z Has data issue: false hasContentIssue false

Server side web scripting in Haskell

Published online by Cambridge University Press:  01 January 2000

ERIK MEIJER
Affiliation:
Department of Computer Science, Utrecht University, PO Box 80089, 3508 TB Utrecht, The Netherlands (e-mail: erik@cs.uu.nl)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

The Common Gateway Interface (CGI) for generating dynamic documents on web servers imposes much accidental complexity on the programmer. The Haskell/CGI library documented in this paper hides all this unpleasantness by using the common sense ‘design pattern’ of separating model and presentation. Low-level query string requests are represented by association lists, and primitive HTTP responses are easily constructed using a set of HTML generating combinators. The CGI programmer only needs to write a worker function that maps an abstract request into an abstract response. A (higher-order) wrapper function then transmutes the worker into a real low-level CGI script that deals with the exact format of concrete requests and responses as required by the CGI standard.

Type
Research Article
Copyright
© 2000 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.