Feeds

Echo2 versus GWT

Another toolkit that hides AJAX's implementation details

Choosing a cloud hosting partner with confidence

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.

Figure 1: Shows the screen alternating between “Hello World” and “Hello Echo World” messages.

In Figure 1, this very simple screen alternates between a "Hello World" message and a "Hello Echo World" message each time the "Next" button is clicked, showing that the Java based classes presented above have been dynamically translated into JavaScript, HTML etc., as and when required.

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
  • TextField/SelectField/PasswordField/TextArea
  • ButtonGroup
  • Color / Font
  • Grid</li
  • 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.

Intelligent flash storage arrays

Next page: Comparison with GWT

More from The Register

next story
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Redmond top man Satya Nadella: 'Microsoft LOVES Linux'
Open-source 'love' fairly runneth over at cloud event
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
Chrome 38's new HTML tag support makes fatties FIT and SKINNIER
First browser to protect networks' bandwith using official spec
Admins! Never mind POODLE, there're NEW OpenSSL bugs to splat
Four new patches for open-source crypto libraries
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
Three 1TB solid state scorchers up for grabs
Big SSDs can be expensive but think big and think free because you could be the lucky winner of one of three 1TB Samsung SSD 840 EVO drives that we’re giving away worth over £300 apiece.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.