Facebook Plans to Speed Up its iPhone App
bits.blogs.nytimes.com
bits.blogs.nytimes.com
There's nothing magical about Objective-C that's going make the HTTP requests quicker.
The whole "native vs web view" performance debate is about things like animations and scrolling and rendering, not about the speed of retrieving assets from a remote server. And that's what's terrible about the current iOS app.
I've never found a situation where a WebView-based app is better than native.
I was actually very hopeful that the app would feel as good as native after I'd read about it, but I was disappointed.
I note that you're a web developer. Full disclosure, I work in the native mobile development space.
"...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, the JavaScript benchmark Sunspider running in Mobile Safari was 3 x as fast as running in a native 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."
http://blog.mobtest.com/2012/05/heres-why-the-facebook-ios-a...
IIRC, the reason is that the Nitro engine compiles directly to native code, which is then executed. This requires writing to memory as data and then executing the data. However, Apple doesn’t allow third-party applications to execute data for any reason. This would violate security policies. Thus, any and all third-party scripting—be it JavaScript in a Webkit view or something else—must be interpreted. The best a third-party application can do is compile to byte codes and then interpret the byte codes.
The webview is a whole different ball of wax (my last gig was PhoneGap development on iOS and Android) and if you are not, from day one, incredibly focused on performance (CPU and Memory) you're gonna have a bad time.
Knowing what I know about making PhoneGap apps, there's nothing inherent in what FB is doing that the WebView is incapable of doing. It's just really hard to get it right, much harder than a native app.
PhoneGap development is hard inasmuch as there are tons of gotchas you don't know about and haven't been clearly and extensively documented.
I agree that supporting multiple platforms is suboptimal, but instead choosing a suboptimal common platform isn't any better.
We already tried that once with Java desktop applications, and Java at least tried to provide a viable common widget/platform toolkit.
I'm starting to feel that facebook purposely broke its iPhone app to limit use. There is simply no other explanation why the most basic feature of finding and adding a new friend would be so terribly broken.
Sure there is - the ability to push rapid updates to the UI, without needing to go through the Apple review process each time.
HTML is for documents, not Frankenstein coded applications.
http://www.codinghorror.com/blog/2011/06/performance-is-a-fe...
This is certainly a benefit, but at Facebook's scale, it made sense to dedicate engineering efforts to have the best experience on the iPhone. I'm glad they're finally going in this direction. However, I think that one of the benefit that is not mention here is the easiness to change the UI at any point, which they've been doing all the time.
That being said, I would think that it would still be possible to modify a native UI without going through an App Store review, since more or less everything can be created and customized programmatically: so you can send some kind of file that describe the UI tweak. Surely, it can become a mess pretty fast, but it's an option.
Maybe Apple would not be happy about that, but I don't know if they'd be able to tell you're going to do that during the review process.
Your 'UI Description' file most likely will fall under that category.
Libraries like Kendo UI or Sencha Mobile help a lot, but if I were Facebook, I'd spend the dev time to do it right and make it awesome.
Whether that means optimizing the crap out of their HTML 5 or going native is a judgement call.
I'm also pretty sure that Google's Gmail iPhone app is 100% html5 as well as I've seen it re-render the entire interface occasionally as if it were an app in a UIWebView.