Server side web scripting in Haskell
Erik Meijer · Journal of Functional Programming · 2000
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.
Cited by 53 works. doi:10.1017/s0956796899003561 Open-access PDF
Authors
References
- Design Patterns: Elements of Reusable Object-Oriented Software
- Hypertext Transfer Protocol -- HTTP/1.0
- MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies
- Generalising monads to arrows
- Monadic parsing in Haskell
- The design of a pretty-printing library
- Functional Pearl
- Scripting languages : automating the web