FullStack Labs

Please Upgrade Your Browser.

Unfortunately, Internet Explorer is an outdated browser and we do not currently support it. To have the best browsing experience, please upgrade to Microsoft Edge, Google Chrome or Safari.
Upgrade
Welcome to FullStack Labs. We use cookies to enable better features on our website. Cookies help us tailor content to your interests and locations and provide many other benefits of the site. For more information, please see our Cookies Policy and Privacy Policy.

Write Once, Run Everywhere: Journey to JavaScript

Written by 
,
Write Once, Run Everywhere: Journey to JavaScript
blog post background
Recent Posts
Getting Started with Single Sign-On
Choosing the Right State Management Tool for Your React Apps
Accessibility in Focus: The Intersection of Screen Readers, Keyboards, and QA Testing

Cross-platform technologies allow developers to write an app once and run it on many different platforms, saving significant time, money, and effort. Developing cross-platform also makes an app easier to maintain, test, and debug. Despite these benefits, many businesses have chosen not to adopt cross-platform technologies and instead limit the number of supported platforms, or hire separate teams to build their iOS, Android, Windows, Mac, Linux, and web applications. This, in my opinion, is because of the perceived downsides of previous technologies like Java Swing and Adobe Air.

Table of contents

However, the development landscape has changed significantly in the last few years with new technologies, driven by JavaScript, offering solutions to the problems that plagued cross-platform technologies in the past. In this article we will look at a few of the key problems that prevented widespread adoption of Java Swing and Adobe Air, and examine JavaScript as the ideal next-generation solution.

Java Swing

The first well-known cross platform technology was Swing, introduced by the team behind Java in the 1990s. Swing gave engineers a common framework to develop a single UI application that could run on Windows, Mac, Linux, and the web while maintaining visual consistency. However, developing with Swing came with some challenges.

Swing applications required a specific Java version to run. If an end user did not have the correct version installed, the app would not run. Versions were easier for developers to control, but the average user often ran into issues both identifying and downloading the correct version. If a user had multiple Swing applications, each may require a different Java version, which further complicated the process of accessing them. Additionally, Swing’s UI component library was limited. It didn’t allow for many platform-specific customizations, either.

Adobe Air

In the late 2000s, Adobe created a programming language called ActionScript for Flash, then leveraged Flash’s popularity for web animation into a cross-platform framework, Adobe Air. With Adobe Air, developers who were already accustomed to building websites in Flash could translate these skills to build new, non-web platforms. Like Swing, however, Adobe Air was not without its faults.

The entire Adobe Air platform was closed source, which doomed it from the start. This made it difficult for Adobe to remain competitive with faster-moving, open-source technologies, like CSS animations. Additionally, inherent security flaws in Flash eventually led Adobe to abandon Flash in favor of HTML5. Currently, Adobe is transitioning ownership of Adobe Air to HARMAN, which, in my opinion, further calls into question the future of the technology.

Modern Cross-Platform with JavaScript

JavaScript is currently one of the most popular cross-platform development languages because it solves many of the problems inherent in previous technologies. Not only can it be used to build web, mobile, and desktop apps, it can also be used to create command line interfaces and backend APIs. Unlike Swing, JavaScript allows developers to more closely mimic a native experience through platform-by-platform customizations instead of attempting to unify the UI across platforms. And unlike Adobe Air, JavaScript and the associated tools are open source, which is one of the reasons the list of tools and libraries that can be used across platforms is large and growing.

The following are a few of these tools and libraries that are most popular:

Desktop

  • Electron
  • React Native
  • NW.js

Mobile

  • React Native
  • Apache Cordova

Web

  • React
  • Vue

Servers and CLI

  • Node.js

Each tool or library can have its own requirements, patterns, and structure, so the process of piecing together a single project can be complex. This is one of the drawbacks to developing cross-platform with JavaScript.

---

To learn more about leveraging some of the tools and libraries listed above, check out the other articles posted on Fullstack’s blog.

Written by
People having a meeting on a glass room.
Join Our Team
We are looking for developers committed to writing the best code and deploying flawless apps in a small team setting.
view careers
Desktop screens shown as slices from a top angle.
Case Studies
It's not only about results, it's also about how we helped our clients get there and achieve their goals.
view case studies
Phone with an app screen on it.
Our Playbook
Our step-by-step process for designing, developing, and maintaining exceptional custom software solutions.
VIEW OUR playbook
FullStack Labs Icon

Let's Talk!

We’d love to learn more about your project.
Engagements start at $75,000.