Building quality into mobile applications
Software glitches ruin reputations and can rack up high costs to fix. Software quality specialists SQS give five top tips to building apps that won’t fail.
Users expect mobile apps to work – there is little room for error and second chances are rarely given if another app offers the same functionality as well as reliability. While poor coding is often the main reason for app failure, apps that are not built to cope with network weaknesses are also at risk.
So what are the potential pitfalls present in mobile networks and how can developers meet the challenge of developing resilient scalable apps?
Signal strength and overload conditions
The two most common issues with mobile networks are signal strength problems, e.g. buildings in high-rise areas obstructing signals, and overload conditions, which can happen at the local base station – the transmitter that your handset is connected to – or somewhere within the mobile network provider’s infrastructure.
Overload conditions are far more serious, and on the rise because of the changing usage of mobiles over the past two to three years. Mobiles were mainly used to make calls or write/receive texts but today’s uses include reading emails, accessing the Internet, and downloading music or even video using mobile broadband connections.
These changing usage profiles only increase the amount of data traffic your mobile network must handle, which is something network operators could not have predicted years ago, when the foundations for today’s 3G networks were laid. Even with rigorous extensions of network and infrastructure capacity, it is difficult for operators to keep up with the pace of demand.
Addressing network problems
In principle all networks are affected by signal strength and connection problems but the specific architecture of a mobile network, and its underlying infrastructure such as backbone networks and servers, determines its overall performance. New technologies such as IPv6, which increases the operators’ ability to prioritise (or “shape”) traffic, help but their benefits are small compared to the sheer volume of traffic on mobile networks.
Overall, network problems are not something that app developers can do anything about for the simple reason that issues such as signal strength and overload conditions are caused and dealt with on levels that are not accessible to apps. Smartphone apps are isolated from this by several layers of protocol, operating system and programming interfaces.
Nevertheless, problems such as unreliable data connections are a reality with all mobiles, not only because of network reliability but also because smartphones may switch from 3G to WiFi back to 4G or to GSM anytime, depending on what broadband networks are available nearby.
These transitions between different networks may cause data connections to simply drop in the middle of receiving data or conducting a transaction across that data connection, so what app developers really need to do is ensure that their app’s architecture, design and code result in a robust application that detects these conditions and automatically degrades to the highest level of performance available.
Testing techniques for mobile application developers
Robustness needs to be “built into” mobile devices and network software right from the start. However, there is more to keep in mind when working in the mobile space. In particular, there are five key elements for success in the development and operation of mobile software within a business environment:
- Define requirements: Compared to stationary computers, mobile devices bring with them a range of new or different requirements, for instance the use of mobile and public WLAN networks, different form factors, input methods, etc. As such, you should make a point of liaising with the end users and quality experts alike to establish which requirements your mobile software will need to fulfil. Errors or omissions identified there are usually the easiest and cheapest to fix. On the other hand, if no robustness requirements have been thought of, nobody can blame the resulting app for not being able to withstand adverse conditions.
- Create a "Quality Fingerprint": The above requirements need to be analysed to derive which aspects of quality are relevant, taking into account functionality, security, performance, ease of use, robustness, portability and maintainability. It is here that the relative importance of quality aspects is determined, and related activities are defined. This includes both proactive activities such as proscribing specific design or implementation patterns to analytical activities such as defining when to test for specific quality aspects and in which intensity.
- Systematic approach: The basic principles of software quality assurance (QA) and testing remain the same for mobiles. However, developing apps for multiple different platforms and variants of mobile software such as different operating systems like iOS or Android requires a more systematic approach to development. Systematic QA helps drive this by supporting the definition and management of software product lines to curb complexity and limit effort, for instance by identifying shared components that only need to be implemented and tested once.
- Adapt toolbox: With iOS, Android and similar devices, traditional QA and testing tools can often no longer be used. Additionally, aspects of quality such as robustness may require completely different tools, so that companies are forced to acquire additional tools and integrate those into their standardised testing processes. "Fuzzing" is just one example of an additional tool, which bombards the interfaces of mobile systems in a kind of stress test, with the aim of breaching them. This allows testers to detect issues in the areas of security and robustness.
- Flexible development methods: With mobile products changing ever more quickly, iterative and incremental development models are recommended as they test the requirements and their implementation much more frequently than sequential procedures. This results not only in faster time to market but also in higher flexibility as adapting to changing requirements becomes smoother and less painful.
Only systematic quality management guarantees that mobile apps – and all other software components in a mobile network – work as desired, are secure and can cope with the significantly shorter development cycles of mobile business. Anyone who does not go about this systematically has already lost out, as they will not be able to keep up with the rest of the market.