中国科学院机构知识库网格
Chinese Academy of Sciences Institutional Repositories Grid
基于函数式方法的CGI程序设计

文献类型:学位论文

作者吕品
学位类别硕士
答辩日期2008-06-05
授予单位中国科学院软件研究所
授予地点软件研究所
关键词函数式方法 通用网关接口 程序延续 延续传递风格
中文摘要由于HTTP 天生的无状态性质,Web 程序设计中产生了这样一个问题:在两个连续的用户交互之间会遗忘状态信息。一个交互性的 Web 应用程序由一组脚本构成,每个交互都包含两个脚本,一个脚本向浏览器递交页面(然后结束),用户及时完成并提交表单,然后另一个(可能是不同的)脚本处理提交的表单。所以,应用程序逻辑分布在多个脚本之间。 由于浏览器还允许用户在交互中回溯,或者克隆一个正在处理中的交互过程,之后并行执行这两个交互过程,所以问题变得更加复杂。Web 开发框架(例如 Spring 和 Struts)允许处理多个交互,但是它们进一步提高了整体上已经很复杂的代码库的复杂性。 在本文中,我们将几种函数式方法应用到Web程序设计中,从而简化复杂 Web 应用程序的开发。我将从介绍 continuation 的应用开始,逐步引入CPS,Trampoline,Lambda Lifting等函数式方法,通过用Scheme语言编写的一个CGI实例详细展示函数式方法的效果,并进一步将这些方法在C语言中实现。
英文摘要Due to the inherent stateless nature of HTTP, Web technologies suffer from the problem of state information being forgotten between two successive user interactions. An interactive Web application consists of a collection of scripts wherein a single interaction comprises one script delivering a page to the browser (then ending), the user completing and submitting the form at some later point in time, and another (possibly different) script handling the submitted form. Thus, application logic is spread across a multitude of scripts. Matters are further complicated by the fact that browsers allow users to backtrack in their interactions or clone an in-progress interaction and run both in parallel. Web development frameworks, such as Spring and Struts, allow programmers to handle multiple navigational paths, but they cost of increasing the complexity of code base. In this thesis, we introduce several functional methods into Web programming, in order to simplify the complexity of Web development. We’ll start from the application of continuation, and then utilize CPS, trampoline and lambda lifting step by step. A instance of CGI script programmed in Scheme will be shown later, to display how these methods work, and will be further implemented in the language C.
语种中文
公开日期2011-03-17
页码63
源URL[http://124.16.136.157/handle/311060/7310]  
专题软件研究所_综合信息系统技术国家级重点实验室 _学位论文
推荐引用方式
GB/T 7714
吕品. 基于函数式方法的CGI程序设计[D]. 软件研究所. 中国科学院软件研究所. 2008.

入库方式: OAI收割

来源:软件研究所

浏览0
下载0
收藏0
其他版本

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。