This article constitutes section 1, part C, chapter 7 of the CIW Website design manager course briefly covers: Server-Side Scripting and Database Connectivity.
Server Side Scripting
It is not too many years, since all scripting had to take place on the server. Advances in browsers now mean that more and more scripting can take place client-side. Some tasks are better performed on the client and others are better carried out at the server.
However, tasks that require information from the client or need interaction from the user should, obviously, be client-side operations. Similarly, tasks that read or write to or from a database should be server-side scripting.
There are benefits and drawbacks to both. Too much client-side scripting will bloat the HTML files and incur long download times and use valuable bandwidth. Too much server-side scripting will load the server and may slow the performance for all clients.
Currently, most Web-based transactions occur via HTML forms. When a content designer creates an HTML form, he or she uses the FORM tag to associate the form with a server resource. This server resource is a program, or scripting, that receives the information from the form and processes it..
Common Gateway Interface (CGI)
While CGI represents the most simple and universal gateway. In CGI, the server responds to an HTML form by executing a co-process and returning the output from the process to the client. This process is responsible for constructing a properly formatted HTTP reply.
Because CGI and other gateways permit remote users to execute programs on a local machine, the use of such gateways has important security implications.
One of the drawbacks of CGI is that it creates out-of-process events. Meaning that each instance of a script runs as a separate process on the server. Too many users running too many scripts will quickly exhaust the server resources. Which may prevent the server from servicing new users
Poorly written CGI programs that may not account for unexpected user entries can be another drawback If a script does not account for all possibilities, it will not deliver the user’s information correctly, resulting in lost information.
Owing to it’s ability to call events out of process, CGI can also invite security problems. Hackers can initiate these scripts for their own ends.
To solve the problems presented by CGI, developers have designed gateways using dynamically loaded object libraries.
Here, the server generates a reply document by calling a dynamically loaded subroutine. The server returns the output from the subroutine to the client. Using dynamically loaded libraries eliminates the substantial overhead involved in starting new process on the host, thus providing better performance.
A database is a file or collection of files used to collect and collate information. Three types of database exist within businesses and organisations: relational, non-relation and object-oriented. Whichever database type you use, you will need software to access and manipulate the data.
Administrators will use database management systems to create, optimise and manage databases. It is more usual to refer to a database management system by the acronym DBMS. Within a DBMS there are two types of database: hierarchical and Network.
Similarly, when working with a relational database, you need an RDBMS and an ODBMS to work with object oriented databases.
It is the job of the management system to ensure orderly access to the information. And, to ensure the data maintains it’s integrity.
First of all, there are two recognised standards of database gateway application. These allow users to program the operating system to recognise the database. These are the Open Database Connectivity (ODBC) and Java Database Connectivity (JDBC) standards.
- ODBC is a Microsoft solution that allows programmers to refer to databases. It is based on the X-Open standard call-level interface, and is one of the industry standard APIs for using SQL to access relational databases.
- JDBC was developed by Sun Microsystems subsidiary JavaSoft. JDBC allows a server to work with any SQL compliant database, rather than forcing a DBMS to comply with a standard created by one company.
Furthermore, as part of my blog curation process, I have updated the wording of this article to make it more amenable to my Yoast SEO plugin.
However, after much manipulation, I can only get the article readability score, on the Flesch reading scale, up to a miserly 47.
Therefore, I am afraid the rather technical wording will need to suffice. Yes I could rewrite the entire article. But, that could well only worsen the situation.