PreviousMaintaining and Creating Data Files Creating a Web ApplicationNext

Chapter 7: Introduction to Web Applications

This chapter introduces basic concepts relevant to all the tutorials on creating Web applications.


You need to have read the chapter Start Here for the Tutorials and worked through the first session, Using NetExpress, before you read this chapter.


Be sure you understand the basics of the World Wide Web before continuing. They're explained in the appendix Web Applications. Many terms used in this chapter and the sessions in this Part are explained there.

In NetExpress, you can create a Web application in three ways:

For all three cases you use Internet Application Wizard. In the first case you first use HTML Page Wizard to design the form yourself. After that, the three ways of using Internet Application Wizard are very similar, in that you give it the one existing item - form, program, or database - and it generates the rest of the application for you.

Forms and form-handling code generated in this way are based on standard templates supplied with NetExpress. You can edit the forms and form-handling code later if you want to customize them to your own exact requirements.

The sessions in this Part take you through these three ways of using Internet Application Wizard. You can use any Web browser to test your applications in these sessions.

7.1 Solo

You can use any Web server software to test your applications. In these sessions we use Solo, the Web server software included in NetExpress. It is designed especially for testing Internet applications developed using NetExpress. It is not designed for use as a production Web server. Solo needs no configuration or setup. (If you want to see how it is automatically configured, see the appendix Configuring Your Web Server.)

7.2 Server-side Programs

In a server-side program created using NetExpress, the input/output of the form is done by two Micro Focus extensions to COBOL: an extended ACCEPT statement, and an EXEC HTML statement (known as Embedded HTML) which outputs HTML written within the statement. The form has to include a "Submit" button; when the end-user clicks this, the program runs on the Web server. The ACCEPT statement inputs data from the form.

Micro Focus COBOL also has an extended DISPLAY statement, but the EXEC HTML statement is more powerful.

7.2.1 Structure

A server-side program typically consists of little more than:

  1. The ACCEPT statement to input the data from the input form.
  2. Code to move the data from the data items associated with the input form to your work areas.
  3. The business logic you've inserted.
  4. Code to move the results from your work areas to the data items associated with the form.
  5. The EXEC HTML statement(s) to create the output form(s).

Notice that:

7.2.2 Symmetric and Asymmetric

An application can use the same form for both input and output, or use separate forms.

An application with only one form is called symmetric. Typically, it is started by the end-user running the executable. You'd probably create a Web page with a link to the executable. When the end-user clicks this, the program runs once, displaying the form on the browser. The end-user fills in the form, clicks the Submit button, and the program runs again to process the data and display the results. The form is then ready for the end-user to use again.

An application with separate input and output forms is called asymmetric. Typically, it is started by the end-user loading the input form. You'd probably create a Web page with a link to this form. When the end-user clicks this, the form is loaded. The end-user fills in the form, clicks the Submit button, and the program runs to process the data and display the output form with the results. To enter the next query, the end-user loads the input form again. (Though if the output form contains all the input fields that the input form does, the user can get away with using it for input rather than bothering to reload the input form - the program won't know the difference, as it knows only that it's receiving data from a browser.)

If an application uses more than one input form, you create a separate server-side program for each one.

7.3 Before Continuing

Return to the Tutorials Map in the chapter Start Here for the Tutorials and choose which session to go on to next, depending on your interests.


Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousMaintaining and Creating Data Files Creating a Web ApplicationNext