Slow response times can be detrimental to the adoption of mobile apps. A delay of only several seconds is enough to make some users abandon an app. With mobile apps that employees depend on to complete their jobs, slow load times can diminish productivity and lead to employee frustration and customer dissatisfaction.
Mobile apps, unlike desktop applications, have limited resources, such as battery life, processing speed, and bandwidth use, and UI/UX design decisions need to account for this. Fortunately, some tricks and adjustments to the RESTful application programming interfaces (APIs) that often provide data to mobile applications can help improve load times while being attentive to resource consumption.
1. Introduce a splash screen
An important aspect of mobile UI/UX design is the perceived response time of mobile APIs in loading data. Presenting a splash screen when the app is launched is one trick to help improve user experience by masking the true application load time. These startup screens resemble the basic theme of the application but are devoid of content, giving the user reassurance that something is happening while the application loads content.
2. Create mobile-centric APIs to connect back end
Another problem with some mobile apps is that many organizations still rely on legacy systems that were not designed with mobile in mind. Data coming from legacy APIs may not be optimized for display or processing on a mobile device and can degrade the user’s experience. Nonetheless, many enterprise mobile solutions need the data and information that is stored on legacy systems.
In these cases, a mobile back end as a service (MBaaS) can act as an abstraction layer between the legacy system and the mobile device. MBaaS offerings provide the tools and environment necessary to create mobile-centric RESTful APIs that are designed to integrate with legacy systems, offer faster load times, and generate mobile-friendly data.
3. Compress or remove unnecessary data
Large volumes of data take a long time to download. By minimizing the size of a payload sent from the server to a mobile device, the time a user spends waiting can be reduced. Multiple techniques exist to reduce payloads. One method is to remove data that the mobile device and user do not need. While this might seem obvious, it can easily be overlooked during development.
Modern MBaaS solutions often support the Node.js JavaScript runtime, which can simplify requesting and marshaling legacy data to remove unnecessary fields and transform to device-friendly JSON formats. This can reduce the payload and therefore cut the time a mobile device spends downloading data.
A second solution for lowering response size is compression, similar to the way web servers compress content to speed up page loads. Performing compression can reduce the time a mobile device spends downloading data from the server, since fewer bytes are being transmitted. HTTP response compression and decompression are often standard capabilities for both MBaaS offerings and mobile devices and enable data to be transmitted faster as a result of the smaller payload size.
4. Cache data for fast retrieval
Caching mechanisms such as a cache-control header can reduce the number of requests a server needs to process, in turn reducing data loading times. Cache-control headers are used by a web server to communicate to a client device if the same resource can be used again by the client within a short time frame.
A client device that receives a response containing this header set to an expiry time in the future will not request the resource again for a set amount of time and will instead return a locally cached copy of the data when the application requests it. This results in the appearance of a nearly instantaneous response time for end users and can also reduce the battery and bandwidth use on the mobile device.
Mobile applications often request the same data regardless of user. As a result, caching HTTP data on the MBaaS is a means of improving response times without altering existing legacy system. When a request for a particular set of data arrives at the mobile API, the app can check if a cache entry exists for it. If it does, the app can return it immediately. If no cache entry is found, the app will need to access the required legacy systems to generate it, which often takes more time; once the response is generated, the app should store it in the cache for any future requests and return the response to the client device.
With mobile, response time matters most
App response time is an important factor that can influence the adoption and use of mobile. This can be particularly true in the enterprise, where creating a mobile app can be expensive, in part because of complex integration with back-end systems. The cost of mobile app development should be balanced with the value it creates for the business in order to help generate a return on investment.
Slow response time or anything that can hamper adoption or usage can lower the value of the app and any resulting ROI. Faster response time can improve mobile success both in terms of employee and customer adoption. Mobile-centric APIs, caching mechanisms, and some other good UI/UX practices can help to achieve this.
Keep learning
Take a deep dive into the state of quality with TechBeacon's Guide. Plus: Download the free World Quality Report 2022-23.
Put performance engineering into practice with these top 10 performance engineering techniques that work.
Find to tools you need with TechBeacon's Buyer's Guide for Selecting Software Test Automation Tools.
Discover best practices for reducing software defects with TechBeacon's Guide.
- Take your testing career to the next level. TechBeacon's Careers Topic Center provides expert advice to prepare you for your next move.