The essential part of any application is the user interface. For desktop applications, OpenInsight refers to these as "forms" and the Form Designer is the native tool that will be used to create and modify them. Forms are created within SRP FrameWorks in the normal way, but there is no need to use Script and QuickEvent handlers as is typical in normal OpenInsight applications. Working with events will be discussed in a separate article. For now, we will just explore methods of designing forms that are optimized for SRP FrameWorks.

Understanding MDI

SRP FrameWorks uses a traditional Multiple Document Interface (MDI) approach toward presenting the user with application content. As this Wikepedia article suggests, there are pros and cons to MDI. Our philosophy has been that most OpenInsight applications are being designed for organizations that require end users to be primarily focused on core business activity and data. The MDI model provides users with a more consistent and unified experience thus minimizing the learning curve and improving productivity.

As mentioned in the installation instructions, the form FW_MAIN is the default entry point for SRP FrameWorks based applications. FRW_MAIN is known as the MDI Frame, which acts as the foundation for all other windows in the application.

FRW_MAIN - The MDI Frame

The primary MDI Frame for SRP FrameWorks, FRW_MAIN, will likely be modified to suit the needs of the application. Usually the changes occur in the area of the FRW_MAIN menu and the toolbar. Regardless of the nature of the change, when the inherited version FRW_MAIN is opened in the Form Designer from within the production application, it will alert the developer with the following message:

This is a slightly misleading message. It suggests that no changes can be saved. What it is really trying to say is that no changes will be saved to the original (i.e., inherited) form. This message should just be dismissed. Once changes have been made and the developer chooses to save the form, only the "Save As" option will be available. We recommend using the same name of he original form: FRW_MAIN. However, when doing this, another slightly misleading message will appear:

 

This now seems to suggest that be saving the form under the original name will replace the inherited form in the FRAMEWORKS application. Fortunately this is not the case. Instead, it will save a copy of this form (with the modifications that were made) in the local application. All future attempts to modify or run this form will come from the local copy rather than the inherited form.

MDI Children

End users primarily interact within the application via MDI Children. From an OpenInsight perspective, these are just normal forms with one important feature: they have no menus. The reason for this is because the MDI Frame itself provides the MDI Child form built-in menu (and toolbar) functionality, as shown in this screen shot of the MDI Frame (FRW_MAIN) and an MDI Child form (DBW_USER_ACCESS):

Using a Template

Experienced OpenInsight developers know that when a new form is created using the Form Designer tool, a default template from the SYSPROG application is used to provide a starting point. SRP FrameWorks developers can continue to use these default templates although it is recommended that any pre-defined menus be removed to avoid conflict with the FRW_MAIN menu.

Alternatively, SRP FrameWorks ships with five sample forms. These forms are pre-configured to work naturally within SRP FrameWorks. They also have their own commuter modules so the developer is able to add event functionality immediately.

SRP Form Copy

To make it easier for developers to create new forms and commuter modules from a template, SRP FrameWorks comes with a built-in utility called the SRP Form Copy. Just run the SRP_FORM_COPY form itself from within the OpenInsight Form Executables group within the OpenInsight Application Manager or double-click on the SRP_FORM_COPY item listed under the SRP Utilities group (which is created when any SRP tool is installed.)

Using the SRP Form Copy is fairly simple:

  1. Pick the form you want to copy (this is typically a template, like DBW_SAMPLE5).
  2. Name the new form.

Note that when possible, the SRP Form Copy tool will also create a new commuter module based on the one linked to the original form.

  • No labels