Abstract
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.
This research has been partially supported by the German Research Council (DFG) under grant Ha 2457/1-2 and by the DAAD under the PROCOPE programme.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM, Vol. 47, No. 4, pp. 776–822, 2000.
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 .
M. Hanus. The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming, Vol. 19&20, pp. 583–628, 1994.
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.
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.
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.
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.
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.
M. Hanus (ed.). Curry: An Integrated Functional Logic Language (Vers. 0.7.1). Available at http://www.informatik.uni-kiel.de/~curry , 2000.
J. Hughes. Why Functional Programming Matters. In D.A. Turner, editor, Research Topics in Functional Programming, pp. 17–42. Addison Wesley, 1990.
J. Hughes. Generalising Monads to Arrows. Submitted for publication, 1998.
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.
E. Meijer. Server Side Web Scripting in Haskell. Journal of Functional Programming, Vol. 10, No. 1, pp. 1–18, 2000.
J. Peterson et al. Haskell: A Non-strict, Purely Functional Language (Version 1.4). Technical Report, Yale University, 1997.
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.
V.A. Saraswat. Concurrent Constraint Programming. MIT Press, 1993.
P. Thiemann. Modelling HTML in Haskell. In International Workshop on Practical Aspects of Declarative Languages (PADL’00), pp. 263–277. Springer LNCS 1753, 2000.
P. Wadler. How to Declare an Imperative. ACM Computing Surveys, Vol. 29, No. 3, pp. 240–263, 1997.
D.H.D. Warren. Logic Programming and Compiler Writing. Software-Practice and Experience, Vol. 10, pp. 97–125, 1980.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hanus, M. (2001). High-Level Server Side Web Scripting in Curry. In: Ramakrishnan, I.V. (eds) Practical Aspects of Declarative Languages. PADL 2001. Lecture Notes in Computer Science, vol 1990. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45241-9_6
Download citation
DOI: https://doi.org/10.1007/3-540-45241-9_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41768-2
Online ISBN: 978-3-540-45241-6
eBook Packages: Springer Book Archive