Raymond Endres, VP of engineering for Messenger, writing at Facebook’s engineering blog on a major rewrite of Messenger for iOS:
Mobile operating systems continue to evolve rapidly and
dramatically. New features and innovations are constantly being
added due to user demands and competitive pressures. When building
a new feature, it’s often tempting to build abstractions on top of
the OS to plug a functionality gap, add engineering flexibility,
or create cross-platform user experiences. But the existing OS
often does much of what’s needed. Actions like rendering,
transcoding, threading, and logging can all be handled by the OS.
Even when there is a custom solution that might be faster for
local metrics, we use the OS to optimize for global metrics.
While UI frameworks can be powerful and increase developer
productivity, they require constant upkeep and maintenance to keep
up with the ever-changing mobile OS landscape. Rather than
reinventing the wheel, we used the UI framework available on the
device’s native OS to support a wider variety of application
feature needs. This reduced not only size, by avoiding the need to
cache/load large custom-built frameworks, but also complexity. The
native frameworks don’t have to be translated into sub-frameworks.
We also used quite a few of the OS libraries, including the JSON
processing library, rather than building and storing our own
libraries in the codebase.
Overall, our approach was simple. If the OS did something well, we
used it. We leveraged the full capability of the OS without
needing to wait for any framework to expose that functionality. If
the OS didn’t do something, we would find or write the smallest
possible library code to address the specific need — and nothing
more. We also embraced platform-dependent UI and associated
File this under “No shit, Sherlock” — native apps are smaller, faster, and more reliable. Via Ben Sandofsky, who notes that this writeup seemingly goes out of its way not to mention React Native, Facebook’s cross-platform framework that pretty much goes against everything in this post.