EGL Rich UI is a technology that you can use to write applications
that will be deployed on Web servers. The technology builds on central
EGL idea: to write simple code that is converted automatically to
output that is useful for running a business.
The output in this case is client-side JavaScript™, which is called client-side because
the JavaScript runs in
the browser, not on the remote machine that serves the Web page. Client-side JavaScript makes the Web page
more responsive, which increases flexibility so that the user's experience
can go beyond receiving and submitting a page. After the user clicks
a radio button, for example, the logic might respond by changing the
content of a text box. The change occurs quickly because the JavaScript runs locally and,
in most cases, redraws only one area of the page.
An extension of client-side JavaScript is Ajax,
a technology that permits the runtime invocation of remote code and
the subsequent update of a portion of a Web page, even as the user
continues working elsewhere on the page. For example, after the user
selects a purchase order from a list, the JavaScript logic might request transmission
of order-item details from the remote Web server and then place those
details in a table displayed to the user. In this way, the application
can access content from the server but can save time by selecting,
at run time, which content is transmitted.
You write Rich UI applications by using EGL syntax. For advanced
purposes, however, you can write custom JavaScript or use JavaScript libraries instead of relying
on the default behavior that is provided by EGL. For example, you
can use Rich UI to access the following software:
The product demonstrates use of the Dojo Toolkit.
A Rich UI application can act as the front end for services that
access databases and do other complex processing. You can access the
following kinds of services, which are described in "Architectural
styles in Web services":
- SOAP services
- REST services that are provided by vendors, such as Yahoo and
Google
- EGL REST services, which are REST services for which the access
(by other EGL logic) is simple
Outline of development tasks
As a Rich UI
developer, you complete the following tasks in the EGL perspective:
- Create a Rich UI project
- Create a kind of EGL handler part called an EGL Rich UI
handler
- Open the handler in the EGL editor and add content to the Rich
UI handler in the following ways:
- By dragging on-screen controls called widgets onto
a Web page surface. In this situation, you can set widget properties
by typing values into windows that are part of the EGL editor.
- By coding widget details directly into the Rich UI handler.
- By writing the following kinds of logic directly into the Rich
UI handler:
- Startup logic, which runs when the browser first receives the
application from a Web server
- Event logic, which runs in response to user actions, such as a
button click
When you are ready to deploy your code, you right-click
the EGL deployment descriptor (file extension .egldd)
and click Deploy EGL descriptor. This action
creates an output in a Web project. You use the output project for
later deployment to a JEE-compliant application server such as Apache
Tomcat.
For further details about deployment, see “Deploying
EGL applications.”
The EGL Editor
When you use the EGL editor
to develop a Rich UI application, the editor has three tabs (Design,
Source, and Preview):
- The Design surface is a graphical design area that shows the displayable
content of the Rich UI handler. You can drag-and-drop widgets from
a palette into the display and then customize those widgets in the
Properties view.
- The Source view includes the EGL editor, with which you update
logic and add or update widgets. The Design surface and Source view
are integrated: changes to the Design surface are reflected in the
Source view; and, if possible, changes to the Source view are reflected
in the Design surface.
- The Preview view is a browser that is internal to the workbench.
You can run your logic on the Preview view, or switch to an external
browser.
The EGL Perspective
When a Rich UI handler
is open in the EGL editor, the EGL perspective is displayed as follows: