Fallback: The other native+web Hybrid model, used by the new Facebook iOS application
Posted by Dion Almaer 9 months ago on facebook native
There have been many trends as folks shimmy between using native and Web technology for mobile. There are the extremes of pure native, or pure HTML. Then we have the world of the WebView… ranging from simple “stick in some Web Content here” to PhoneGap-esque bridge technology to bidirectionally speak between Web and native.
I have witnessed a new approach that aims to give you a compromise of “I want to be able to update the apps outside of a native update cycle” and “I have to use Web tech to do that”.
It was interesting to see that the new Facebook for iOS app use this technique:
To solve this, we came up with a different plan to let you use the newest features without requiring you to update the entire app: a “fallback” renderer. When the news feed team designs a new type of story, Facebook for iOS downloads something it doesn’t quite understand. When we detect this, we use a “fallback” renderer to show the pertinent information in the new story in a format the app already understands. In the meantime, we create a new custom renderer and have it ready for our next app update. For areas within the app where we anticipate making changes more often, we will continue to utilize HTML5 code, as we can push updates server side without requiring people to download a new version of the app.
This is a great backstop. Not only does it give you some future proofing, but it also can let you get out of jail.
For example, if I look at my Walmart apps, being able to checkout is critical to the business. If I bring this functionality to the world of native and something goes wrong, I want to be able to immediately fall back to an experience that works. This model gives me that ability.