I’ve always thought that one of the big advantages of a component GUI
framework was that you are able to leverage all of those prewritten
components to produce something rather spiffy with very little original
code.
I gave a presentation on AJAX and Component GUI’s this
past Wednesday in Chicago and highlighted Echo2 as a framework worth
investigating. To demonstrate it’s power, I showed off an application
that clocked in at 298 lines of code. That’s including the code to pull
the stock quotes from a web service via the Mule ESB (a very nice choice, IMHO if you need to do async background processing).
The app can be found here. It’s on a somewhat underpowered server, so don’t mention it on slashdot. ![]()
The app allows you to drag stock symbols from a left column into a
right, where they turn into market data grids. You can drag these grids
back again. The quotes are updated every 15 seconds or so. It’s of
course much more interesting when the markets are open.
I’ve
intentionally left it a limited demo, i.e. you can’t add in other stock
symbols, since I don’t want people to be tempted to use this as a real
stock ticker and burry me with traffic. I do plan to include this app
as an example in my tutorial series.
I made use of Echo2,
Echo2_Contrib and EPNG for the app. It caused quite a stir, since folks
in the audience (designers and developers for the most part) had a good
sense of what it might take to bang something like it out in DWR or
some other framework.
So, the challenge: what can you do in 300
lines of code? Be honest, count Javascript, XHTML, Java, etc. Then let the best demo win.
Update 1: To determine "lines of code," I’m counting semicolons in Java and Javascript, CSS entries, and XHTML entities. Since I’m only writing Java, all the others sum to 0.


Interesting… I’ll have to duplicate the same in ThinWire because 300 lines sounds a little heavy to me. http://www.thinwire.com
I’ve been using Echo2 for about 2 years now and find it very powerful and extremely fast to write applications and with a transparent persistent framework like JPOX automatically persisting my underlying domain model it makes me wonder why anyone would ever bother about using Ruby on Rails or any of the other ‘flavor of the months’.
However I am intrigued by ThinWire because I’d never heard of it before yet it seems to have the same goals as Echo2. Has anyone ever done a comparison of the two?