Clicky

April 23, 2018

Always Bet on Web

JavaScript creator, Brendan Eich, coined the iconic phrase “Always bet on JavaScript” in 2011. Back then, Eich was arguing against proprietary Rich Internet Application tech like Silverlight. That advice has endured the test of time – web principals, and JavaScript with it, have prevailed. But these days, you can write apps with JavaScript that break fundamental web principles, undermining much of what makes JavaScript such a powerful language. Today, with JavaScript everywhere from server, to browsers, to native applications, the right response is to “always bet on web”.

Hybrid technologies like Electron, which “package” JavaScript, were previously needed to enable native desktop experience, but this is now being replaced by Progressive Web Apps (PWA). As Google engineer Alex Russell (who with Frances Berriman coined the term “PWA”) put it in this terrific post, “[previous hybrid technologies] aren’t bad — many are technically brilliant — but they aren’t of the web.” Being “of the web” is crucial for delivery, scale, time-to-market, product iteration, testing, production support and so much more.

At OpenFin, we’re very excited about PWA and we’ve been watching its development from just about the beginning. With PWA about to land on the desktop we are ready for them!

OpenFin and Web

As many of you know, OpenFin uses Electron as a component of our operating system, but one of the many differences is that OpenFin fundamentally is “of the web”. OpenFin apps are first and foremost Web apps. OpenFin architecture and development patterns don’t lead engineers down some side alley away from standards. When new capabilities arise in the browser world, OpenFin developers can leverage them directly. This couldn’t be more true than in the case of PWA. The core desktop standards for PWA are core patterns for OpenFin already:

App Manifest Like PWAs, OpenFin apps use a manifest to launch, store default configuration, and set desktop shortcuts. The OpenFin manifest also supports a range of functionality that goes beyond the browser standard definitions.

HTTPS

As with PWA, a long standing best practice for OpenFin app security is use of HTTPs.

Offline Support

Offline support is critical for PWAs because it is a core distinction between native applications and earlier forms of Web apps. OpenFin supports offline mode with a standards based approach consistent with PWA.

  • Service Workers: This is a key technical component of PWA. OpenFin has been supporting them and advocating for the pattern since v6.
  • Offline Mode: OpenFin app manifests support offline mode as well. We built this feature into our platform in v3.2.0.0 of the RVM.

URL Access

The essential part of the web has always been the hyperlink. The state of a view should always be recreatable from a URL. OpenFin supports opening applications from a URL and supports launching an app with full context on the URL.

Mobile and Cross-Browser support

Support for mobile and commercial browsers way is simple since OpenFin APIs are applied through progressive enhancement.

Imminent Convergence

At OpenFin, we see continued alignment with PWA standards and a not-so-distant future where PWA and OpenFin apps are entirely portable and capable of interoperability out-of-the-box. This alignment doesn’t mean that everything OpenFin does today becomes a PWA standard. Instead, we see a world where apps can progressively enhance to a specific target, and where web-based platforms like OpenFin can provide critical services and supporting components for these apps.

Extending PWA

There are many things PWA doesn’t (and may never) do. This includes critical functionality such as workspace management, context sharing and native language interoperability. How do we provide this functionality while adhering to PWA standards?

OpenFin handles this problem by decorating the window object of an application with an additional API that connects the app to the OpenFin environment. This follows the tried and true pattern of progressive enhancement – so that apps can respond to the environment they are in and fully leverage its capabilities while gracefully degrading when needed.

Already in the world of PWA – the Windows 10 App store is following the same pattern to mixin its Win10 specific APIs to PWAs targeting the store. And Google is doing similar enhancements to PWA when in Chrome OS.

Conclusion

In summary, we couldn’t be more excited that the web is moving forward with PWA on the desktop! If you want to find out more about OpenFin apps, PWA, or any other technology mentioned in this post, please reach out @ info@openfin.co.

Enjoyed this post? Share it!

Related Posts

All Posts ->

Featured

Enhanced Deployment Flexibility with OpenFin's Fallback Manifests

At OpenFin, we make digital work frictionless and delightfully productive, wherever you are.

Thought Leadership

Featured

ING Integrates OpenFin for Salesforce to Optimize Workflows

Tiberiu Zulean, Engineering Manager at ING, chatted with our Chief Digital Officer, Vicky Sanders, to discuss how ING is leveraging the capabilities of Salesforce and OpenFin to optimize workflows for their employees.

Thought Leadership