Welcome!

Java IoT Authors: APM Blog, Stackify Blog, XebiaLabs Blog, Liz McMillan, William Schmarzo

Related Topics: Java IoT

Java IoT: Article

Never Too Rich or Too Thin

Following the middle road

You can never be too rich or too thin. That's what Wally Simpson might have quipped to her stock trading application had she lived to enjoy the blessings of the Internet. Indeed, Wally may have had a point there: today's mainstream approaches to end-user computing are lacking. Fat clients are difficult to distribute and HTML is inadequate for high-end GUIs. A client that is both rich and thin would be the ideal solution.

Rich Thin Clients
Java is a great platform for rich thin clients (RTCs). The availability of JREs on both the client and server is a formidable basis for an RTC library. Given standard Java infrastructure, such a library can offer server-side peer objects for widgets and a presentation engine executing the GUI for any number of applications, as shown in Figure 1.

This library will be lean and mean because it can:

  • Delegate event handling and graphics functions to the JRE on the client
  • Profit from the fact that JRE runs both as a plugin within a browser and on the desktop
  • Make use of Java Web Start for distribution
  • Leverage J2EE for communication and server-side modeling of the user interface
An RTC library is not a panacea. Yet it may go a long way toward rich GUIs without getting chubby or sacrificing the core advantages of HTML. As we'll see later, a number of products testify to this point today.

Let me discuss some key characteristics of a well-designed RTC library and how it can profit from Java.

Never Too Rich
From the perspective of usability, an RTC presentation engine should support as many rich client functions as possible. The functionality must be significantly better than HTML's, offering:

  • A more responsive interface that minimizes server round-trips
  • Direct manipulation
  • Comfortable widgets like tables with self-sorting columns, trees, and high-end editors
  • Superior integration of desktop functions
Never Too Thin
From the point of view of distribution and operation, an RTC presentation engine should be as lean as possible, that is:
  • Free of application-dependent code so that the rollout of applications is server-side only
  • Sufficiently small to enable distribution as an applet
  • Use existing J2SE and/or J2ME infrastructure wherever possible
Evidently there is a trade off between the wish lists for thin and rich. This suggests a further requirement: an RTC engine must be as lean as possible in its basic form, but extensible. It should come as a slim core library with pluggable extensions and an API allowing the integration of existing rich client libraries.

Optimized Communication
An important bonus of Java-based RTCs is that their network bandwidth requirements can be minimized. Typically communication will be several times more efficient than for HTML for the following reasons.

First, server round-trips can be slashed by executing tasks within the presentation engine, for example:

  • The enabling and disabling of widgets that depend on each other
  • Syntactic validations and formatting of text fields
  • Sorting of lists or columns
  • Caching
A second means to minimize communication is to model the status of user interfaces on the server. This enables the session to keep track of what is visible on the client and thus limit data transfer to visible items.

Server-Side Programming Model
Designing a client/server application is substantially simplified when a server-side programming model is employed. This avoids the difficult issue of splitting functionality between client and server.

A well-designed RTC library en-forces a server-side model. Notice that this will exclude an approach in which developers specify code that is transferred to the client and executed there. This latter approach leads to fat client programming, which is undesirable.

Seamless Object-Oriented API
A further feature for an RTC library is a seamless object-oriented design and API. Ideally, an RTC library offers a server-side API that corresponds to the API of a well-known library like Swing, AWT, or SWT.

The benefit of such a design is that a cumbersome mix of technologies can be avoided: instead of cobbling the GUI together with Java, JSP, HTML, or proprietary XML languages, the developer can use a seamless Java API.

Server-Side Execution
As mentioned, downloading user-defined code to the client for execution is undesirable. An RTC system must execute everything on the server, except for the GUI.

In fact, even the model of the GUI must reside on the server in order to optimize communication (see above).

Notice that server-side execution is also an advantage for security as it can be handled much easier on the server.

Pluggable Communication
The communication protocol is one of the major issues for client/server applications. Depending on the environment in which an application must run, different protocols must be used.

For this reason, an RTC library should isolate client/server communication in pluggable modules, such that an application can be configured to run over HTTP, HTTPS, RMI/IIOP, or other protocols.

Standalone/Offline Execution
With a Java VM on both the client and server, an RTC library can enable flexible on/offline execution with a single code base.

If pluggable communication is in place, all that's needed is a module that simulates client/server interaction. Such a module will allow you to run a client and server in a single VM and thus on a standalone machine.

Applied cleverly, standalone execution will serve three purposes. It will:

  1. Simplify development because the edit/compile/test cycle can be executed locally and within the IDE
  2. Support incremental growth - applications starting as a single user can be converted to multiuser with minimal effort
  3. Enable development of applications that can run both online and offline
Leveraging Standards
J2EE, J2SE, and J2ME provide a superb standardized platform for RTC systems. All basic functions required for the GUI, communication, server sessions, and security are readily available. As a consequence, a well-designed RTC library is just a thin software layer that essentially provides a server-side API for the standard widgets of Swing or AWT, delegating everything except the core RTC functions to the standard libraries. An API for SWT is, of course, also an option for cases in which the client-side presentation engine relies on SWT. Figure 2 shows how an RTC library can be embedded into a standard infrastructure.

Leveraging Existing Infrastructure
Focusing on core RTC functions is a key requirement, not only with respect to standards. An RTC library should be designed to integrate with the existing infrastructure. It should, for example, fit into an existing platform for HTML applications, enabling a mix and match of HTML clients and rich clients, as well as multichannel applications that share everything up to the presentation layer.

An RTC library is, therefore, typically an extension of an existing software platform and not a platform of its own.

Products on the Market
A number of products illustrate how it can be done: AltioLive, AppProjector, Canoo ULC, Classic Blend, Droplets, RSWT, and Thinlets.

All of these are Java-based RTC libraries. They have put a different emphasis on the defined requirements, and some of them are not pure Java but are hybrid, employing proprietary XML languages. Their common denominator is that they all prove the viability and usefulness of Java for RTCs. Products that forego the advantages of JRE on the client are available as well: examples are Classic Blend and Macromedia Flex. They use Java-Script and a proprietary execution environment on the client, respectively.

Conclusion
Today's mainstream approaches of the HTML thin client and the fat client productivity application are antipodes. The one's strength is the other's weakness.

The rich thin client (RTC) is the middle road that often succeeds in offering the benefits and avoiding the weaknesses of both. Such magic is not possible for all scenarios, but for many client/server applications.

Various Java-based RTC technologies exist today. Java is particularly suitable for RTC libraries because of its cross-platform availability and broad standard infrastructure. Most important, Java enables a seamlessly object-oriented, server-side programming model that avoids the cumbersome mix of technologies with proprietary XML languages, JSP, HTML, and others.

Now that the rich client is becoming popular again, we may expect that many of those who have experienced the benefits of HTML will not be happy to cope with fat clients again, or with the prospect of building a new infrastructure for client/server computing from scratch. Some of them may go with Ms. Simpson's advice and choose Java RTCs.

References

  • AltioLive: www.altio.com
  • AppProjector: www.asperon.com
  • Canoo ULC: www.canoo.com/ulc
  • Classic Blend: www.appliedreasoning.com/products_what_is_Classic_Blend.htm
  • Droplets: www.droplets.com
  • RSWT:
  • Thinlets: www.thinlet.com
  • Classic Blend: www.appliedreasoning.com/products_what_is_Classic_Blend.htm
  • Macromedia Flex: www.macromedia.com/software/flex
  • More Stories By Bernhard Wagner

    Bernhard Wagner is an independent software consultant and longtime developer of rich-client software. He developed a visual programming environment allowing the visual composition of MultiMedia components, 3D direct manipulation applications, and numerous HTML applications.

    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.


    @ThingsExpo Stories
    DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
    "Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
    The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
    "Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
    "Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
    In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
    22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
    "Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
    Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
    "MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    "There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
    SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.