Here’s why the Facebook iOS app is so bad (UIWebViews and no Nitro)
非常好的文字讲述了facebook 为何最后放弃了html5 转向native,但是这并不是代表h5不能承担app开发,而更是证明了h5开发和native会长期共存
It’s the week of the Facebook IPO, and a lot of talk in the Facebook roadshow is about its mobile strategy. Out of the 900 million monthly active users, 500 million use Facebook on mobile. Mobile is booming and will so the next few years as these numbers are showing, so rightfully so a lot of attention goes to mobile.
On the iPhone in 2008/9, before the iPad was out, the first version of the Facebook app was seen as one of the great examples how to build an iPhone app. It was developed by one person, Joe Hewitt, and parts of the app were open sourced as the Three20 project. When he left Facebook and stopped working on the iOS app, a new team took over which resulted in a complete rewrite for a universal app that also supported the iPad (November 2011). In spite of growing numbers, not a whole lot of users actually like the current iOS app. In the US iTunes store, the rating average is 2 stars, with out the 21,803 ratings, 11,839 1 star ratings (!). One star ratings are often a sign of frustration, and you can see that in the comments. For most of the apps an average of 2 stars is deadly, but we all use Facebook so yes we will all have to use its iOS app if you own an iPhone or iPad.
So what is wrong with the iOS app?
- app is slow
- inconsistent information notification icons say there are new messages or responses, actual window does not show anything new.
- app is slower than mobile web site while everybody is used to speedy apps, the Facebook mobile web site is faster than iOS app, and offers almost the same functionality.
- tons of other bugs scrambled views, photo upload, text boxes disappear, no sharing.
What is the origin of these issues?
1. HTML and UIWebViews without Nitro JavaScript engine
I did some network sniffing (I like sniffing ) and found out that the data that the iOS app downloads from facebook.com is a mixture of REST (XML format, no JSON) and HTML. The HTML is used for your personal timeline, and profile and groups timelines. See for yourself, go to https://m.facebook.com/home.php and see that it is the initial view of the iOS app. Also from the screenshot above, you can see something went wrong while downloading the html and images/stylesheets/JavaScript. To display HTML in an app, a developer uses a Safari component called UIWebView. Very convenient, but also dangerous. The HTML downloaded is pretty big (15kb), and contains links to images, stylesheets and JavaScript. For a starter, caching of unchanged content cannot be controlled by the developer. The FB app downloads the whole timeline HTML every time, and it is up to the UIWebView to determine whether it needs to download images, stylesheets etc. again. Second, performance of UIWebViews is less than in mobile Safari. This has a lot to do with the absence of the new Nitro JavaScript engine in UIWebViews, apparently for security reasons. I ran some tests on my iPhone 4 with iOS 5.1.1, theJavaScript benchmark Sunspider running in Mobile Safari was 3 x as fast as running in anative app with a UIWebView. Also, to communicate from the UIWebView to the native app, a JavaScript bridge is needed. This is tricky stuff, slow and not really thread safe.
2. Different calls for similar information that is not in sync
For notifications, messages and friend requests regular REST calls are done, returning XML data. First check is to see what number of new notifications are there (https://api.facebook.com/restserver.php), then the actual content is retrieved in a separate call (https://api-read.facebook.com/restserver.php). As far as I can tell, the Facebook service calls return inconsistent information. When you check too fast what new notifications are awaiting you, you don’t get the new information.
Why would Facebook use HTML technology inside a native iOS app?
- HTML is easier for displaying fluid content. Objective-C really sucks when it comes to fluid display. An image with text around it, buttons with varying text labels are really hard to create yourself in Objective-C as you have to calculate dimensions and positions of all elements yourself. In particular for a timeline HTML will be much easier.
- Creates code that can be shared across different platforms. iOS, Android, BlackBerry, Windows Phone are all different technologies and a developer’s nightmare. Sharing some content/functionality in the form of HTML makes sense.
- HTML is much more in line with Facebook’s continuous deployment process. FB developers are responsible for their own QA, and part of that is to push code out to a limited set of servers, see results and then push it out to more and do this each day if not more often. With Apple taking as least a week of review, rolling back a code change is a nightmare.
- They can get away with it. Yes Facebook is not a bank, there are no other iOS FB apps out there and we will still use the service as it has a virtual monopoly on social networking with 900 million users now. We just have to suck it up.
- Feature phones is where growth is. A very high percentage of iPhone and Android users already have the Facebook app installed. The next frontier is feature phones, in particular in non-western parts of the world. These new users will first encounter Facebook on their mobile, and it will not be a shining iPhone.
For a company like Facebook a slick and fast fully native iOS App like Path would be much better. Faster means better user experience which will lead to higher user engagement. And higher user engagement is key for better monetization through ads. I’m afraid it will not be soon :(. What do you think?
原文链接http://blog.mobtest.com/2012/05/heres-why-the-Facebook-ios-app-is-so-bad-uiwebviews-and-no-nitro/
相关推荐
本教程结合Facebook Developers 网站(https://developers.facebook.com/),以及网上搜集到的各方资料,对Facebook应用程序开发进行大致流程介绍,和开发过程中遇到的部分难点的解决方法。
基于Facebook的create react app的NPM库启动套件
类 Facebook App 的界面效果 MFSideMenu ,MFSideMenu 实现类似 Facebook iOS App 的界面效果,提供一个滑动的菜单导航...
Building-the-F8-2016-App-CN, Facebook开发F8 2016 App官方教程的中文版。 原官网: http
平台包括:facebook, twitter ,whatsapp, email, linkedin , Pinterest, telegram, reddit, tumblr,proket, line, Qzon, weibo, 等等,只要你能想到的都支持
facebook app for graph api
GMTC全球移动技术大会ppt 作者:覃超 主题:Facebook iOS App技术演化十年之路
Facebook开发包 Facebook开发包 Facebook开发包 Facebook开发包
FaceBook插件开发入门教程,很好的文档
Laravel开发-laravel-mobile-facebook-app 一个用于Facebook页面标签应用程序的Laravel过滤器,也需要在移动设备上工作。
android HTML唤醒原生APP(APP端源码),详细参考博客:http://blog.csdn.net/daijin888888/article/details/50009387
Facebook iOS App技术演化十年之路Facebook iOS App技术演化十年之路Facebook iOS App技术演化十年之路Facebook iOS App技术演化十年之路Facebook iOS App技术演化十年之路Facebook iOS App技术演化十年之路Facebook...
Ionic-bate(测试版)开发的校园代领快递APP,Ionic可同时部署IOS,Android,微信三个平台,通过[HTML5]+[Typescript ES6 AngularJS2]+[Facebook React]在开发运行效率可以说是最好的H5框架,把传统的JS开发变成面向对象...
Facebook移动客户端开发揭秘.doc
苹果手机iOS App开发教程.zip 内容包括: IDE Xcode Objective-C语言 故事板 iPhone目录结构 控件 委托 UI界面制作 窗口布局 各类传感器 跨平台通用app 内存管理 调试App 游戏开发 SQLite数据库 Twitter接入, ...
这是Android手机版的 Facebook“脸谱”APP客户端源码,一个著名的社交媒体网站,不过在中国被禁了。这是它的APP客户端完整源代码,比较复杂,一共有30多个项目文件,对于android编程开发来说,具有很高的参考价值,...
In the third part, the author describes how several of these games are distributed on platforms, such as the Chrome Web Store, Apple iOS App Store, Google Play Store, and Facebook.
facebook 分享文档 twitter 分享文档 vue 使用 facebook 使用分享 找到index.html 添加一下代码 <!-- facebook 分享 --> <div id=fb-root></div> [removed](function (d, s, id) { var js, fjs = d....
facebook开发帮助
基于Facebook的Hive开发(Hive development at Facebook)