Electronicdesign 9405 Labbenchpromo

In Search of One App for Many Targets

April 22, 2015
Microsoft’s Windows 10 will be the platform for Visual Studio 2015.

“To dream the impossible dream” when it comes to software is the concept of a universal programming language/environment/runtime that runs on any hardware. Of course, embedded developers know that attaining that goal is a lot harder than it looks. Just getting something to look good on two different-size displays is hard enough, let alone supporting multiple input devices, different power management schemes, a variety of connectivity mechanisms, and so on.

Oracle’s Java originally touted the “write once, run everywhere” ideal. Java has been successful running across a wide variety of platforms, but it is still a “write once, run almost everywhere, otherwise customize” solution. The Java virtual machine (JVM) made running the code on another platform easier, but it does not address details like user interface or device support.

Even C was designed to provide a level of portability, but system interfaces are the bane of developers. Frameworks like Qt (pronounced “cute”) provide a degree of display portability by providing the same API to developers while hiding the underlying operating system specifics. The graphics support allows an application to work on many different platforms, but there are challenges when providing controls to handle touch support because of differences in size and convention between platforms like PCs, tablets, and smartphones.

1. Microsoft’s Universal App framework allows developers to isolate target specific code for creating packages that incorporate this code with shared code for a deliverable.

I was reminded of this challenge while working with Microsoft’s Visual Studio 2015 and the company’s new Universal App framework (Fig. 1). The goal is to have an app in the Windows Store that would work across the Microsoft operating systems from phone to tablets to desktops. This is not the first time Microsoft has pushed portable application development. Its Common Language Infrastructure (CLI), C# and .NET provide portability similar to Java.

2. Creating a Universal App for targets with different capabilities requires customization. (Michael Crump, Telerik)

The Universal App framework builds on this and preserves common code within a project that is designed to be the bulk of an application with additional platform-specific code to address different platforms like smartphones and tablets (Fig. 2). Shared Projects within Visual Studio allow developers to create contextually appropriate user interfaces for the target platforms. This approach allows projects to target a platform while sharing code with other related projects.

Visual Studio targets Microsoft Windows platforms including the forthcoming Windows 10. By adding the Xamarin plugin, Visual Studio projects can target Android and iOS platforms as well. Xamarin maintains Mono, an open-source implementation of CLI that runs C# applications.

Using Visual Studio Tools for Apache Cordova is another way to enhance cross-platform support. Cordova supports Android, iOS 6, 7 and 8, Windows Phone 8.x and Windows 8.x. It is also designed to build native applications using HTML, CSS, and JavaScript.

Of course, Visual Studio can also package apps for the Windows Store and can upload the packages for multiple targets.

Designers still need to consider all targets and take into account their advantages and limitations. At least with Visual Studio 2015, the job is easier to manage. 

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!