Web-based database publishing
Recently, the use of database publications in Web pages is increasingly used.
This chapter discusses the publishing technology within the Delphi software environment.
It is shown that a multilevel structure of the client-server mode is used for publication. The foundations of the HTML language used for publications are given. An example of publishing a database (DBMS Paradox) using the Delphi environment is given. The results are illustrated by screen forms.
Web publishing [2, 31, 32, 35] is the ability to put dynamic data on the database server on a Web page.
The goals of publications can be different: e-commerce, public relations, advertising, education. In this case, learning is chosen as the goal.
The scheme for implementing the Web publishing procedure is shown in Fig. 13.1. As you can see, publications are implemented using a variant of the client-server mode with a multi-level structure (see Chapter 11), which uses somewhat different terminology.
The client (Figure 13.1) is called a Web browser (sometimes just a browser), the application server is a Web server (www-server).
The request from the browser accepts and processes the Web server that implements HTTP protocol support. The disadvantage of such a scheme is the static (immutability of the HTML document) transferring data to a Web browser.
In order to achieve dynamic publishing, extension modules are created on the Web server (scripts, scripts). The task of the scripts (Figure 13.1) is to accept and process the request, extract the necessary data from the database server, which are represented in the programming language HyperText Markup Language (HTML), and transfer it back to the Web server. The latter sends the HTML document to the browser (client).
Fig. 13.1. Schema for implementing the Web publishing procedure
Therefore, preference is usually given to standard interfaces for building expansion modules [2, 46-49]:
1) Common Gateway Interface (CGI);
2) ISAPI, NSAPI (Internet Services- and Netscape Server API).
Chronologically, the first appeared CGI interface, but it
has significant shortcomings.
Initially, the script was an exe file, which was uncomfortable for the Windows environment. Subsequently, we switched to the WinCGI variant, where the parameters from the server to the script were transmitted via the INI file.
At the same time running each time exe-file meant a loss of speed. To improve performance, Microsoft provided the Internet server with the ISAPI protocol of server interaction with the extension module. In this case, the script is a dynamic library that is uploaded by the server.
For example, the query find = petr of the browser to the library module test.dll of mysite.com can be of the form
mysite.com.script/test.dlI/find = petr
Working with Web pages has its own specifics for various applications  and in the general case it is difficult to describe. In this regard, we will focus on the capabilities of the Delphi application.
Within the Delphi application [12, 25], the lSAPI module, which covers the actual Web server and the extension module (Figure 13.1), can be implemented as a TWebModule module consisting of the TDataModule and TWebDispatcher components.
There are two components to the publication:
1) the formation of a Web server;
2) actual publication.
They are conveniently illustrated by the example of Delphi .
1. Creating a Web server using ISAPI.
In this component, the creation of the source (A), in which the database can act, and the formation of the HTML-page (B) on the basis of the source, are selected in turn.
A. Create a data source. In the File/New menu of the Delphi application, select the WEB Server Application template in which to set the type of the ISAPI/NSAPI Dynamic Link Library server. In the object inspector, call the Actions property editor. Add another Action with the property, set the Pathlnfo properties as/test, and Default as true. On the Events Inspector objects double-click on the mouse on the OnAction event.
Add a heading to the method header
Response. Content: = 'Hello';
This is actually the content of some database. Save the project as
d: ... InetPubScriptsIDAPITEST.DPR.
In the future, the source will be the database.
B: Create an HTML page.
This page will call the Web module:
& lt; HTML & gt;
& lt; HEAD & gt;
& lt; TITLE & gt; Example 13.1. & lt;/TITLE & gt;
& lt;/HEAD & gt;
& lt; BODY & gt;
& lt; CENTER & gt;
& lt; BR & gt; & lt; A HREF = .../scripts/ISAPITEST.DLL/TEST & gt; & gt; Text & lt;/& gt;
& lt;/CENTER & gt;
& lt;/BODY & gt;
& lt;/HTML & gt;
Save this page to d: ... InetPubWWWRoot est.htm.
Launch the Web browser (for example, via Internet Explorer). Type http: // localhost/test.htm. The www-page with the underlined word Text will appear on the screen of the monitor. If you click on it, the result of the work of the dll-library will be seen on the screen: the word Hello.
It is also possible to directly call the dll-library at
From Example 13.1 it is possible to draw such conclusions.
1. All processes in the publication are supported by the HTML programming language.
2. A primitive, illustrative example is given.
For example 13.1 to become real enough and satisfy the user, you should make more use of the HTML programming language.
Also We Can Offer!
- Argumentative essay
- Best college essays
- Buy custom essays online
- Buy essay online
- Cheap essay
- Cheap essay writing service
- Cheap writing service
- College essay
- College essay introduction
- College essay writing service
- Compare and contrast essay
- Custom essay
- Custom essay writing service
- Custom essays writing services
- Death penalty essay
- Do my essay
- Essay about love
- Essay about yourself
- Essay help
- Essay writing help
- Essay writing service reviews
- Essays online
- Fast food essay
- George orwell essays
- Human rights essay
- Narrative essay
- Pay to write essay
- Personal essay for college
- Personal narrative essay
- Persuasive writing
- Write my essay
- Write my essay for me cheap
- Writing a scholarship essay