Give a brief overview of forms and how they work. Include a description of the Common Gateway Interface.

What will be an ideal response?

You can use a variety of input elements for the form based on the type of information you want to gather from your user. Forms usually contain basic HTML formatting tags such as

and
. Forms can also be styled with CSS, which helps control their visual layout. Well-designed forms include active white space, aligned form elements, and clear labels.
The HTML form itself is the interface for the user to enter data, but all of the actual data processing is performed on the server using applications that reside on the web server or in the Common Gateway Interface (CGI). The traditional method of processing forms input has been to use the Common Gateway Interface, which is the communications bridge between the Internet and the server. Using programs called scripts, CGI can collect data sent by a user via the Hypertext Transfer Protocol (HTTP) and transfer it to a variety of data-processing programs, including spreadsheets, databases, or other software running on the server. The data processing software can work with the data and send a response back to CGI, and then on to the user in the form of a web page generated by the application.

Although CGI is still in use, other alternatives are faster and more efficient. Most of the popular web server software, such as Apache on Linux web servers and Internet Information Service (IIS) on Windows web servers, have their own plug-in modules that run forms processing software, while programming languages like Java, PHP, and PERL offer faster and more customizable options than the traditional CGI model.

The programs that manage the processing of the collected data can be written in a variety of programming languages, although scripting languages are the most common. The scripting language most commonly used with HTML forms is JavaScript, which was originally created for the Netscape browser in 1995. JavaScript is a client-side scripting language, which means that it runs on the user's computer, rather than on the server. JavaScript can enhance your Web site with beneficial programming functions, including form validation that checks a user's form entries for errors before the result is sent to a form script, which is a program that transfers form data to a server.

Current trends in web development take advantage of the increased power in modern web browsers, which are more tightly integrated with HTML5 and CSS3 than earlier browsers. With the programming capabilities of JavaScript, web developers now have a more robust platform for building rich web-based applications.

Computer Science & Information Technology

You might also like to view...

The main reason for file compression is to ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

In OAuth, what attack does the Client Secret mitigate? Why do you think the Client Secret is optional for Public Clients?

What will be an ideal response?

Computer Science & Information Technology