Welcome!

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

Related Topics: Java IoT

Java IoT: Article

Swing Low, Swing High, Sweet Desktop

Swing Low, Swing High, Sweet Desktop

Sun has made two significant announcements recently in the Java desktop space: Java Desktop Integration Components (JDIC) (jdic.dev.java.net) and Java Desktop Network Components (JDNC) (jdnc.dev.java.net), both of which are open sourced under an LGPL.

JDIC
JDIC is essentially about allowing Swing access to more native platform resources, such as embedding the operating system's Web browser in a GUI, or enabling more control over taskbar support. I think the goal of elevating the function point of the end-user's experience, so that a Java application looks and behaves no differently for other desktop programs, is wonderful. I won't belabor the obvious point, but for me JDIC is a missed opportunity for bringing Swing and SWT toolkits closer together, as the latter already provides native embedded browser and taskbar support. Both toolkits have farther to travel along this road, as users demand more and more platform fidelity from their programs. All I sincerely hope, for Java's sake, is that the decision to forgo the chance to use the CPL open sourced SWT as the basis for JDIC was made for sound business reasons, not bruised egos.

JDNC
Java Desktop Network Components is a project that has always promised to be successful because its roots lie in trying to simplify the programming model of writing GUIs that connect to back-end databases or services. By implementing JDNC, developers have helpfully adopted a layered approach.

Swing Extensions
The extensions include new UI classes such as JXTable, JXTree, JXEditor, or JTreeTable. These extend the basic Swing toolkit to provide a set of controls that are designed out of the box to work with data. The JForm class, for example, is a nicely thought-out control that helps you easily create a data-bound set of components. What's nice about the Swing extensions is that they can be used without the rest of JDNC and, with the sorting and filtering enhancements, represent a nice turn of the crank for Swing that any GUI developer will hopefully benefit from. Another welcome feature is an overhaul of the way actions work, allowing more flexibility. I believe there might be plans to roll the Swing extension packages into a future release of J2SE. Such a move would be great for the general Swing developer and would provide a welcome set of base enhancements.

JDNC Components
These mirror the Swing extensions with the prefix JN, so for JXTable there is JNTable, JEditor has JNTable, and so on. These are standard JavaBeans so they should be easy to integrate into GUI builders and intuitive to Java programmers; however, rather than subclass their visual peers, they wrap them instead. I think this is a great decision, and is rooted in the desire to simplify the programming model that currently includes a lot of low-level properties for Swing controls. By using delegation, the API that's surfaced for the developer is one designed around the data binding and access capabilities of the control. There are some nice new listener interfaces as well, such as org.jdesktop.swing.event.ProgressSource that allows a DataSource to signal the progress and completion of a long-running task. The whole experience using the JNComponents shows that they have been well thought-out and well implemented.

JDNC Markup Language
The purpose of this layer is to allow the nonprogrammer to easily customize JDNC components using XML. One of the main benefits I can envisage with the XML configuration of components is not that the unskilled developer will use this in preference to cutting Java source code. Presumably, said person is going to be using a GUI builder-like tool that should be able to hide XML or Java implementations equally well. XML, however, offers the advantage of being easy to create and manipulate at runtime, so GUI behavior can be manipulated dynamically (perhaps the XML prepared by a servlet as the result of a user query) and less hard coding need occur in the actual client layer. One of the goals of any large business GUI application must be to capture as much as possible in rules and rely less on hard-coded, bespoke client screen logic. Having XML prepared by a rule engine that consumes a model definition of the application and serves this up to JDNC to implement the wiring logic might well be the answer. This could become a very powerful usage scenario.

Open Source
JDNC has been released as an open source project, which is interesting because it's outside the usual JSR/JCP process. I'm very encouraged by this, as I hope it will benefit from the rapid progress that other open source projects have enjoyed, and because the end users of JDNC are programmers trying to build business applications using Swing. It's an invitation for everyone who has done this for the last few years to bring the benefit of their knowledge, gripes, suggestions, and, ultimately, code to the table. If you've had to build your own data access framework on top of Swing, or wished one was there, I strongly encourage you to visit the JDNC homepage to become involved in the project and give the developers the benefit of your experience and ideas. I believe JDNC is one of the most exciting things to come along in the GUI space in any language for many years, and I think it has the potential to take Java client programming to a whole new level.

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.


@ThingsExpo Stories
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 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...
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...
What is the best strategy for selecting the right offshore company for your business? In his session at 21st Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, will discuss the things to look for - positive and negative - in evaluating your options. He will also discuss how to maximize productivity with your offshore developers. Before you start your search, clearly understand your business needs and how that impacts software choices.
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...
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, will discuss how data centers of the future will be managed, how th...
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...
SYS-CON Events announced today that MIRAI 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. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
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 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 Enroute Lab 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. Enroute Lab is an industrial design, research and development company of unmanned robotic vehicle system. For more information, please visit http://elab.co.jp/.
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:...
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...
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 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 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...
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 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/.
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
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...