13.07.2015 Views

JDJ 10-1.indd - sys-con.com's archive of magazines - SYS-CON Media

JDJ 10-1.indd - sys-con.com's archive of magazines - SYS-CON Media

JDJ 10-1.indd - sys-con.com's archive of magazines - SYS-CON Media

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Desktop Java ViewpointJoe WinchesterDesktop Java EditorThe Return <strong>of</strong> the PigJoe Winchester is as<strong>of</strong>tware developerworking on WebSpheredevelopment tools forIBM in Hursley, UK.joewinchester@<strong>sys</strong>-<strong>con</strong>.comThe key to building a distributedapplication successfully lies in asensible partition <strong>of</strong> work acrossthe different boundaries anddevices. With a client/server program,one <strong>of</strong> the advantages it <strong>of</strong>fers over amore traditional thin client is that foreach task, instead <strong>of</strong> having to wait forthe server to page the application backinto memory, process the results <strong>of</strong> thedisplay buffer, and prepare output, thePC is able to <strong>of</strong>fload some <strong>of</strong> the validationand processing locally.Not only is this more responsive tothe user, but it makes sense to have aphysical division <strong>of</strong> responsibilities inwhich code logic is executed closest towhere relevant resources lie. Field-levelvalidation, defaulting, and completion<strong>of</strong> values can all be done on the client.Even where such processing requirestrips to the server, an atomic call to theserver on a text field’s focus-changeevent can easily validate an entry againsta database. By scheduling the displaythread this way the GUI can remainresponsive. Another benefit <strong>of</strong> using theclient’s windowing sub<strong>sys</strong>tem fully is theability to open multiple shells or dialogssimultaneously and have the user move,size, and arrange them to make the bestuse <strong>of</strong> the available space.In a presentation to users or a salespitch to potential customers, the eyecandy<strong>of</strong> a windows program will alwayswin over a terminal-based application.In chapter one <strong>of</strong> the client/serverwars, those with a lot <strong>of</strong> investmentin back-end technology required aquick fix to counter the glitterati <strong>of</strong> theGUI, and one technique that arose is“screen scraping.” This is where thedata stream intended for the server’sterminal is interpreted and re-presentedon the desktop using a best guess set<strong>of</strong> <strong>con</strong>trols and widgets. From the back<strong>of</strong> a dimmed room in a demo or onthe noisy floor <strong>of</strong> a s<strong>of</strong>tware booth at a<strong>con</strong>ference, it looks pretty impressive.It’s no more than a fool’s shiny silverbullet, however, as all that it gains is theglitter <strong>of</strong> the GUI without any accompanyingdepth. The transactional mode<strong>of</strong> the application remains with logicbeing done on the server; simultaneousmultiple windows don’t occur as theworkflow is restricted to merely coloringin the terminal’s display, and an extralayer <strong>of</strong> processing has been added tothe previously working program for verylittle perceived benefit.One metaphor <strong>of</strong>ten used to describescreen scraping is “lipstick on a pig,”perhaps loaded slightly unfairly with theimplication being that the original applicationshares its characteristics with asnorting, mud-loving suidae beast. Whatis correct with the analogy is that skindeepcosmetics don’t change the truemakeup <strong>of</strong> the underlying subject.Screen scraping fortunately hasn’ttaken root in serious application development,instead the Web browser hasbecome the modern terminal; HTML,the display format; and users have beendelivered the graphical interface theyyearned for. While true client/serverdevelopers were wrestling, solving issuessuch as <strong>sys</strong>tems management anddistribution in a heterogeneous world,the Web filled in the s<strong>of</strong>tware spacecreated by the growth in the PC marketand the availability <strong>of</strong> faster and cheapernetworks.Web applications still suffer fromsome <strong>of</strong> the problems that any pagebasedserver GUI has, including thetransactional nature <strong>of</strong> the screens,round-tripping for validation not deliveringa highly responsible application,and the difficulty <strong>of</strong> working with multiplewindows simultaneously. Most <strong>of</strong>the problems that plagued client/serverdevelopment have been solved and severalcustomers I talked to are reassessingthe desktop because their applicationshave reached the physical boundaries<strong>of</strong> what a traditional J2EE program candeliver. There are more tools availablenow such as Java Web Start, better Swinglibraries, and the Eclipse Rich ClientPlatform.History has a habit <strong>of</strong> repeating itself,and in the past few months I’ve beenalarmed to see demos <strong>of</strong> and read aboutseveral new ways to create a “rich desktopapplication” from within J2EE. All <strong>of</strong> theseeloquently outline the current problemsand limitations <strong>of</strong> the Web programmingmodel from a user standpoint and preachthe advantages <strong>of</strong> maximizing the power<strong>of</strong> the desktop. What is disturbing is thata lot <strong>of</strong> these then present a solutionthat is no more than 21st century screenscraping. Some <strong>of</strong> these <strong>of</strong>fer solutions inwhich the same presentation markup canbe rendered in a browser as a portlet orelse in a desktop engine as the same GUI,but with native <strong>con</strong>trols.The debated advantages to this arethat the investment in existing technologyis preserved, and the same programcan be deployed into a browser or tothe user’s desktop with the flick <strong>of</strong> aswitch. My fear regarding these kinds<strong>of</strong> programs is that on the desktopthey won’t look and feel and behaveas a true client program should, andbecause they falsely use adjectives suchas “rich” or “desktop” to describe them,they’ll somehow dilute these terms andmake it hard for users to distinguish adressed-up Web application from a trueclient one.One <strong>of</strong> the advantages <strong>of</strong> having thebrowser shell is that every thing thatlies within it is expected to operate ina certain way, and requests to the userto “press retry to refresh the page” ornotifications that a “session time-outoccurred” have become acceptable. Disguisingthe browser with native <strong>con</strong>trolsbut not <strong>of</strong>fering any <strong>of</strong> the advantages <strong>of</strong>a properly <strong>con</strong>structed client program <strong>of</strong>fersa thin veneer that is no different fromthe screen scraping techniques <strong>of</strong> yore.When the same server program cankick out a browser and rich GUI, is thisan elegant solution that is going to meetthe user’s requirements, or is it justsomething that is technically elegantand demos well, but behind the robes isno more than lipstick on a browser?42 January 2005www.<strong>SYS</strong>-<strong>CON</strong>.com/<strong>JDJ</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!