Everyone wants the Web 2.0. But how to get there, especially if you have a dowdy old Web 1.0 application? Will I have to spend the annual GDP of a smallish Central American nation on the rewrite? There are three general approaches that evolved over the last year:
- The Christmas Tree Approach – decorate your Web 1.0 app with Ajax widgets and simple backend JSON or XML services. Pro: doesn’t require major investment. Con: app still mostly suffers from the Web 1.0 downsides — postbacks, CRUD, etc.
- The Refrosting the Cake Approach – transform all of your views from HTML to JSON or XML. Develop a client side GUI that calls your applications controllers and views. Pro: doesn’t require full rewrite. Con: control flow moves from server side to client side; won’t take full advantage of RIA opportunities, such as direct manipulation or document-centric interfaces; really just a nice face on CRUD.
- The From Scratch Approach – take the opportunity to rethink your application as something other than the web equivalent of a green screen. Imagine Photoshop or Word as a traditional webapp. Pro: unencumbered by the old system. Con: costly; you may lose your way in reinventing your app.
I think approach #2, Refrosting the Cake, is actually quite appealing. You can make using that dowdy old webapp quite a bit more pleasant with a quick coat of Ajax. There was a really interesting article on this written by Brian Walsh back in July of 2006. It sort of got lost as a pure Tibco GI article, but it has much wider applicability. In it, Brian uses XStream to convert the views of a SpringMVC sample application from HTML to XML. He then uses Tibco GI to build a UI that talks to the controllers and views on the back end.
I used a similar approach to convert a dowdy old application — mwhois — to Web 2.0. Instead of Tibco GI, I used GWT. And instead of XML, I used JSON.
The old application looked somewhat homely…

…and suffered from the kludgey flow and heavy postbacks typical of Web 1.0. I proceded to identify the different views and converted them (via mwhois’ templates) into JSON.
simple search: domain=agiledev&ext=com
{ "isAvail" : false, "domain" : "agiledev", "ext" : "com", "whoisServer" : "whois.crsnic.net" }
raw record: domain=french&ext=biz&show_raw=1
{ "domain" : "french", "ext" : "biz", "raw" : "Domain Name: FRENCH.BIZnDomain ID: D2708502-BIZnSponsoring Registrar: COMMUNI GAL COMMUNICATIONS LTD.nSponsoring Registrar IANA ID: 418nDomain Status: clientTransferProhibitednRegistrant ID: GC683CO965021nRegistrant Name: jamil akhtarnRegistrant Address1: Regent HousenRegistrant Address2: 24-25 Nutford PlacenRegistrant City: LondonnRegistrant Postal Code: W1H 5YNnRegistrant Country: Great Britain (UK)nRegistrant Country Code: GBnRegistrant Phone Number: +44.7729391052nRegistrant Facsimile Number: +44.2075693152nRegistrant Email: [email protected] Contact ID: GC683CO965021nAdministrative Contact Name: jamil akhtarnAdministrative Contact Address1: Regent HousenAdministrative Contact Address2: 24-25 Nutford PlacenAdministrative Contact City: LondonnAdministrative Contact Postal Code: W1H 5YNnAdministrative Contact Country: Great Britain (UK)nAdministrative Contact Country Code: GBnAdministrative Contact Phone Number: +44.7729391052nAdministrative Contact Facsimile Number: +44.2075693152nAdministrative Contact Email: [email protected] Contact ID: GC683CO965021nBilling Contact Name: jamil akhtarnBilling Contact Address1: Regent HousenBilling Contact Address2: 24-25 Nutford PlacenBilling Contact City: LondonnBilling Contact Postal Code: W1H 5YNnBilling Contact Country: Great Britain (UK)nBilling Contact Country Code: GBnBilling Contact Phone Number: +44.7729391052nBilling Contact Facsimile Number: +44.2075693152nBilling Contact Email: [email protected] Contact ID: GC683CO965021nTechnical Contact Name: jamil akhtarnTechnical Contact Address1: Regent HousenTechnical Contact Address2: 24-25 Nutford PlacenTechnical Contact City: LondonnTechnical Contact Postal Code: W1H 5YNnTechnical Contact Country: Great Britain (UK)nTechnical Contact Country Code: GBnTechnical Contact Phone Number: +44.7729391052nTechnical Contact Facsimile Number: +44.2075693152nTechnical Contact Email: [email protected] Server: DNS.INTER.NET.ILnName Server: NS.COMMUNIGAL.NETnCreated by Registrar: COMMUNI GAL COMMUNICATIONS LTD.nLast Updated by Registrar: COMMUNI GAL COMMUNICATIONS LTD.nDomain Registration Date: Wed Mar 27 00:01:00 GMT 2002nDomain Expiration Date: Wed Mar 26 23:59:59 GMT 2008nDomain Last Updated Date: Mon Mar 12 16:25:34 GMT 2007nn>>>> Whois database was last updated on: Sun Oct 14 17:51:14 GMT 2007 <<<<nnNeuLevel, Inc., the Registry Operator for .BIZ, has collected this informationnfor the WHOIS database through an ICANN-Accredited Registrar. This informationnis provided to you for informational purposes only and is designed to assistnpersons in determining contents of a domain name registration record in thenNeuLevel registry database. NeuLevel makes this information available to youn"as is" and does not guarantee its accuracy. By submitting a WHOIS query, younagree that you will use this data only for lawful purposes and that, under noncircumstances will you use this data: (1) to allow, enable, or otherwisensupport the transmission of mass unsolicited, commercial advertising ornsolicitations via direct mail, electronic mail, or by telephone; (2) inncontravention of any applicable data and privacy protection acts; or (3) tonenable high volume, automated, electronic processes that apply to the registryn(or its systems). Compilation, repackaging, dissemination, or other use of thenWHOIS database in its entirety, or of a substantial portion thereof, is notnallowed without NeuLevel's prior written permission. NeuLevel reserves thenright to modify or change these conditions at any time without prior ornsubsequent notification of any kind. By executing this query, in any mannernwhatsoever, you agree to abide by these terms.nnNOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVEnOF THE AVAILABILITY OF A DOMAIN NAME.n" }
global search: domain=agilesoftware&do_global=1
{ "domain" : "agilesoftware", "avail" : [{ "domain":"agilesoftware","ext":"biz" },{ "domain":"agilesoftware","ext":"be" }], "unavail" : [{ "domain":"agilesoftware","ext":"com" },{ "domain":"a
gilesoftware","ext":"net" },{ "domain":"agilesoftware","ext":"org" },{ "domain":"agilesoftware","ext":"co.uk" },{ "domain":"agilesoftware","ext":"info" }] }
wizard search: do_wizard=1&company=pathfinder&keyword1=uxd&keyword2=agile&ext=com
{ "whoisServer" : "whois.crsnic.net", "avail" : [{ "domain":"pathfinderuxd","ext":"com" },{ "domain":"pathfinder-uxd","ext":"com" },{ "domain":"uxdpathfinder","ext":"com" },{ "domain":"uxd-pathfinder","ext":"com" },{ "domain":"pathfinder-agile","ext":"com" },{ "domain":"agilepathfinder","ext":"com" },{ "domain":"agile-pathfinder","ext":"com" },{ "domain":"uxdagile","ext":"com" },{ "domain":"agileuxd","ext":"com" },{ "domain":"uxd-agile","ext":"com" },{ "domain":"agile-uxd","ext":"com" }], "unavail" : [{ "domain":"pathfinder","ext":"com" },{ "domain":"pathfinderagile","ext":"com" },{ "domain":"uxd","ext":"com" },{ "domain":"agile","ext":"com" }] }
Then I wrote a simple, tabbed interface using GWT and the MyGWT widgets and slapped the two together.

I’ll have more details on the code details in part 2 of this article. For now, you can look at the old and new interfaces.
Technorati Tags: ajax, gwt, mygwt, tibco gi, JSON, XML, web20

Dietrich
Thanks for the interest in the original article.
Glad it was of use.
Coincidently, your decision was to use GWT. I’m writing this from the GWT VTM conference. Still haven’t made up my mind on it.
While I know and love Java, I still appreciate GI’s server independence….
At the same time, being able to code and debug in Java is great.
-Brian