YOUR FEEDBACK
Three RIA Platforms Compared: Adobe Flex, Google Web Toolkit, and OpenLaszlo
NN wrote: Yeah you are right GWT is poor man's Flex. After using GWT on two...


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP THREE LINKS YOU MUST CLICK ON


Behind the Glass

Digg This!

Recently I was giving a demo of Java Web Start (JWS) to a customer and while they appreciated that systems management issues had been addressed, someone in the audience said "it's just client/client all over again - not really client/server." Her point was that true client/server is about the runtime separation of the two environments, not just deployment magic. It was my fault because I had used a "Hello World" program to demonstrate JWS, first running it locally and then deploying it across JWS in a "look no hands, ma" kind of fashion. My demo slide even included the bullet point that no changes were required in the Swing program to allow it to run across JWS. She told me, in nice words, that I didn't get it because changes should be required. The runtime dynamics of how the program should validate input and access data are different when run locally or across a client/server divide.

What she was looking for was a mechanism for building a Swing program that had several pieces to it: a client that concerned itself with presentation, local validation, and a richer UI experience than HTML currently offered; a server that dealt with issues such as persistence, concurrency, and load balancing; a bit in the middle that was the runtime transport layer; and a distribution mechanism for which JWS appeared to be satisfactory.

It was a sobering discussion for me, because it made me realize one difference between server people and client people. In the client space we're often obsessed with the GUI toolkit and widget APIs. The server heads, however, seem more focused on the application itself - the transactional nature of the program, the workflow of tasks and data, and issues with multiuser persistence and scalability. Architectures such as Struts, EJB, or JavaServer Faces tackle these issues by providing frameworks that power the application, whereas analogous client initiatives seem lacking. GUI builders still provide palettes of basic JFC components, but when it comes to the question of building a scalable real-world application, the user is often left to reinvent the wheel rather than have these frameworks provided out of the box with J2SE.

Several good ideas came out of the ensuing conversation with the customer regarding things they wanted to see formalized.

Separate UI and Back-End Logic
It makes sense from an object-oriented viewpoint to separate the UI from the back-end logic, but why not have this architected into the framework. The GUI could be separately serialized into some kind of XML format to allow easy transmission across HTTP, and arguably easier construction for people who preferred markup languages to writing Java Swing code. Other issues such as providing different GUIs for levels of accessibility, countries, or hardware devices could be achieved by providing new XML files that were dispatched according to each client type.

Use Web Services Between the Client and Server
Communication between the two sides could be done using Web services, so the server components are managed as a pool of shared resources in a J2EE server that each client communicates to. Having a defined protocol between the two portions of the application insulates each side, so new implementations of existing services can be swapped in without disrupting the client, and likewise new clients can be created combining multiple services for a single functional task. Unlike JDBC, where the program's SQL exposes the structure of the server and is thereby vulnerable to structural changes, Web services tend to be more task-oriented, like a more traditional transaction API providing both physical and logical separation.

For the GUI portion the beginnings of this might already be there with technologies such as SwixML (www.swixml.org), SwingML (http://swingml.sourceforge.net/), or the XMLEncoder/XMLDecoder that was included with 1.4. There is more work to be done, however, such as integration into GUI builders, which almost exclusively serialize to Java code right now. It's not enough to store a GUI in XML; there is still logic that is going to occur on the client that needs to be written, so there should be a way that the GUI can be deserialized into the Java client piece and elements of it can be easily accessed - sort of like a JAXB for named Swing components or maybe some kind of XPath solution. While proxy classes can be created for communicating with the Web service, there are quite a lot of code steps to go from WSDL to a usable Java API for the GUI. Some of this could be abstracted out into reusable components that provided dynamic bindings and configurable behavior. Right now the JFC includes graphical component classes, but why not extend it to have more JavaBeans that are less concerned with presentation, but instead know how to broker a conversation between the UI and the data and/or transport layer. One of the projects that I hope might be able to provide these kind of pluggable components is Java Desktop Network Components (JDNC) that offer the promise of an easily customizable API for people to create the middleware components currently missing in Swing. Whatever the answer, I think that J2SE should move its focus away from the glass and down into the application framework space. The solution should not be demoware, however, and should become the foundation framework for users wanting to build large, scalable client/server applications. So instead of building wheels, developers can focus more on their domain-specific logic and less on plumbing and glueware.

About Joe Winchester
Joe Winchester, JDJ's Desktop Technologies Editor, is a software developer working on development tools for IBM in Hursley, UK.

LATEST JAVA STORIES & POSTS
Virtualization Journal Attracts JavaOne Attendees to SYS-CON Media Booth
Virtualization Journal now reaches more than 60,000 online readers with monthly digital editions and weekly newsletters. The premier issue of the magazine's print edition, which debuts on May 6, 2008, at JavaOne in San Francisco, as a media sponsor of this event, will be availabl
Real-Time Kaazing Solution and Sun's Glassfish Forge RIA Alliance
Kaazing Corporation and Sun Microsystems announced an alliance to deliver the scalable and advanced real-time Web 2.0 platform. The integration between Kaazing's real-time Rich Internet Application (RIA) solution, Enterprise Comet, and Sun Microsystems' open source Java EE applic
Sun Challenges Linux
Sun's mule train has finally pulled into Indiana after three years on the road. Indiana is the Linux-friendly Fedora-like OpenSolaris project meant to move the Solaris-shy Linux community off Linux and on to Solaris tempted by Solaris widgetry like the highly scalable, rollback-e
AJAX World - Sun Talks Up its Late-to-the-Party AIR-Silverlight Rival
At Java One this week Sun has been selling its year -old-but-still-upcoming - and definitely late-to-the-party - Adobe AIR- and Microsoft Silverlight-competitive JavaFX Rich Client environment as a potential revenue-generator capable of putting ads on mobile applications and JavaF
MySQL Backs Off Closed Source Plan
MySQL has backed off a plan to charge for some encryption and compression backup widgetry in the next version of the database - and, heavens, NOT OPEN SOURCE THE STUFF, an idea it trotted a few weeks ago and predictably caught hell for. Sun, which bought MySQL for a billion dolla
JavaOne Archives - Dvorak Comments on AMD Intel Lawsuit on SYS-CON.TV
Conference in San Francisco. Dvorak held forth on a number of topics, including the new AMD/Intel lawsuit, the viability of Java and Sun, the value of (or lack thereof) of corporate PR, and whether or not a new book about Silicon Valley is really worth reading.
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING JAVA NEWS
Day Software to Present at Henry Stewart DAM Show
Day Software (SWX:DAYN) (OTCQX:DYIHY), a leading provider of global content management