Feeds

Echo2 versus GWT

Another toolkit that hides AJAX's implementation details

The Power of One Brief: Top reasons to choose HP BladeSystem

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.

Seven Steps to Software Security

Next page: Comparison with GWT

More from The Register

next story
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Securing Web Applications Made Simple and Scalable
Learn how automated security testing can provide a simple and scalable way to protect your web applications.