Here is why Facebook ditched HTML5 and went with native code for their app
Clearly there are a couple of reasons outlined in his post on W3’s website but most importantly it boiled down to no ways to diagnose and track memory problems and sub-par scrolling performance.
Now, you might think what if Facebook hadn’t designed its app good enough and it’s the company’s fault, not HTML5 itself, but that doesn’t seem to be the case.
Here are the main reasons why Facebook switched to native code development and why HTML5 proved an inefficient platform for its app:
- Tooling / Developer APIs. HTML5 simply lacked the tools to track down memory problems with the app.
- Scrolling performance. Smooth scrolling is quintessential for an app, and even more so for a widely used app like Facebook’s. It wasn’t fast and smooth enough.
- GPU. HTML5 and graphic makers are basically black boxing the GPU, so developers can’t do any meaningful GPU acceleration on HTML5 apps.
- Other. Touch tracking support, smoother animations, and improved caching were all mention.
Check out Langel’s full post explaining the reasons why below and take note if you’re a developer. Would you still go for HTML5 or are you convinced that native code just works better?
source: W3 via High Scalability
1. Hammerfest (Posts: 369; Member since: 12 May 2012)
Sadly, 70% of the websites I use, still are Flash based...
While its not all that related to the OP, it still is because its easy to build a hole for a flash object, and make a nice app around it (and fix the problems that pop-up with it), but while going with straight up HTML5 yields the problems described above (both in Flash requiring apps, and those not requiring them)
4. aaronkatrini (Posts: 237; Member since: 06 Jun 2012)
nobody was talking about webpages! nobody mentioned iphone does not have flash... so dont get to excited!
5. Hammerfest (Posts: 369; Member since: 12 May 2012)
If you would have read the entire comment you would have understood that it was still relevant to the topic at hand...
Or you just couldn't understand what I wrote...
Either way, the issue was using HTML5 for an app, and my comment talked about the killing of Flash in the context of some apps that have a flash based element, and the app's coded around the element aren't HTML5 in order to compensate for the issues stated in the topic...
6. cptbeatstix (Posts: 101; Member since: 19 Jul 2012)
That guy obivously is one of those people that sees what they want to see. I agree with you about HTML5 still not having the smoothness that Flash has. Never the less though, its still a baby program and will have plenty of tweeks coming. Until then, FLASH IT IS!!!!!
10. aaronkatrini (Posts: 237; Member since: 06 Jun 2012)
ok fine i wana see what i wanna se...... hey were not talking about html5 vs flash! it was html5 based app vs native app.....AND YET I KEEP BEING THUMBED DOWN!
2. plgladio (Posts: 311; Member since: 05 Dec 2011)
How come B2G built on HTML5 and FB can't do for an app?
7. cptbeatstix (Posts: 101; Member since: 19 Jul 2012)
It's not that they can't, its because of performance issues. HTML5 is still new and isn't as refined as their native code is. Eventually it will change, but as they say, if it ain't broke, don't fix it.
3. firelightx (Posts: 71; Member since: 13 Oct 2011)
Doesn't it make sense? The native app code was designed to have the tools that OS needs, the tools the developer needs, to run their app smoothly and efficiently on that platform. Is it any surprise that a one-size-fits-all coding language doesn't fill all the holes properly?
8. cptbeatstix (Posts: 101; Member since: 19 Jul 2012)
Exactly. That is why there are so many different types of programming languages. This really isn't a big issue, HTML5 is still a baby, it needs time to grow.
9. jaytai0106 (Posts: 1275; Member since: 30 Mar 2011)
Please switch it back :( How slow the FB app is right now is very annoying...
11. networkdood (Posts: 6267; Member since: 31 Mar 2010)
Screw the app...easier to use Facebook on the N7 browser.
12. downphoenix (Posts: 2315; Member since: 19 Jun 2010)
Its a fail on Facebook's part, not HTML5. Have you seen the reviews on the Google Play store for Facebook? Most Facebook alternative apps, even the ones that are barely used, have higher ratings than it. Its good that they went to native, regardless, since it will be easier to execute, but it does show laziness on their part since HTML5 is more scalable.
13. pikapowerize (banned) (Posts: 1869; Member since: 03 May 2012)
i am with him! HTML5 isnt ready to be fully embrace by devs and people as long as there's plenty of flash-base sites and a-likes... and facebook isnt HTML5..so he is true! API still rules and the best option right now!