Forms and Event-driven Processing

Topics:

Forms are the visual interface to an App Studio Maintain Data application, giving it a dynamic and attractive face while enabling you to make the application flexible and to place its power at the fingertips of the application end users.

You can design forms that enable end users to:

You develop these forms and the associated logic using the Form Editor. This is a sample form:


Form example image

Forms are event-driven, and enable:

For an introduction to using forms and developing event-driven applications, see How to Use Forms, Designing Event-driven Applications, and Creating Event-driven Applications.

How to Use Forms

Forms are deployment-independent. You design a form to meet the needs of your application. App Studio Maintain Data automatically implements the form as a webpage. This enables you to focus on logic, and leave implementation details to App Studio Maintain Data.

Forms have standard form features, including:

  • A title bar that identifies the form.
  • Scroll bars that enable you to move the contents of a control vertically and horizontally if they extend beyond the control border.

Forms are displayed one at a time in one web browser session.

You can transfer control from one form to another, from a form to another Maintain Data procedure or to an App Studio procedure, and from a form to any Internet resource, such as an email client, a webpage, or an FTP server.

Designing a Form

Forms offer a diverse set of ways by which an application end user can select options, invoke procedures, display and edit fields, and get helpful information. For example, if you want the user to select an option or procedure, you can use any of the following controls:

  • Buttons. You can specify a function to be performed when the end user clicks a button or image. Common examples are Done and Cancel buttons.
  • Radio buttons. The end user can select one of a mutually exclusive group of options. For example, an employee could identify his or her department.
  • Check boxes. The end user can select or deselect a single option or characteristic. For example, an applicant could indicate if this is the first time that he or she has applied.
  • Combo boxes and list boxes. The end user can select one or more options from a dynamic list of choices.
  • Menus. The end user can select an option from a drop-down menu or submenu.

If you want to display or edit data, you can use these controls:

  • Edit boxes. You can use this control to edit a single value.
  • Multi-line edit boxes. You can use this control to edit a long value wrapping onto multiple lines.
  • HTML tables. You can use this control to view a data source stack.
  • Grids. You can use this control to edit and view a data source stack.

Designing Event-driven Applications

The flow of control in conventional processing is mostly pre-determined, that is, the programmer determines the few paths that the user will be able to take through the procedure.

To make your application user interface more responsive to the user, App Studio Maintain Data offers event-driven processing. Each time that an event occurs, it invokes, or triggers, the assigned task. In App Studio Maintain Data, the event is something the application end user does in a form, and the task is a function or a URL. For example, you might create a button that, when clicked by a user, triggers a task that reads a data source and displays the data in the form.

Creating Event-driven Applications

Developing a procedure by writing out sequential lines of source code may be sufficient for conventional linear processing, but event-driven processing demands event-driven development. Developing an application in this way lets you build much of the application logic around the user interface. In effect, you develop the application as you develop the interface in the HTML canvas. For example, you could start by creating a form, creating a control, and then coding a task for one of the control events. App Studio Maintain Data also provides you with a number of automated tools for developing applications. For example, you can use the Language Wizard to generate source code for various operations such as retrieving and updating data.

WebFOCUS

Feedback