High-Level Server Side Web Scripting in Curry
- 233 Downloads
We propose a new approach to program web services. Although we base our approach on the Common Gateway Interface (CGI) to ensure wide applicability, we avoid many of the drawbacks and pitfalls of traditional CGI programming by providing an additional abstraction layer implemented in the multi-paradigm declarative language Curry. For instance, the syntactical details of HTML and passing values with CGI are hidden by a wrapper that executes abstract HTML forms by translating them into concrete HTML code. This leads to a high-level approach to server side web service programming where notions like event handlers, state variables and control of interactions are available. Thanks to the use of a functional logic language, we can structure our approach as an embedded domain specific language where the functional and logic programming features of the host language are exploited to abstract from details and frequent errors in standard CGI programming.
KeywordsLogic Program Logic Programming Logical Variable Input Element Event Handler
Unable to display preview. Download preview PDF.
- 2.D. Cabeza and M. Hermenegildo. Internet and WWW Programming using Computational Logic Systems. In Workshop on Logic Programming and the Internet, 1996. See also http://www.clip.dia.fi.upm.es/miscdocs/pillow/pillow.html.
- 4.M. Hanus. A Unified Computation Model for Functional and Logic Programming. In Proc. of the 24th ACM Symposium on Principles of Programming Languages (Paris), pp. 80–93, 1997.Google Scholar
- 5.M. Hanus. Distributed Programming in a Multi-Paradigm Declarative Language. In Proc. of the International Conference on Principles and Practice of Declarative Programming (PPDP’99), pp. 376–395. Springer LNCS 1702, 1999.Google Scholar
- 6.M. Hanus. A Functional Logic Programming Approach to Graphical User Interfaces. In International Workshop on Practical Aspects of Declarative Languages (PADL’00), pp. 47–62. Springer LNCS 1753, 2000.Google Scholar
- 7.M. Hanus, S. Antoy, J. Koj, P. Niederau, R. Sadre, and F. Steiner. PAKCS: The Portland Aachen Kiel Curry System. Available at http://www.informatik.uni-kiel.de/~pakcs/, 2000.
- 8.M. Hanus and F. Steiner. Controlling Search in Declarative Programs. In Principles of Declarative Programming (Proc. Joint International Symposium PLILP/ALP’98), pp. 374–390. Springer LNCS 1490, 1998.Google Scholar
- 9.M. Hanus (ed.). Curry: An Integrated Functional Logic Language (Vers. 0.7.1). Available at http://www.informatik.uni-kiel.de/~curry, 2000.
- 10.J. Hughes. Why Functional Programming Matters. In D.A. Turner, editor, Research Topics in Functional Programming, pp. 17–42. Addison Wesley, 1990.Google Scholar
- 11.J. Hughes. Generalising Monads to Arrows. Submitted for publication, 1998.Google Scholar
- 12.D.A. Ladd and J.C. Ramming. Programming the Web: An Application-Oriented Language for Hypermedia Services. In 4th International World Wide Web Conference, 1995.Google Scholar
- 14.J. Peterson et al. Haskell: A Non-strict, Purely Functional Language (Version 1.4). Technical Report, Yale University, 1997.Google Scholar
- 15.A. Sandholm and M.I. Schwartzbach. A Type System for Dynamic Web Documents. In Proc. of the 27th ACM Symposium on Principles of Programming Languages, pp. 290–301, 2000.Google Scholar
- 16.V.A. Saraswat. Concurrent Constraint Programming. MIT Press, 1993.Google Scholar
- 17.P. Thiemann. Modelling HTML in Haskell. In International Workshop on Practical Aspects of Declarative Languages (PADL’00), pp. 263–277. Springer LNCS 1753, 2000.Google Scholar