Welcome!

Java IoT Authors: Yeshim Deniz, Pat Romanski, Liz McMillan, Zakia Bouachraoui, Carmen Gonzalez

Related Topics: Java IoT

Java IoT: Article

Behind the Glass

Behind the Glass

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.

More Stories By Joe Winchester

Joe Winchester, Editor-in-Chief of Java Developer's Journal, was formerly JDJ's longtime Desktop Technologies Editor and is a software developer working on development tools for IBM in Hursley, UK.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitoring and Cost Management … But How? Overwhelmingly, even as enterprises have adopted cloud computing and are expanding to multi-cloud computing, IT leaders remain concerned about how to monitor, manage and control costs across hybrid and multi-cloud deployments. It’s clear that traditional IT monitoring and management approaches, designed after all for on-premises data centers, are falling short in ...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...