Create delightful multiplatform solutions; write less code

Ernest Bruce
5 min readJan 5, 2018

multiplatform apps suck. they suck for users when developers do not leverage a platforms’ capabilities, for example, by developing a web-based solution. and they suck for developers when they make the effort to provide users with delightful experiences for the users’ devices.

writing less code results in unhappy users because they end up with subpar apps for their favorite platform, or with the app not being available on their favorite platform.

providing users beautiful apps for their chosen devices means that you must learn how to develop user experiences for multiple platforms, and write more code.

with Xelex, you write less code to target more platforms. and you may not event need to learn anything about the user-interface architectures of the targeted platforms.

like a movie studio, you employ directors, actors, and scenes to construct user experiences that your audience will love.

introduction

multiplatform apps suck. they either suck for their users or their developers. sometimes, they suck for both groups. a lot of the difficulty in developing multiplatform solutions lies in the design and implementation of user interfaces for particular platforms.

adding a new target platform to a solution (for example, developing a macOS app to complement an iOS app that provides the same functionality) may require learning new programming interfaces or even revising data-model and business-logic code. this process often results in error-prone solutions that are difficult to manage.

to provide the best user experience, you should deploy native apps that leverage the target platforms’ capabilities. but doing so for each supported platform requires time and effort.

what you really want is to leverage your carefully developed data models and business logic on all the platforms you support. and you do not want to write user interface code for all those platforms.

this white paper introduces Xelex, a product you use to write less code and produce user experiences that your customers will love. instead of learning the intricacies of user-interface design and implementation for multiple platforms, you create scenes that define the interactions you want users to perform with your data. at runtime the app interprets your scenes and creates delightful experiences that are perfectly matched to a device’s capabilities and its users’ preferences.

Xelex facilitates the implementation of enhanced experiences such as pen-enhanced and speech-enhanced experiences. imagine a nurse capturing patient data in an emergency room by walking among the patients an using a tablet and a pen. another nurse could be using the same app on her desktop using a keyboard and mouse. both apps are implemented from the same core source code.

target multiple platforms well and write more code

when your customers use counterpart apps on different platforms, they expect each app to take advantage of its platform’s capabilities. for example, on a laptop users enter information quickly using a hardware keyboard. but on a tablet, although it offers a software keyboard, users may enter information faster with a pen.

one way of targeting both platforms is to implement a web-based user experience. although effective, this approach produces apps that feel out of place on both platforms. users are more satisfied when the apps they use help them to be more productive by leveraging their devices’ capabilities effectively.

to provide more attractive experiences tailored for each platform, you can design and implement separate user experiences, one for each platform. but this approach requires proficiency in the user-interface architecture of each platform, and more code.

want to add Linux, Windows, and Android to your supported platforms? that requires writing even more code.

what would be great is a way to define user experiences consistently without thinking about the target platform (less code), while deploying the app on multiple platforms and providing their users experiences that they love (happy users).

target multiple platforms well and write less code

to deploy apps using minimal code, you do not have to learn each platforms’ user-interface intricacies. instead, you can define platform agnostic interaction scenes that are interpreted on each platform to create the appropriate user experience for the device. this approach takes advantage of each platform’s nature and capabilities while letting you define the entire solution’s main functionality in a single place.

develop a robust multiplatform solution

first, you write the source code for your solution’s director library, which includes your data-model and business-logic code, and your directors. a director is a class that manages one or more interaction scenes.

an interaction scene is the blueprint from which each platform creates a user experience. a director creates scenes to which it adds semantically rich actors, which are elements that can represent data from your data model to the user. some of these elements also represent commands (reflected in menu bars) and navigation items.

your app instantiates directors at specific stages of its lifecycle and in response to user events. for example, when an app launches in macOS or iOS, it creates its main director, which orchestrates the general operation of the app. in a document-based app, when the user opens or creates a document, the app instantiates a document director (or document controller), which manages the document’s interaction scenes, and performs tasks such as reading and saving data.

when a director runs a scene, the app interprets it and generates the appropriate user experience for that scene on the user’s device. the same scene results in very different user experiences tailored for each of the platforms you support.

placing all your business code and interaction scenes in your director library also helps you to focus on the essence of your business processes regardless of the target platform, which helps you to develop a consistent, robust and flexible solution.

for each platform you want to support, you create the appropriate target (macOS, iOS, or WatchKit app) which links with your director library. the target also includes a controller framework responsible for interpreting interaction scenes and creating the apps’ user experience at runtime. this framework implements base view and controller classes for the platform. if you require it, you can customize the user experience by overriding the base classes in the controller framework. you focus fully on user interface, without thinking about data models and business logic, which also helps you produce robust user-experience code.

meet Xelex, your new best friend

Nerd Brawn’s Xelex is the product that realizes this vision. Xelex comprises the set of libraries and frameworks that let you develop beautiful multiplatform solutions from a single set of core source files.

Xelex is in development. a beta version will be available on June 2018.

to learn more about Xelex, contact ernest_bruce@me.com or visit facebook.com/nerdbrawn.

--

--

Ernest Bruce

feminist, progressive, Army veteran, patriot, Apple alum, thinker