Genero Web Client for JavaScript (GWC-JS) / Migrating from GDC to GWC-JS |
Even if most Genero Desktop Client (GDC) features are supported in Genero Web Client for JavaScript (GWC-JS), you still have points to consider before migrating.
Before you migrate your application for the GWC-JS, examine the limitations and authentication specifics. You must modify your application to handle unsupported features. See Features and limitations.
One method of evaluating is to run the application and see what happens! If you encounter an issue, you need to determine if this is a limitation, a customization, or a bug. See Migration tips for hints aimed at helping you solve your issues during migration.
These limitations are grouped under the headings rendering and behaviors.
More than likely your application is capable of displaying on a number of different display sizes and devices but an exact pixel-by-pixel match with GDC can not be expected.
If in the GDC you have sized everything to fit in a certain sized area in a monitor, there is no guarantee that it will render inside a browser tab to the exact same size. It will be close but you may, for example, find scroll bars appearing. Therefore, to ensure that your application works well on your target devices, it is recommended that you review your application's screens.
The GWC-JS is a Web client and as such it is not a fully-implemented Windows manager. It displays at most two windows at once. It always displays the top most normal (non-modal) window, and then if there is a modal window opened, it is displayed over it. This is the equivalent of running the GDC with every non modal window maximized.
OPEN window msg WITH FORM "MyWindowB" ATTRIBUTES (STYLE="dialog")
Window B then displays as a pop-up window.
An alternative is to consolidate windows A and windows B together as one window.
Excerpt from
$FGLDIR/lib/default.4st<Style name="Window.dialog"> <StyleAttribute name="windowType" value="modal" /> <StyleAttribute name="sizable" value="no" /> <StyleAttribute name="position" value="center" /> <StyleAttribute name="actionPanelPosition" value="bottom" /> <StyleAttribute name="ringMenuPosition" value="bottom" /> <StyleAttribute name="toolBarPosition" value="none" /> <StyleAttribute name="statusBarType" value="none" /> <StyleAttribute name="errorMessagePosition" value="popup" /> </Style>
Multiple Document Interface (MDI) is not applicable for Web applications.
It is likely you will want to apply some corporate styling to your user interface, for example, to use your corporate colors, add your logo, etc. For more information on this, please see the customization topics in the How Do I … ? section. Before you migrate your application to the GWC-JS, it is recommended that you try out some customization exercises. For example, change the default blue color of the user interface to a color of your choosing, and/or modify the header to display a logo, and/or change the favicon.
With the GDC, your application is an executable running on a front-end PC. It is therefore bound by rules of what an executable can do within the operating system. With the GWC-JS, your application is running inside a browser. As such it follows the rules of what Web pages are allowed to do inside a browser.
File transfer in GWC-JS is not transparent. The browser requests user permission before downloading anything on the client side. For more information see FILE_TRANSFER.
Calls by the front-end that access the desktop file systems (disk) are not supported. Check the available front-end function calls for GWC-JS in the Genero Business Development Language User Guide. The alternative is to write your own front-end call in JavaScript. For more information see the Implement front call modules for GWC - JavaScript topic in the Genero Business Development Language User Guide.
APIs such as WinDDE, WinMail, and WinCOM used for data exchange and communication with, for example, Microsoft® Excel®, Word®, and Outlook®, are not supported by GWC-JS. The alternative here is to use the server-side Java API solutions for Microsoft® documents, such as those provided by Apache®. For more information, see the topics about the Apache POI framework in the The Java interface section of the Genero Business Development Language User Guide.
Printing immediately to a local printer is not supported. The local printer has to be registered on the server first and print commands must originate from the back-end server. Alternatively, you can display a file that the user can print by selecting
menu in the browser.Some browsers may not allow some or all keystrokes to pass through to the application, or it is possible (as in the case of tablets and smartphones) that the device does not perform keystrokes. You should review your sources and review your dependencies on keystrokes. For example, use ON ACTION instead of ON KEY, etc.
Press <ENTER> to continueIf you have messages like this displayed on your screens, text may need to be made more appropriate for the application.
If you have a low number of licenses or run close to your limit of user licenses, you may need to add extra licenses to lessen the chance of running out of licenses when this happens. With a CPU license this is not an issue. For more information see Multi-user Licensing topics in the Genero Licensing User Guide.
Most GDC applications connect to the server with its user permissions and profile. As a result, the applications are run under this user identity.
When applications are deployed through GAS, they are launched as the user that started the GAS, unless you ask GAS to impersonate.
As the application user is different, this can have an impact on use of environment variables and permissions. The setting for the HOME environment variable, for example, may not be for the user you intended, and the ability to read/write files and execute sub-shells may also be affected by different user permissions.
You need to review your sources to determine how dependent you are on environment variables. If you do not already have one, it is probable that you will need to add the concept of an application user to your application. You will also need to consider how this user is authenticated. This may mean adding your own login/password dialog, or using SSO or Web server authentication.
In any case, it is recommended to migrate the application first on GDC over HTTP. If the application runs on the browser, no further action is required. Otherwise, depending on authentication needs, adaptations to your application may be needed.
fgl_getenv("FGL_WEBSERVER_REMOTE_USER")
For more details, see the fgl_getenv topic in the Built-in functions chapter of Genero Business Development Language User Guide.