Feeds

Echo2 versus GWT

Another toolkit that hides AJAX's implementation details

Security and trust: The backbone of doing business over the internet

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.

Security and trust: The backbone of doing business over the internet

Next page: Comparison with GWT

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.
Protecting users from Firesheep and other Sidejacking attacks with SSL
Discussing the vulnerabilities inherent in Wi-Fi networks, and how using TLS/SSL for your entire site will assure security.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.