`
zha_zi
  • 浏览: 590277 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

facebook html5开发app 失败的原因,

 
阅读更多

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?

  1. app is slow 
  2. inconsistent information notification icons say there are new messages or responses, actual window does not show anything new.
  3. 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.
  4. 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?

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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/

分享到:
评论

相关推荐

    JS分享代码 全功能 支持facebook twitter等

    5. **处理回调**:在分享函数中,你可以添加回调函数来处理分享结果,如显示成功或失败的消息。 对于Twitter,其Web Intents API使用URL构造方法来生成分享链接,如下所示: ```javascript window.open('...

    facebook-showposts:通过 Graph API 从 Facebook 获取帖子。 通用电气工程师-源码

    这个项目由一位通用电气的工程师开发,旨在演示如何在 Google App Engine 平台上实现这样的功能。在这里,我们将深入探讨该项目涉及的主要技术点,以及如何使用 Python 实现这一过程。 1. **Facebook Graph API**:...

    Railsgem用于添加Facebook身份验证功能以使用koala进.zip

    为了在视图中添加Facebook登录按钮,编辑`app/views/devise/shared/_links.html.erb`或相应的视图文件: ```erb 通过Facebook登录", user_omniauth_authorize_path(:facebook) %> ``` 最后,确保在`config/...

    Laravel开发-luckfbconnect .zip

    在本项目"Laravel开发-luckfbconnect"中,我们主要关注的是如何在Laravel框架下实现Facebook Connect功能。Laravel是PHP领域一个流行的开源Web应用框架,以其优雅的语法和强大的功能深受开发者喜爱。Facebook ...

    iOS中使用schema协议调用APP和使用iframe打开APP的例子

    在iOS开发中,为了实现从Web页面调用和打开应用程序,有两种主要方法:schema协议和Smart App Banner。本文将重点介绍使用schema协议和iframe来打开iOS应用。 首先,schema协议是一种自定义URL协议,允许开发者定义...

    Laravel开发-share

    在Laravel框架中进行开发,"Laravel开发-share"很可能是指实现社交分享功能,使得用户可以轻松地将网站内容分享到各种社交媒体平台,如Facebook、Twitter、LinkedIn等。这一功能通常涉及网页上的分享按钮,点击后会...

    login-signup-app

    React是Facebook开发的一个用于构建用户界面的JavaScript库,尤其适用于构建复杂的单页面应用。在“login-signup-app”中,React负责创建可复用的组件,如登录和注册表单,以及显示状态消息(如成功注册或登录失败)...

    ReactNative移动开发工具-其他

    ReactNative可以基于目前大热的开源JavaScript库React.js来开发iOS和Android原生App。而且React Native已经用于生产环境——Facebook Groups iOS应用就是基于它开发的。 React Native的原理是在JavaScript中用React...

    weather_web_app

    React是Facebook开发的一个JavaScript库,主要用于构建用户界面,特别是单页应用程序(SPA)。在Weather App中,React扮演着核心角色,负责组件化应用的构建。每个UI元素都可以被看作是一个独立的React组件,这样...

    react-redux-auth-newsApp

    1. **React**: React是Facebook开发的JavaScript库,用于构建用户界面,尤其是单页应用。React采用组件化开发模式,允许开发者将UI拆分成独立、可复用的组件。在`react-redux-auth-newsApp`中,每个新闻列表、详情...

    REACT-APP-GIPHY-API

    `Create React App` 是Facebook官方推出的用于快速启动React项目的脚手架工具。它简化了设置过程,无需配置复杂的构建流程,让你可以专注于编写实际的React组件代码。`Create React App` 会自动处理诸如编译ES6语法...

    movie_app_2021:使用React 2021的Movie_app

    1. **React框架**:React是由Facebook开发的一个用于构建用户界面的JavaScript库,特别适合构建组件化的大型应用。在这个项目中,React被用来创建可重用的组件,以提高代码的可维护性和复用性。每个电影卡片可以被视...

    movie_app_2021:创建电影Web服务

    通过这个“movie_app_2021”项目,你将深入理解React JS的使用,包括组件开发、数据获取、状态管理和路由设置。随着项目的完成,你不仅掌握了React的基础,还将具备构建现代Web应用的能力。继续学习和实践,你的...

    music-events-search-app:一个React Native APP的示例,可使用Bands In Town API搜索世界各地的音乐事件

    React Native是Facebook开发的一款用于构建原生移动应用程序的框架,它允许开发者使用JavaScript和React来构建iOS和Android应用。而Bands In Town API则是一个提供实时音乐会和演出信息的平台,为开发者提供了丰富的...

    weather-app:在React.js中创建的Weather应用程序,以显示任何给定位置的天气情况

    React.js是Facebook开发的一个流行的JavaScript库,专门用于构建用户界面,特别是单页应用程序(SPA)。该应用利用了React的组件化、虚拟DOM以及声明式编程等特性,确保了高效的性能和易于维护的代码结构。 首先,...

    react-stardb-app:使用http请求获取图像和所有数据的React应用。 之后,它将处理数据并显示给用户

    React是一个由Facebook开发的JavaScript库,用于构建用户界面,尤其是单页应用程序(SPA)。结合HTTP请求,我们可以从服务器获取实时数据,为用户提供动态、交互式的体验。 首先,让我们了解在React中创建组件的...

    使用react写一个简单的评论系统

    React是Facebook开发的一个JavaScript库,专门用于构建用户界面,尤其是单页应用程序。它采用组件化的方式,使得代码可复用性高且易于维护。 首先,让我们从项目结构开始。在提供的文件列表中,我们看到一些关键...

    airtable_react_crud_app:带有Airtable和React的演示CRUD应用

    React是由Facebook开发的一个用于构建用户界面的JavaScript库,特别适合构建单页应用。它的核心理念是组件化,允许开发者将UI拆分为独立、可重用的部件。React通过虚拟DOM(Document Object Model)实现高效的更新和...

    ReIMG-Native:使用React Native构建的Reddit Image Search App

    React Native是一款由Facebook开发的开源框架,它允许开发者使用JavaScript和React的组件化思想来构建原生移动应用程序。这款框架的强大之处在于,它使得开发者可以使用一套代码库同时开发iOS和Android应用,大大...

    ReactNative分享模块Demo源码

    ReactNative是一款由Facebook开发的开源JavaScript框架,它允许开发者使用JavaScript和React来构建原生移动应用。这个"ReactNative分享模块Demo源码"是针对ReactNative的一个特定功能——分享模块的示例代码,旨在...

Global site tag (gtag.js) - Google Analytics