ED-MEDIA 1999 Proceedings Book - Association for the ...

ED-MEDIA 1999 Proceedings Book - Association for the ... ED-MEDIA 1999 Proceedings Book - Association for the ...

17.01.2015 Views

DATABASE-DRIVEN WEB APPLICATIONS FOR TEACHING & LEARNING 1. Introduction Daniel Y. Lee Department of Economics & Coordinator, the Virtual University Shippensburg University Shippensburg, PA 17257 USA DYL@ship.edu Although many instructors now utilize the Web to supplement their courses, the Web pages they create are mostly “static” in nature. These HTML documents are written and then posted onto the Web server, where they sit until requested by a browser. Materials on these documents are outdated overtime until the Web developer revises them one page at a time, which requires considerable time and effort, especially as Web pages multiply. In the long run, a better strategy to maintain a Web site is to use “dynamic” pages linked to databases. These Web pages are "dynamic" in the sense that they are created “on the fly.” They don’t exist until a browser makes the request. Upon the information user’s request, the database inserts the requested information into preformatted HTML templates. If the information in the database is updated, the Web page will display the new information the next time it is requested by the user. The purpose of this paper is to provide an overview of how educational Web sites can be more easily administered, modified, and customized by using Web-database connectivity. 2. Developing Database-Driven Web 2.1 Advantages of using database-driven Web Web browsers provide a Graphical User Interface (GUI) that can be used to access many things, including a database. Unlike the traditional database management systems, the user would not have to configure and learn to program database client software. Instead, using a Web browser's built-in forms capability, users can access a database by simply filling in the data they want and pressing a button. The returned data can then be presented in an easily readable format. Furthermore, the Web's cross-platform support allows users on many different types of computers or platforms (Windows, Mac, Unix) to access a database from anywhere in the world. Information can be disseminated with a minimum of time and effort, without having to solve compatibility problems (Lee and Liu, 1998). There are several advantages of using database-driven Web development over the conventional “static” Web pages. First of all, Web pages can be created “on the fly” by querying current information stored in the database. New and fresh information can be presented to the user at each visit. This technology also makes it easier to administer, modify, update, and customize a Web site. In addition, users can tap into vast existing databases including many legacy systems through Web-database interaction. This allows for cross platform access without requiring custom client applications. Furthermore, database-driven Web makes it possible such useful functions as maintaining user state, i.e., user’s preferences and other user-specific information can be stored between visits for various uses. In addition to these benefits, database-driven Web renders particular advantages to educational Web sites. Databases are “an excellent way to manage the media components of a Web site … instructional Web sites comprise huge numbers of media objects and multiple of content creators; databases make managing this information and longer-term maintenance issues easier to address” (Ashenfelter 1998). 2.2 Mechanism of database-driven Web Typically, the Web server delivers a block of text written in the HTML to the browser, which parses the HTML and may request additional content, such as graphical data. The model works well for static data, but what about live data For example, how would a Web server deliver content that it generates based on user input One answer is to use a CGI (Common Gateway Interface) script to handle the database queries. CGI scripts are programs that let Web servers execute other programs and incorporate their output into HTML documents. The Web server executes a CGI program as a separate process to fulfill a user's request, which can be as simple as a Web page hit counter or as complex as a database query. Because a CGI program is external to the Web server, it can be written in virtually any language,

whether compiled or interpreted. Some Web servers provide libraries and interpreters for Java and Visual Basic for use by CGI programs. While CGI programs can handle basic Web-database connectivity functions, programming requires a steep learning curve. CGI programming is also subject to such limitations as input data validations and weak security. Recently various “middleware” products have been developed to minimize the CGI programming time and additional features of Web-database connectivity, including superior security, input data validation, e-mail protocol, etc. Middleware is a general term for any programming that serves to glue together or enhance two separate programs. Users now can create Web-database applications by using a fourth generation language middleware products such as Cold Fusion or Active Server Pages. Database-driven Web publishing involves three major components: the Web forms, CGI or middleware, and database system. The mechanisms for Web-database interaction are shown schematically in Figure 1. There are four major stages in this interaction. First, the user fills the Web form using the browser, requesting pertinent information. The browser submits the request to the Web server. Second, the server invokes middleware or CGI scripts, accessing and querying the database. Third, the middleware or CGI retrieves or produces a HTML document. Finally, the Web server sends the result to the browser for display. CGI script or middleware makes it possible for the operations such as opening and updating appropriate database tables to link form objects to a database structure specified in the database design. The Web server and database server can be hosted in a single computer or two separate machines connected through the Internet. 2.3 Design of a database-driven Web To design an effective database-driven Web, three major design activities must be performed, including Web form design, database development and CGI or middleware programming. Web forms are necessary as a user interface for a database-driven Web. The information user can send a request to a database by submitting it via Web form. A relational database is composed of rows (for records) and columns (for fields) in table format. Compared with a flat file structure, database approach has the advantages of minimal data redundancy, information sharing, and data consistency. Finally, some programming is required to connect the Web forms and databases. For example, Active Server Pages utilize extensively Visual Basic programming knowledge. Visual InterDev utilizes more user-friendly graphical interface. Cold Fusion eliminates some of the complex CGI coding by combining standard HTML with a server-side markup language called the Cold Fusion Markup Language (CFML). For example, the CFML tag can replace many lines of CGI programming codes. In addition, Cold Fusion supports such advanced features as security integration, dynamic Java forms, data entry valuation, e-mail integration, Lightweight Directory Access Protocol (LDAP) support, and advanced SQL (Structural Query Language).

DATABASE-DRIVEN WEB APPLICATIONS FOR TEACHING & LEARNING<br />

1. Introduction<br />

Daniel Y. Lee<br />

Department of Economics & Coordinator, <strong>the</strong> Virtual University<br />

Shippensburg University<br />

Shippensburg, PA 17257 USA<br />

DYL@ship.edu<br />

Although many instructors now utilize <strong>the</strong> Web to supplement <strong>the</strong>ir courses, <strong>the</strong> Web pages <strong>the</strong>y create are<br />

mostly “static” in nature. These HTML documents are written and <strong>the</strong>n posted onto <strong>the</strong> Web server, where <strong>the</strong>y sit until<br />

requested by a browser. Materials on <strong>the</strong>se documents are outdated overtime until <strong>the</strong> Web developer revises <strong>the</strong>m one<br />

page at a time, which requires considerable time and ef<strong>for</strong>t, especially as Web pages multiply. In <strong>the</strong> long run, a better<br />

strategy to maintain a Web site is to use “dynamic” pages linked to databases. These Web pages are "dynamic" in <strong>the</strong><br />

sense that <strong>the</strong>y are created “on <strong>the</strong> fly.” They don’t exist until a browser makes <strong>the</strong> request. Upon <strong>the</strong> in<strong>for</strong>mation user’s<br />

request, <strong>the</strong> database inserts <strong>the</strong> requested in<strong>for</strong>mation into pre<strong>for</strong>matted HTML templates. If <strong>the</strong> in<strong>for</strong>mation in <strong>the</strong><br />

database is updated, <strong>the</strong> Web page will display <strong>the</strong> new in<strong>for</strong>mation <strong>the</strong> next time it is requested by <strong>the</strong> user. The purpose<br />

of this paper is to provide an overview of how educational Web sites can be more easily administered, modified, and<br />

customized by using Web-database connectivity.<br />

2. Developing Database-Driven Web<br />

2.1 Advantages of using database-driven Web<br />

Web browsers provide a Graphical User Interface (GUI) that can be used to access many things, including a<br />

database. Unlike <strong>the</strong> traditional database management systems, <strong>the</strong> user would not have to configure and learn to program<br />

database client software. Instead, using a Web browser's built-in <strong>for</strong>ms capability, users can access a database by simply<br />

filling in <strong>the</strong> data <strong>the</strong>y want and pressing a button. The returned data can <strong>the</strong>n be presented in an easily readable <strong>for</strong>mat.<br />

Fur<strong>the</strong>rmore, <strong>the</strong> Web's cross-plat<strong>for</strong>m support allows users on many different types of computers or plat<strong>for</strong>ms (Windows,<br />

Mac, Unix) to access a database from anywhere in <strong>the</strong> world. In<strong>for</strong>mation can be disseminated with a minimum of time<br />

and ef<strong>for</strong>t, without having to solve compatibility problems (Lee and Liu, 1998).<br />

There are several advantages of using database-driven Web development over <strong>the</strong> conventional “static”<br />

Web pages. First of all, Web pages can be created “on <strong>the</strong> fly” by querying current in<strong>for</strong>mation stored in <strong>the</strong><br />

database. New and fresh in<strong>for</strong>mation can be presented to <strong>the</strong> user at each visit. This technology also makes it easier<br />

to administer, modify, update, and customize a Web site. In addition, users can tap into vast existing databases<br />

including many legacy systems through Web-database interaction. This allows <strong>for</strong> cross plat<strong>for</strong>m access without<br />

requiring custom client applications. Fur<strong>the</strong>rmore, database-driven Web makes it possible such useful functions as<br />

maintaining user state, i.e., user’s preferences and o<strong>the</strong>r user-specific in<strong>for</strong>mation can be stored between visits <strong>for</strong><br />

various uses. In addition to <strong>the</strong>se benefits, database-driven Web renders particular advantages to educational Web<br />

sites. Databases are “an excellent way to manage <strong>the</strong> media components of a Web site … instructional Web sites<br />

comprise huge numbers of media objects and multiple of content creators; databases make managing this<br />

in<strong>for</strong>mation and longer-term maintenance issues easier to address” (Ashenfelter 1998).<br />

2.2 Mechanism of database-driven Web<br />

Typically, <strong>the</strong> Web server delivers a block of text written in <strong>the</strong> HTML to <strong>the</strong> browser, which parses <strong>the</strong> HTML<br />

and may request additional content, such as graphical data. The model works well <strong>for</strong> static data, but what about live data<br />

For example, how would a Web server deliver content that it generates based on user input One answer is to use a CGI<br />

(Common Gateway Interface) script to handle <strong>the</strong> database queries. CGI scripts are programs that let Web servers<br />

execute o<strong>the</strong>r programs and incorporate <strong>the</strong>ir output into HTML documents. The Web server executes a CGI<br />

program as a separate process to fulfill a user's request, which can be as simple as a Web page hit counter or as complex as<br />

a database query. Because a CGI program is external to <strong>the</strong> Web server, it can be written in virtually any language,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!