Building a desktop application in the age of the cloud

build desktop application age of the cloud

Most application development today starts with the assumption that a cloud or web application is the right way to go. This is often the right answer – and it’s a mindset we have within our own team – but there is still a place for desktop applications.

In the context of this post, we consider a web application one that runs on a server someplace and interacts with its users through a browser-based user interface. Desktop applications are installed onto the local machine and run locally there. As you will see, browsers can play a role in desktop applications as well, so the distinction is where the application actually runs.

Determining the right kind of application revolves largely around usability. You need to define user requirements and think about how users will interact with your application to make the right decision as to whether you should build a desktop application versus a cloud or web application.

In this post, we discuss when you should create a desktop application. We also look at how desktop application development is less painful than it used to be, and give you some tips to follow to develop a successful desktop application.

When should you create a desktop application?

There are three reasons that should steer you towards creating a desktop application:

1.    Security

There is tighter security around web applications since they are generally exposed to the internet, and are therefore more susceptible to attacks by hackers. (That’s not always the case, as you can run web applications behind your own firewall, but more often today web applications are hosted on a public cloud service provider.) If you do not want to have to deal with these extra security layers, a desktop application is the better choice.

Many users also view desktop applications as being more secure, since they are installed on a local machine. Some people are less likely to place sensitive data on third-party cloud providers, so consider the type of data your application will be storing, and who your users or stakeholders are, to determine if a desktop application is a better choice for them.

2.    Integration

Web applications that run within a browser do not have full access to the hardware on the local computer – a necessary security constraint. If your application needs access to this hardware or other devices connected to the local machine (beyond just being able to print), then you need a desktop application. A desktop application is also the right choice if you want the application to launch automatically upon system startup.

3.    Visibility

Web applications live inside the browser. They are only accessible when the user is in that browser.

Desktop applications are in your taskbar and system tray. They are always accessible and present on the local machine. It is possible for web applications to leverage some of this visibility via a hybrid approach, which we will discuss later on, but a standard web application lacks this visibility.

This makes desktop applications ideal when you want or need to send notifications to users (something that is now becoming possible with web applications, but it is not easy) or when you want users to be able to perform simple tasks or commands from the system tray without having to actually go into the application.

4.    Connectivity

It seems trite to say it, but bears remembering: web applications need a connection to the network in order to run. If you are in a restricted environment, or your application needs to be able to run with or without network connectivity, then you need a desktop application.

You might be tempted to say, “Oh, internet connectivity is ubiquitous now with 4G and LTE,” but that’s not always the case. We have a client who carries our application on a ruggedized laptop into remote construction zones and oil fields. So always consider all of your use cases when making this choice.

Improvements in desktop application development

Desktop application development has historically been filled with a number of challenges.

Installing the applications used to be a real headache. Developers had to create custom installers that could deal with all manner of combinations of operating systems, versions, other installed apps, and so on. Generating reliable installers is a skill unto itself, eating up time and resources in the development process. Users had to navigate to a specific website to download and run the installer – and hope that it was from a trusted source.

Updates were also a hassle, being pushed out to users with the hope they would install them. You could build in logic to the application itself to check for available updates, but this again added more time and was a complex task. Both approaches required time and effort on your part and forced users to take extra steps to download updates, making them less likely to do so.

The introduction of stores – specifically the Apple and Windows stores – have made the installation and update process much smoother.

Users can install desktop applications directly from the store of their choice. Updates are available through the store as well. Users can choose to have updates automatically installed, or they can be notified when updates are available.

App stores also provide a more secure platform for installation, since applications must go through a certification and vetting process first. This does not guarantee application security, but it does add an extra layer of protection.

Stores also give desktop applications more visibility. Users can locate your application through the store’s search functionality, and if you can get your desktop application into the “top 10 free app category,” you can attract even more attention.

“DLL Hell” is another well-known headache of desktop application development. DLL refers to Dynamic Link Libraries – shared libraries – that were often used when building desktop applications for Windows.

Multiple applications would leverage the same DLLs and make changes to them, creating new versions. Problems arose when your application would search for the appropriate DLL but would be unable to locate the right version, or when some later install would replace a DLL you were using with some new version, that changes how it works. This often resulted in applications not working properly.

The Universal Windows Platform (UWP) has resolved many of these DLL Hell issues by providing self-contained packages, where your application has its own little private view of the machine, removing the need to use shared libraries in many cases.

It has also become easier for developers trained in web applications to transfer their skills to desktop application design and development. UWP, for example, supports application development using JavaScript, C++, VB.NET, and more.

Tools such as Microsoft’s Xamarin also make creating cross-platform applications that run on Windows, Mac, and Linux simpler. Xamarin.Forms lets you share user interface code and logic across platforms. It also provides support for UWP.

Electron allows developers to use familiar web technologies to build cross-platform applications. Electron is a framework for building native applications using web technologies such as JavaScript and CSS. It is an open source project compatible with Mac, Windows, and Linux.

The hybrid approach

It’s worth mentioning that some applications take advantage of both desktop and web benefits. These hybrid applications are web applications wrapped inside of a desktop application.

This approach provides access to the local machine and makes notifications easy, but also gives the look and feel of a web application. This may be an option to consider depending on the usability requirements of your application.

Tips for creating successful desktop application design and development

Here are some tips on how to create a successful desktop application:

  • Focus on usability – This is the key tenet for successful desktop application design. You have to design and develop with the end user in mind. Understand how your users are going to use the application. Interview them, and conduct user testing.
  • Balance the features set – You may be tempted to pack a lot of features into your desktop application. Keeping it simple is often the better way to go. Too many features become overwhelming and result in poor adoption. Know your target audience and incorporate those features that best serve them.
  • Think mindfully about notifications – Consider how (and how often) you want to alert users when something has changed. Will you use a certain icon for more urgent notifications, so they stand out more? Will you allow your users to control when and how they are notified?
  • Incorporate appropriate task functionality – Think about how users will interact with the application from the desktop. Will they want to perform simple commands from the system tray without directly opening the application itself, or do you want them to always launch the application to do anything? Both are correct answers, depending upon how your users need to work with your application.
  • Create efficiencies – A good desktop application design uses the least number of steps to complete tasks. Users are looking to save time and get things done quickly.
  • Keep it simple – The easier your application is to use, the more likely it is to be used. So don’t get caught up in complex, unessential steps or features. Review your design with the goal of removing unnecessary steps and functions. Focus on delivering a simple solution that is reliable and secure.
  • Make speed a priority – Desktop applications need to leverage the operating platform, hardware, and memory wisely. They also need to integrate well with other applications. This is the only way to keep your desktop app running quickly. Users do not want to sit and wait while the application slowly runs through its paces. Interestingly, users are more tolerant of slow web apps than of slow desktop applications: running locally raises expectations for performance.
  • Leverage the stores – Getting your desktop application into the Apple or Windows stores removes the hassle of building an installer, makes your application more trustworthy, and increases your visibility. Even if you’re not building a public application – if it’s to be used only by your own staff – the online stores can be a useful distribution vehicle for you.
  • Get the expertise – Seek help if you need to build a desktop application but do not have the resources in-house. AVI understands the unique challenges around desktop application development. We take a team approach so you get access to experts in all areas of design and development – because building a desktop application is more than just writing code. It involves usability, design, application security, and quality control.

Desktop applications still have a place in today’s application landscape. Security, connectivity, integration requirements, and accessibility preferences will help you decide if a desktop application is the right choice.

Advances have been made to make desktop application development less painful than in the past, and if you follow the best practices provided here you will be well on your way to success.