January 11, 2016 / Ben DiFrancesco
Rewrites can be scary, and they shouldn’t be taken on without very careful consideration of the value of a working codebase, even if it is “legacy.” Still, sometimes they are necessary, and launch of KÜDZOO 1.7 to the app store proves they can be done successfully.
Over the past several months, I’ve had the pleasure of working with excellent folks at Jarvus to rewrite the KÜDZOO iOS app, which is now in the hands of the company’s nearly 400,000 users. KÜDZOO is a company that aims to prove “that the carrot is more effective than the stick when it comes to student achievement,” as Forbes recently put it when naming its founders to the 30 under 30 in education.
Many factors were considered in the decision to rewrite. In particular, the need to update the app’s UI to work with the full range of modern iPhone screen sizes weighed heavily. The UI of version 1.6 was built to be “pixel perfect” with older models of the iPhone and was done completely in code. No xibs, no storyboards, and certainly no autolayout. The painstaking process of converting such a codebase to one which was ready to work on today’s range of iPhone sizes was daunting enough to make a full rewrite viable.
An important factor in making the rewrite successful was the strong product management and quality assurance services provided by Jarvus. They also facilitated updates to the app’s backend and API that made writing the frontend straightforward. Working with them was a great experience, and their work ensured that 1.7 shipped without regressions or new bugs.
The rewrite also gave me the opportunity to carefully consider the architecture of the app from the ground up. Version 1.7 uses MVVM for presentation logic and makes heavy use of principles of immutability and one way data flow. All models are immutable as are the view models. Where possible, the app favors the use of pure functions that simply consume data in one form and return a transformation. This allowed for a clean, testable structure that also reduced bugs and regressions:
- A given JSON response from the server is transformed into immutable Models
- Models are transformed into immutable ViewModels
- ViewModels are wired to the Views
As a developer and consultant, nothing is more satisfying than delivering value to a client and seeing something you’ve worked on in the hands of their users. Shipping version 1.7 of the KÜDZOO app was no exception!