To clarify: I'm not saying that facebook's HTML5 developers can't hold their own -- they produced a great looking mobile app with a truckload of functionality (and believe me, I understand code bloat). Maybe someday it will run flawlessly on mobile. But right now to produce a nice experience in HTML5 you must optimize from the start. Run your code on the device from day 1, not in Chrome with the vertical web inspector! Host your scripts on dev servers with artificial lag. Figure out what's slowing you down on day 1 and work around it! And one day you won't have to :)
One of the big promises of mobile HTML5 was that you could just take your desktop web apps, scale them down, give them new CSS, and they'd "just work". It doesn't work that way. You need to test on actual mobile devices from the start, you need to account for the lower CPU performance of them, you need to figure in higher latency over 3G connections vs. wired LANs.
You have to do all of this on native apps anyway, but you know you have to do it from the start, otherwise you can't even get your app to display, and the frameworks are built with this in mind. There're still some areas where HTML5 wins - it's easier to update the app, for one, and it's more familiar to web developers. But the developer-convenience scales were not shifted as far to the HTML5 side as people hoped they were.
I'm still not sure which technology is, on the whole, better for mobile apps. But one of the signs that you actually understand a problem domain is that you can give advice more specific than just "Competing technology X is better than competing technology Y". We aren't going to get that in a TechCrunch soundbite; there're a lot of specifics that depend upon exactly what your market is.
This should be the actual soundbite, and it bears repeating.
If your app is a simple broacherware+notifications app, then HTML5 is probably the way to go.
If you can afford expert developers for every platform and mobile is critical to your success then 100% native makes sense.
There just isn't a simple answer here. To quote nostrademons:
I'm still not sure which technology is, on the whole, better for mobile apps. But one of the signs that you actually understand a problem domain is that you can give advice more specific than just "Competing technology X is better than competing technology Y"
If you go for a native app, you'll have to practically start over for every operating system.
- How easily can I debug things if something breaks?
- In case I'm not happy with a certain behavior is it a dead end or can I simply swap out a parameter / function / module (in that order)?
These two aspects are IMO essential for choosing any development environment if I have the choice. This goes for web development too, which is why I'd prefer something like Django over something like Joomla for example. I don't even care so much about performance at that point.
Do you agree with me that at least in case of iOS, native beats html+js+webviews in those two points?
The big downside is the one Facebook found, js in a webview is just... slow.
"It's not really that HTML5 requires extra work, it's that it lets you get away with not putting in extra work and then the lack of that work ends up biting you in the end."
I have never experienced such hard-torque spin in my life. It's not that you would need to put in overtime if you worked here. It's just that we really let you get away with never putting in overtime, if you don't want to. And then that lack of overtime ends up biting you in the end.
If you put in <x> effort into HTML5 you'll have a slow, shitty version. If you put in <x+y> you'll have a nice fast version.
If you put in <x> effort with a native app, you have nothing. If you put in <x+y> you have a working, fast app.
You get a working prototype faster with HTML5, but that's not a fair comparison with a native app which took more work to get working at all.
It's not just that JavaScript is slow, although that doesn't help - having to worry about the performance implications of using libraries rather than directly using browser APIs, or being forced to use native scrolling because JavaScript scrolling just can't avoid lag, is a waste of time. It's also that where native UI frameworks are designed for performance from the start - every single UITableView is drawn lazily (implementing "immediate-mode" infinite scrolling on top of the deferred mode DOM is awful), you can fluidly move between low-level and high-level drawing APIs (Canvas is a very sharp boundary), animation feels built in rather than a recent hack (and I hope you're not targeting anything other than WebKit) - in HTML you have to fight against an absurd layout system to do anything and, in some sense, work around it to do anything fast; there are usually many ways to do it but most of them are slow.
And it doesn't help that where native frameworks have built-in controls to do a lot of things - and those controls look and feel native simply because they have the home field advantage of being what everything else has to mimic - HTML5 is left with a bunch of shitty webapp frameworks and the option of reimplementing everything yourself. The creators of those frameworks seem to assume things like if the animation looks vaguely like the original, there's no need to actually get the details right to avoid uncanny valley, or make it performant at all, so you probably want to make it yourself. I hope you know what you're doing.
As much as I love HTML5, you have to fight every step of the way to make something that works right. Getting a prototype out is easier with HTML5 than native, but for a moderately complex app, making it actually work right is vastly harder.
(I do like the better layout systems and widget libraries of native frameworks - I did desktop app development with Swing and MFC before HTML/JS, and it really was significantly easier to put together a complex UI that matches the native look & feel with those. HTML5 gives you the opportunity to be creative that you don't have when you overrely on a framework, though.)
An app which all of 50 people use --and many of them curse while doing it.
Kicker:
> in the U.S., Yahoo is No. 1, with 96.6 million active users
http://news.cnet.com/8301-13772_3-20114975-52/microsoft-aimi...
So anyway, if you put X efforts, the native app will always win, because it can do all the stuff the HTML5 app can do, but also more, faster, without intermediate layers, in a more native way and with more native look & feel.
Without to mention that for Facebook to use 2x resources to develop the application would be not an issue.
The current Facebook app, if developed by competent guys, is a 3 months project by 2 people, per platform. A joke for FB. (Note: I'm talking only about the app itself, not the backend that is an invariant).
On iOS, using HTML5 decoupled deployment of functional changes from the App Store approval process. They could add a new feature on the servers and have it available on phones immediately. Certain parts of the new app still use HTML to allow new features without updating the whole app.
On Android, HTML5 let them support a large number of phones with fewer special cases to work around old versions of the OS and phone-specific bugs.
If I can build a Facebook client that covers the most important features within 3 months (at 2 evenings per week after work) then I'd bet that a company like Facebook (with hundreds of developers that are much better than I am) could invest the needed resources (maybe 3-4 developers per platform) to create a truely amazing native experience.
I'd even argue that it is not an option for anyone in their position to even consider going HTML5 just to reuse some code. That would be just the wrong place to save a few bucks for them, considering that they need to make a transition to mobile pretty soon and failing to do so would be an open invitation for competitors to come and basically kill them.
Additionally I'd like to add that I am not convinced that is even possible (or if so many times harder) to create a content rich application like Facebook with webviews wrapped in native code that feels as fluid and responsive as a full native app. I have tried this in the beginning with my Facebook client (app link: https://play.google.com/store/apps/details?id=com.flipster) and failed miserably before stopping this webview nonsense, and so did the Facebook developers.
On the scale of Facebook's resources, building well-functioning apps just isn't a hard problem. Not saying it's not hard, just saying it's not hard on the scale of Facebook's resources.
Additionally making the mobile app run smoothly on any device is just the bare minimum for what they should deliver. It's hard to not compare it against competition like the Android Google+ app, which absolutely crushes the Facebook app (I'm talking about the UI here, not about the social network itself), and that's where my sketicism comes from. Even if someone was able to deliver a WebView based app like Facebook, running smoothly on cheap devices, other competitors betting on native (like Google+) would still be in a different league.
First of all, if going native, you'll have to put in twice the effort for targeting both Android and iOS, while an HTML5 app can be easily ported to WinPhone or even Symbian.
Will it be shittier than a native app if doing a straight port with no effort to make it seem native? Most definitely YES, but at least you've got an app to give to your customers that want to use your product. Because no matter how cool the new Facebook app is on iOS, I'm still and will continue to be an Android user.
Also, I do not agree that it's easier to develop that native app in the first place. I can easily do things in HTML5 in terms of UI that I wouldn't know were to begin with native widgets. All is fine and dandy when you're using the standard widgets, but if you want to have non-standard behavior, or to put your personal touch on the design, then all hell breaks loose, because those native widgets ARE NOT as fluid, as easy to change or as composable as a bunch of divs with CSS attached. People underestimating this point have never worked on designing interfaces in both HTML5 and native widgets.
And for the record, I hate the native app because it's slower than when using the website in my browser. But the work they did also improved the mobile website, which I find to be awesome.
The current Facebook app, if developed by
competent guys, is a 3 months project by 2 people
Yeah and I'm sure that in their spare time those same 2 people could also build Twitter.So in the short term, a better mobile experience hurts, not helps, FB's bottom line. So they'll likely be looking at spending their development resources elsewhere.
This isn't true any more. The new version of the Facebook iOS app includes sponsored "your friend liked [brand]" callouts periodically in the news feed.
Yes, but they didn't have anything like it on mobile until just recently. The iPhone app was zero revenue. It is now non-zero revenue.
Am I wrong that this basic design is Hewitt's?
A relevant news item here: http://techcrunch.com/2009/11/11/joe-hewitt-developer-of-fac...
(Of course, this depends heavily on the app.)
HTML5 webviews helped them do this, and worked on both android and iOS.
NaCL would, like java applets vs java apps, or flash, have let them do this too.
Why does Facebook not need to produce particularly high-quality software?
By paying less attention to quality, Facebook has been able to focus on other things, like making the company a fun place to work at that can attract and retain talented engineers. Facebook would probably be less fun if it cared more about quality.
Facebook's product is a website, so it can fix things quickly. It has a process which permits rapid deployment of new code, and rapid rollback of buggy changes. This reduces the cost of recovering from bugs.
Facebook's product has a lot of momentum and lock-in. The barrier for users or businesses to move off Facebook is very high. This gives Facebook a wider margin of error to ship glitchy software. If Google was broken for a day, you'd probably go to Bing and might not come back. If your iPhone pissed you off all the time, you'd probably buy an Android when you're faced with the decision in a year or two. If you can't order something on Amazon, you can order it from somewhere else. If Facebook is broken, you keep coming back until it works again.
I'd say that Facebook's acquisition of top talent has much more to do with them having huge pre-IPO monetary incentive and less to do with being a "fun place to work".
Any impediment to shipping code makes things less fun for many developers.
Because "fun place to work" obviously means beer and bongs passing around, in-office swimming pool, bikini models, pool and air-hockey tables, and Futurama watching marathons.
Which doesn't result in the highest quality products, if any products at all.
Not saying the stuff associated with quality is bad -- quite the opposite -- but (at least to me) that part isn't particularly fun.
Yeah, MZ is not smart so it is not surprising that he would say not correct things...
Heh...
I'm not saying that it's an easy problem. You have to find the right balance between which components should be native or not. It's clear from the other problems that Facebook's been able to solve that they know how to hire top-notch developers. They just failed to do so for their mobile efforts, which just reinforces the stereotype that they don't "get" mobile.