Echo2 versus GWT
Another toolkit that hides AJAX's implementation details
The HelloWorldApp is an extremely small application that is intentionally simple. However, from it you should be able to get a flavour of the AWT/Swing style of the Echo2 framework. In this class we have an init() method. This method creates a new instance of a Window (which is the object returned by the method). We then create a content pane that is added to the window, and a pane to hold our graphical components - a Label and a Button.
Note that the root of the Echo world is EchoServer, which must return an instance of EchoInstance. Each session has its own EchoInstance object. From this point on, everything is programmed in terms of Java classes such as Window, Label, Button, Table etc. Also note that to implement the button behaviour all I have to do is write a standard-looking ActionListener, which will toggle the message displayed by the label.
To deploy this example application we must create a WAR file containing the Echo2 library jars () and a web.xml file to define our web application to our Web Application Server (in my case, this is Tomcat).
Once this is done, I can reference the URL for the web application created by Echo and display the result as illustrated in Figure 1.
The range of GUI components supplied by Echo2 is not limited to labels and buttons, of course; the full set includes components for:
- Button / CheckBox/RadioButton/ToggleButton
- Label / Table
- Color / Font
- ImageReference and Icons and many more
In addition, the Echo2 Extras project adds TabbedPanes, Calendar Selector, Colour Selector, a Pull down menu component etc.
A range of other contributed libraries provides further enhancements such as:
- Echo2Chart: A library for rendering charts using JFreeChart.
- Echo2FileTransfer: A library providing components for uploading and downloading files between client and server.
- EchoPointNG: The next-generation version of the EchoPoint library for the Echo2 framework. This library provides many additional GUI oriented components such as trees, sliders, rich text renders, sortable tables, a calculator etc.
- Echo2Contrib: This library contains components to display arbitrary HTML, a sortable and/or pageable table, components to add support for drag and drop, and many other components.
- EchoStruts: A struts compliant version of echo2, echopointng, echo2extras and echo2chart.
Sponsored: Benefits from the lessons learned in HPC