Ads 468x60px

Thursday, July 28, 2011

Web Programming

Web Programming
As parts of an information processing, rather than information delivery, system, the client and server components of a Web-based system take on different, and expanded, roles. The PC client, the Web server, and the database server work in coordination to generate and bring information content to the computer screen.
Conventional Page Delivery
In their traditional roles the components operate pretty much as illustrated in Figure 1.5. The Web page author codes a Web document using a text editor, an HTML editor, or a visual tool to wrap information content inside HTML formatting codes to display the information in a browser. This document is then placed in a Web-accessible folder on the Web server to await access. Users enter URL addresses in their browsers to retrieve the page for viewing, with the browser interpreting the HTML formatting codes in the received document and rendering the enclosed information on their computer screens.

 Conventional Web page authoring.
From the standpoint of the Web server, there's not much going on. The server simply locates the document and passes it along to the user. As noted, the Web server is not much more than an electronic page turner for people accessing Web documents.
Modern Information Processing
When Web pages become information processors, however, the situation changes dramatically. Now, interspersed within HTML formatting codes are server scripts and other commands directing the Web server to perform processing activities. Pages include Visual Basic code to perform arithmetic and logical operations on the data to be processed; SQL directives and calls to database procedures activitate routines on the database server to retrieve or update information; possibly JavaScript routines are included to direct client processing activities when the page is returned to the browser. The Web page becomes a set of commands directing all of the hardware and software components of the Web system to perform a coordinated set of activities to generate, process, store, and deliver information to clients.

Web Programming

 Modern Web page development.

The Web server coordinates these information processing activities. When the Web page is first retrieved from the server, it is not immediately directed to the user who requested it. Instead, the page is converted by the ASP.NET processor (aspnet_eisapi.dll) into a software class. It becomes, in effect, a compiled software object, a computer program to perform input, processing, output, and storage functions. At this point server processing is carried out and any SQL queries or database procedures are passed along to the database server for retrieval of information that is embedded in the Web page prior to its return to the client. Any browser scripts coded on the page are ignored by the server and are passed along to the client for activation when the page is returned. In effect, the Web server builds a Web page based on embedded programs and directives, returning data-processed-rich content to the browser.

Components of a Web Page
A Web page is a coordinated series of processing tasks directed to the Web server, the database server, and the Web client, all wrapped inside HTML codes to structure and format the output. The Web page outline in Figure 1.7 gives you a sense of the various kinds of processing and formatting components that can appear on a Web page.

 Components of a Web page.
Web pages are not so much "written" as they are "programmed." A page must be designed not only with a sense of presentation style but also with sensibilities about the various component parts to be orchestrated to generate its information content. The page is, fundamentally, a piece of software. As such, it must be designed and executed with the same precision and logic as any other computer program.
Although the coded Web page is a collection of client- and server-side processing components, the final page returned to the user's browser is an HTML document only. This is a key point. Server scripts and data access methods appearing in the original document are not part of the returned page. Only the processing results and HTML code are visible. The server has executed the scripts and inserted the output results inside the HTML code. The programs have been replaced by their output. The resulting page is no different from one on which you might have hard coded the output information. The only difference is that the server does the typing for you.
Since the returned page is pure HTML surrounding embedded content this means that virtually any browser can display the results. No special software is required by the client. This also means that user's cannot "reverse engineer" the resulting Web page to determine your original code; thus, security is maintained over server processing. The user is not aware of the script logic that generates the results nor of any business rules implemented in the code.
There's just a lot of stuff going on with a Web page, but it's not that difficult to sort it all out. With a little experience you should be able to integrate HTML code, CSS styles, JavaScript routines, server-based Visual Basic code, SQL commands, and .NET components into an orchestrated whole, directing all of the hardware, software, and data components of the system to produce a Web page to carry out the work of the enterprise.


Post a Comment