Welcome!

Java IoT Authors: Elizabeth White, Pat Romanski, Liz McMillan, Stackify Blog, Progress Blog

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
    SYS-CON Events announced today that SIGMA Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. uLaser flow inspection device from the Japanese top share to Global Standard! Then, make the best use of data to flip to next page. For more information, visit http://www.sigma-k.co.jp/en/.
    SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
    SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp em...
    Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...
    There is huge complexity in implementing a successful digital business that requires efficient on-premise and cloud back-end infrastructure, IT and Internet of Things (IoT) data, analytics, Machine Learning, Artificial Intelligence (AI) and Digital Applications. In the data center alone, there are physical and virtual infrastructures, multiple operating systems, multiple applications and new and emerging business and technological paradigms such as cloud computing and XaaS. And then there are pe...
    DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
    SYS-CON Events announced today that B2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. B2Cloud specializes in IoT devices for preventive and predictive maintenance in any kind of equipment retrieving data like Energy consumption, working time, temperature, humidity, pressure, etc.
    SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
    SYS-CON Events announced today that Suzuki Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Suzuki Inc. is a semiconductor-related business, including sales of consuming parts, parts repair, and maintenance for semiconductor manufacturing machines, etc. It is also a health care business providing experimental research for...
    SYS-CON Events announced today that Fusic will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Fusic Co. provides mocks as virtual IoT devices. You can customize mocks, and get any amount of data at any time in your test. For more information, visit https://fusic.co.jp/english/.
    SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
    SYS-CON Events announced today that Keisoku Research Consultant Co. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Keisoku Research Consultant, Co. offers research and consulting in a wide range of civil engineering-related fields from information construction to preservation of cultural properties. For more information, vi...
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Daiya Industry specializes in orthotic support systems and assistive devices with pneumatic artificial muscles in order to contribute to an extended healthy life expectancy. For more information, please visit https://www.daiyak...
    SYS-CON Events announced today that Interface Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Interface Corporation is a company developing, manufacturing and marketing high quality and wide variety of industrial computers and interface modules such as PCIs and PCI express. For more information, visit http://www.i...
    SYS-CON Events announced today that Mobile Create USA will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Mobile Create USA Inc. is an MVNO-based business model that uses portable communication devices and cellular-based infrastructure in the development, sales, operation and mobile communications systems incorporating GPS capabi...
    In his session at @ThingsExpo, Greg Gorman is the Director, IoT Developer Ecosystem, Watson IoT, will provide a short tutorial on Node-RED, a Node.js-based programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using a wide range of nodes in the palette that can be deployed to its runtime in a single-click. There is a large library of contributed nodes that help so...
    Elon Musk is among the notable industry figures who worries about the power of AI to destroy rather than help society. Mark Zuckerberg, on the other hand, embraces all that is going on. AI is most powerful when deployed across the vast networks being built for Internets of Things in the manufacturing, transportation and logistics, retail, healthcare, government and other sectors. Is AI transforming IoT for the good or the bad? Do we need to worry about its potential destructive power? Or will we...
    SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
    SYS-CON Events announced today that Nihon Micron will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nihon Micron Co., Ltd. strives for technological innovation to establish high-density, high-precision processing technology for providing printed circuit board and metal mount RFID tags used for communication devices. For more inf...
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.