论文网首页|会计论文|管理论文|计算机论文|医药学|经济学论文|法学论文|社会学论文|文学论文|教育论文|理学论文|工学论文|艺术论文|哲学论文|文化论文|外语论文|论文格式
中国论文网

用户注册

设为首页

您现在的位置: 中国论文网 >> 计算机论文 >> 计算机网络论文 >> 正文 会员中心
 计算机应用论文   计算机理论论文   计算机网络论文   电子商务论文   软件工程论文   操作系统论文   通信技术论文
Server-Side Scripting Languages as Tools for Collecting and Organizing Data

abstract

server-side scripting languages can provide educational institutions with the ability to create web-based applications, which efficiently collect data in an well-organized manner. this presentation covers cold fusion markup language (cfml) and hypertext preprocessor (php), two popular scripting languages, which interact with databases. these languages provide an efficient and flexible means of building on-line assessment tools, questionnaires, and surveys. the data collected is automatically inserted into databases, and may also be sent as email. several projects will be discussed, ranging from a simple web-based form, which sends data to a database, to a complex system, which not only collects data, but also allows authorized users to view the data online and to add comments which will be archived.

introduction

the development of internet and www presents us with a unique opportunity for on-line distance teaching and learning. this field has developed very rapidly in the past few years because of the many practical uses of the web. among these practical uses is the ability of web-based fill-in forms to efficiently gather data that can then be inserted into databases for later retrieval. server-side scripting languages are one of the most effective ways to collect data on-line. they can also be used to query a database to retrieve data and dynamically create web pages. this paper will provide some background into the development of these languages, describe how they function, and present some case studies showing real life uses of this technology at a large american university.

first we need to examine some of the basic features of the web to see how these scripting languages developed. a major feature of the www is the potential for developers to create links between text and other media, not only within an individual document but also between documents residing on any computers in the world which have access to the web.

web documents are usually written in html (hypertext markup language), a simple markup language that describes the logical structure of the text. very often, html is stored in static files on the server's hard disk. such simple, static hypertext documents can convey a great deal of information, but eventually their limitations become clear. for example, what if the author wishes to provide dynamic information, which could be based on the user inputs, interaction with the database etc.? dynamic documents, unlike static documents, require the server to generate the documents on the fly. for example, dynamic documents can be generated from databases of all kinds, from video capture systems, and from scientific instruments such as various real-time monitoring systems. such documents are often transmitted directly to the clients as they are created, without even being stored in the file system. in other cases, they may consist largely of fixed content, with a small amount of dynamic content generated when a page is actually delivered.

one approach to serving a dynamic web page is through the "server-side include" technique. the html system makes it easy to link documents to each other. however, the current versions of html do not allow a single large html document to be assembled from several smaller documents through simple reference in the documents unless it physically contains copies of the these smaller documents. but nothing prevents web servers from providing their own extended version of html in which such included sections are permitted, as long as the server takes care of the task of including these documents and delivers the complete html documents to the client. this approach is called the server-side include mechanism. a server side script language extends the server side include interface normally used to insert entire documents and attempts a more natural feel as an "extension" to html.

there are many server-side scripting languages available. here we will concentrate on cold fusion markup language (cfml) because of its wide usage. we will also introduce the hypertext preprocessor
(php) language because it is open source and free to everyone. our case study will be based on cfml.

cold fusion (cf) and hypertext preprocesser (php)

cold fusion is a scripting language that is used to write dynamic web pages. it lets you create pages on the fly that differ depending on user input, database lookups, time of day or other criteria one can define. cold fusion pages consist of standard html tags such as <font size="+2"> together with cfml (cold fusion markup language) tags such as <cfquery>, <cfif> and <cfloop>. cold fusion was introduced by allaire in 1996 and is currently in version 4.5.1.

cold fusion is a complete web application server for developing and delivering scaleable online applications which allow one able to do:

· rapid development - intuitive visual tools and an innovative tag-based programming environment make cold fusion a highly productive platform for delivering applications.
· scaleable deployment - a high performance, multithreaded architecture and advanced features such as just-in-time compiling, load balancing, and fail-over ensure that your applications will scale to handle the most demanding sites.
· open integration - open integration with databases, email, directories, java, xml, and enterprise systems means you can develop complex web applications quickly and easily.
· complete security - the latest advanced internet security technologies and clean integration with network and web server security, give you the services to build secure systems.

a cold fusion application is very simply a collection of pages, similar to a static web site. but unlike the pages in a static web site, the pages in a cold fusion application include the server-side cold fusion markup language in addition to html. cfml gives you theability to control the behavior of your applications, integrate a wide range of server technologies, and dynamically generate the content that is returned to the web browser.

the diagram below shows what happens when a web browser requests a page in a cold fusion application.

1. when a user requests a page in a cold fusion application by submitting a form or clicking a hyperlink, the user抯 web browser sends an http request to the web server via the internet or intranet.
2. the web server passes the data submitted by the client and the requested page to the cold fusion application server either through a server api or cgi. cold fusion pages are automatically compiled and cached in memory so processing in is very fast and scaleable even under high loads.
3. cold fusion reads the data from the client and processes the cfml used in the page. based on the cfml the cold fusion application server executes the application logic and interacts with a wide range of server technologies.
4. cold fusion dynamically generates an html page and returns it to the web server.
5. the web server then passes the page back to the user抯 web browser.

similar to cf, php (recursive acronym for php: hypertext preprocessor) is another server-side script language to generate dynamic web page and interact with various other resources on the web server side. one unique features of php is that it is open-source software (freely downloadable from php.net and zend.com) and so enjoys the support of a large group of open-source developers. the code is continuously updated with improvements and language extensions to expand php's capabilities.

cold fusion case study
college: the college of agriculture and nature resources (agnr) at the university of maryland.
product: cold fusion 3.5 (will be upgraded to version 4.5.1).
hardware: gateway2000, pentium ii, 512k ram, 2x9 gb hard disk.
web server: microsoft iis 3.0
os: windows nt 4.0
database: microsoft access97

· dynamic calendar

agnr has developed a calendar application in which event data can be dynamically added, viewed and extracted from an on-line calendar system. users with proper authorization can use the "event submission form" to post events. the calendar is dynamically generated each time a user queries the calendar database, but this is transparent to the user.

the primary purpose of this calendar was to allow users who have little or no technical background to easily post events to our on-line calendar.

the following graph and code are the example of how cold fusion (cf) can be used to query and list events from the online calendar event database:
events.cfm
<html>
<head>

<title>agnr list of upcoming events</title>

<cfquery name="searchmonth" datasource="agnr calendar">
select month(startdate) as month, year(startdate) as year, genlocation
from events
where internal = 0
order by startdate
</cfquery>

<cfquery name="searchcategory" datasource="agnr calendar">
select category
from events
where internal = 0
order by category
</cfquery>

<input type="button" value="display" onclick="searchevents(document.search.month.options[document.search.month.selectedindex].value, document.search.category.options[document.search.category.selectedindex].value, document.search.location.options[document.search.location.selectedindex].value, document.search.facility.options[document.search.facility.selectedindex].value)">

<cfoutput query="eventlist" group="month">
<h3>#dateformat(startdate, "mmmm yyyy")#</h3>
<blockquote>
<cfoutput>
<cfif enddate neq "">

<dt><b>#dateformat(startdate, "mmmm d, yyyy")# #thru# #dateformat(enddate, "mmmm d, yyyy")#</b>
<dd><b>#link#</b> - #description#
#whattime#
<dd><i>location:</i> #location#
<dd><i>contact:</i> <a href="mailto:#pocemail#">#pocname#</a> #pocphone#
</dl>
</cfoutput>
</blockquote>
</cfoutput>

</body>
</html>

http://www.agnr.umd.edu/agnrcalendar

· convert archived newsletters to web page directly using cf
the university of maryland抯 agricultural extension service has many old newsletters that contain information valuable to agricultural workers, students, and researchers. this on-line application was developed to convert these old newsletters which were only available in paper format into on-line html documents. workers with no knowledge of html, and with no experience in uploading files onto a web server are able to simply type the text of the paper into a fill-in form in order to put these old newsletters on-line. after the worker keys in the newsletter, and submits it, the newsletter is archived in an access database. when the user retrieves a newsletter, it is dynamically generated from the database. this application demonstrates that using cf you can very easily convert old newsletters to html format and put all the newsletters online for easy access. the user can also perform a keyword search of the newsletter database to find a particular article.

the following screenshot and cfml code show how the university of maryland抯 college of agriculture uses cf to convert old newsletters to html format. the application shown also let users perform keyword searches on the archive. (see keyword cow's search results below)

<html>
<head>
<title>agnr newsletters</title>

<cfquery name="newsletter" datasource="agnr newsletters">
select *
from nl_main
where id = #url.id#
</cfquery>

<cfquery name="issue" datasource="agnr newsletters" maxrows=1>
select id, date, mainid
from nl_issues
where mainid = '#url.id#'
order by released desc;
</cfquery>

</head>

http://www.agnr.umd.edu/testing/mark/newsletters

· online news briefs

here cf is used to generate on-line news briefs dynamically from an on-line news database. the user is able to ask the web server to search the database and return a subset of the news briefs.

<html>
<head>

<title>news release archive</title>

<cfquery name="nrlist" datasource="agnrnews">
select id, title, issuedate
from releases
where issuedate > (now()-90)
order by issuedate desc;
</cfquery>

<h3>most recent agnr news...</h3>

<cfoutput query="nrlist">
<tr>
<td valign="top">#dateformat(issuedate)#</td>
<td valign="top"><a href="newsrelease.cfm?id=#id#">#title#</a></td>
</cfoutput>

</body>
</html>

http://www.agnr.umd.edu/agnrnews/releases/index.cfm

the newsrelease cf application server currently uses password protection for the security which in our case study is implemented using the campus-wide ldap server for authentication and service authorization. more security tools will be considered such as implementing ssl with the web/cf server.

summary

in this paper, we introduced two popular server-side scripting languages, cold fusion markup language (cfml) and hypertext preprocessor (php) which provide an efficient and flexible means of building dynamic web documents. our case studies based on cfml show that powerful server-side scripting language allows us to build on-line applications that can collect information, and generate dynamic web pages based on user inputs or other constantly changing data.

acknowledgements

we would like to thank mark shute for providing access to his cf codes and web site. the authors also acknowledge the courtesy of mark shute and koralleen d. stavish who supplied background information about related to the case study.

reference

/

/

  • 上一个计算机论文:
  • 下一个计算机论文:
  •  作者:未知 [标签: ]
    姓 名: *
    E-mail:
    评 分: 1分 2分 3分 4分 5分
    评论内容:
    发表评论请遵守中国各项有关法律法规,评论内容只代表网友个人观点,与本网站立场无关。
    FlexPaper解决网络文档浏览问题
    试析IPsec在计算机网络通信中的应用
    初探WindowsServer2003操作系统的安全配置
    基于SemRank的CWME专家权威度计算方法研讨
    利用开源框架Struts+Hibernate实现Web应用程
    基于SEO技术提高网站访问量的策略研究
    利用Geoway—Checker软件设计1:5千缩编1:
    ERP系统软件在国家电网公司中的应用
    Internet环境中远程教学系统的网络安全问题
    ERP系统中数据仓库的应用
    探讨校园网络        网络通讯安全管理
    浅析Internet网页的视觉传达
    | 设为首页 | 加入收藏 | 联系我们 | 网站地图 | 手机版 | 论文发表

    Copyright 2006-2013 © 毕业论文网 All rights reserved 

     [中国免费论文网]  版权所有