Creating an iOS application is easy. Any dummy with a Mac, an internet connection, and $130 can purchase a subscription to the Apple Developer Connection and a copy of iPhone Application Development for Dummies. With a little ingenuity they can post their first app to the Apple iOS App store within a matter of weeks.
Creating a good iOS application, however, is really, really hard. By “good” I mean a robust application: one that be supported and extended over time.
A good application is not only bug-free, but makes it easy for developers to add new features later on. This is especially important for iOS applications in the enterprise, which are deployed to a huge user base whose needs may very well change throughout the lifetime of the solution.
Get Rid of “Throw Away Apps”
Today, many iPhone apps are small, simple and created quickly, with no thought given to how to maintain or extend the code. I call these “throw away apps”. If changes are later needed, it is easiest to simply start over and create the new app from scratch.
In the early days of iPhone development, most apps fell into this category, and that was perfectly acceptable. However, over time, customers have come to expect more from iOS apps, both in terms of features and reliability. Most apps now communicate with servers and other devices. Today’s more complicated apps now require many months of work and testing by a team of engineers. It is no longer feasible to redo all that work to make changes later.
It is shocking to me that many of the more complex iOS apps are still being done using the “throw away app” approach. Even more surprising is the absence of standard Software Quality Assurance practices, which are recognized virtually everywhere as best practice.
Building Industrial Strength iOS Applications
Software engineering is a mature science. Decades of trial-and-error have yielded a refined process, creating software that is of measurably high quality, can be maintained by other programmers, and modified with minimal risk. However, very few developers are extending these best practices from software to mobile.
Maybe this is just inertia. Maybe developers have become accustomed to releasing buggy apps, knowing that they’ll be rewriting it soon enough anyways. Perhaps the number of projected users is low enough that most bugs won’t be discovered. But when the iOS app in question is being released into a large enterprise environment, this is simply unacceptable.
The successful deployment of a complex iOS application to a huge user base requires developers to follow established software engineering practices as well as Apple’s recommended best practices. Their use results in mobile solutions that are predictable, maintainable and extensible.
Let’s look at a few of these practices, and why they contribute to the creation of high quality software.
Clearly Defined Agile Development Processes
Things change fast in the mobile space. New devices are announced, new features, capabilities and new iOS versions can cause requirements to change during or shortly after the completion of a project. Your team of engineers and designers needs to be able to respond quickly to these changes.
Automated Continuous Integration Build System
Code development that is capable of responding quickly to changing requirements needs to be built in a manner that safely allows the creation of repeatable, frequent code builds. Today’s tools provide the ability to track code changes to the reasons for the change, and the resulting test builds that contain those changes. The best CI systems can even deliver the resulting test build to a mobile device management system (MDM) for delivery of the new build to test devices.
Automated Unit Tests
When code changes occur at a fast pace, the risk of breaking existing code increases. To prevent this, unit tests should be created as each piece of code is written. This serves two purposes. First, it ensures that the code works as designed. Secondly, and even more importantly, it assures that the code is not broken in the future as the code evolves. In the best implementation, unit tests are run automatically by the automated CI system every time new code is added. In a development process without unit tests, as the amount of code increases, the length of time needed to make changes increases exponentially. However, with unit tests in place, changes can be made quickly and the unit tests easily run to verify that everything still works. Unit tests are like the gift that keeps on giving.
For large enterprise development projects, the importance of including formal Quality Assurance in the process cannot be overstated. The QA team ensures that the resulting mobile application meets all customer expectations, working from the beginning of a project through to completion. As a key component of the agile process, QA participates in all development meetings, and is thus kept up-to-date with any changing requirements or customer expectations.
Adherence to Coding Standards and Best Practices
As code is created and maintained by larger teams of developers, there is an increasing risk of errors occurring because of miscommunication. There can also be a reduction in delivery speed when developers move between code they’ve written and code that another developer has written. Ensuring that your entire development team follows common coding standards and best practices will increase productivity and quality.
For mobile applications in the enterprise, iOS testing is not a recommendation, it is a necessity. Corporations are investing a great deal into mobile applications, and need to ensure that they are not only bug free and functional, but will be sustainable and affordably maintainable for years to come. Following these best practices will create a great experience for mobile developers, stakeholders, and users alike.
For more information, take iOS Director Ron Lisle’s Lynda.com iOS Unit Testing course.