

Under the hood: Rebuilding Facebook for iOS - relation
https://www.facebook.com/notes/facebook-engineering/under-the-hood-rebuilding-facebook-for-ios/10151036091753920

======
pdenya
What a strange article. I'm not sure who this is written for. There's no real
details about anything technically interesting that they did other than
including the whole messages app codebase in the new app. But explaining how
their objects share protocols? Listing some data that they precalculated and
the methods it saves them time in? This stuff is obvious to any current ios
dev and useless to anyone who isn't an ios dev.

~~~
biznickman
This was exactly my thoughts ... I'm still trying to figure out why they would
use multi-threading though.

~~~
frankus
Wha? The UI needs to keep processing events to remain responsive. If you have
a long-running (relatively speaking, say 10 milliseconds) process like
uncompressing an image, you don't want your UI to lag for that long.

You could have the image decompressor look up every millisecond or so to see
if there are any UI events to process, but that leads to the sort of spaghetti
code that multithreading/multitasking was built to address.

------
SlipperySlope
This is very strong evidence that when performance matters to your iOS app,
you are better off going native and not HTML 5.

Who here thinks that Facebook should have stayed with HTML 5?

~~~
EthanEtienne
Yea, I call complete B.S. Look how well the LinkedIn app performs. It's not as
good as it could have been if it was 100% native, but it's no where near the
bag of rocks the FB app was. I work on native iOS and HTML5 apps every day,
HTML5 isn't close to native, but you can still get it to perform damn well
enough. FB had no excuse for that shit they released, they should have held
onto Joe Hewitt to fix it. (I don't know what the inside story was though).

I read the story on FB newsroom. I see that site is built on OLD asp.net
webforms. Not even asp.net MVC. If their devs are constantly using the oldest
of tech to create their site, it's no wonder their shit performs so badly.

Now I have no idea or backstory to why they choose these routes, they most
probably simply didn't have any developers with enough experience or skill set
to use newer better performing tech (I hear it's hard to find good
developers).

~~~
evanlong
LinkedIn app. It sucks. Rotation is clunky and slow.

Do you work on an HTML5 cross platform app everyday like FB engineers did?
Guess what. That's when shit gets really tricky and hard.

~~~
EthanEtienne
That's exactly why you should keep things as simple as possible. Adding
features does not mean a better app. Simplicity first, make it USEABLE first.

------
state
I know we're all interested in the content, but that is a seriously bad
reading experience. Just because the content is technical doesn't mean the
font size has to be tiny and the line height squashed. It's way too dense.

------
mrwilliamchang
I'm impressed with how quickly FB, able to transition from emphasizing their
web experience, to emphasizing their mobile experience. Most established web
companies are moving much slower on this (ie Microsoft, Google, Yahoo!,
Amazon, eBay, Flickr, Yelp, Craigslist, Tumblr, etc...).

~~~
rieter
Seriously? FB is one of the worst slow moving companies in mobile. Google
mobile apps were always better.

~~~
macrael
I believe that the Google apps on Android are good, but my experience with
Google apps on iOS have been mostly bad. Have there been good ones?

~~~
kristofferR
Google+ for the iPad is amazing - buttery smooth, big beautiful images and
easy navigation.

------
riledhel
"We truly believe mobile is the best platform for Facebook" that's a strong
statement.

~~~
prawks
A strong percent of their users are gawking at iPads and iPhones, it makes
sense.

------
jamesaguilar
I wonder if they are done or are they going to still work on making it faster.
Responsiveness when viewing your own profile is still atrocious on an iPhone
4.

~~~
Xuzz
Profiles are still web-based, unlike the news feed.

~~~
Simucal
Do you know if they plan rewrite those also?

~~~
cicloid
Probably you will see many updates on the coming weeks. (Almost every week
probably)

------
pieter
Hmm, too bad you need a Facebook account to read this. Anyone have a version
cached somewhere?

~~~
mh-
[https://www.facebook.com/notes/facebook-engineering/under-
th...](https://www.facebook.com/notes/facebook-engineering/under-the-hood-
rebuilding-facebook-for-ios/10151036091753920)

~~~
pieter
That link also requires me to log in

------
nutjob123
Good stuff. Can't wait for the android version. One more thing, I just spent
15 minutes figuring out how to change a co-worker's profile pic in the new
app. I fear that simple use cases are becoming complicated.

------
biznickman
Can anybody explain why they would use background threads? Seems like over-
engineering. Don't iOS blocks natively perform tasks asynchronously?

~~~
jonathannorris
pretty much every iOS app uses multi-threading (if they don't they should).
GDC makes it pretty easy to implement, its defiantly not over-engineering. I
highly recommend any new iOS programer to learn GDC when building their first
app.

~~~
hobonumber1
I assume you mean GCD - Grand Central Dispatch?

------
kennywinker
Cool to hear about some implementation details. Curious if they will open
source any of this stuff. My gut says no, but hope springs eternal...

~~~
newhouseb
If you go into IOS Settings and then click Facebook > About you can see all of
the open source components that they use (An enormous amount). It has
everything from AQGridView to Boost to Chromium (what?) to PHP (again, huh?).

~~~
sandyarmstrong
Since Facebook is a big PHP shop, it could be that they have some standard
libraries where they prefer to use PHP's version as the canonical
implementation. Then they port these to various languages. In some licensing
interpretations, this would bind them to the license of the original code.

~~~
kennywinker
Interesting. Could they be using code written in PHP, but converted to C++
using HipHop?

~~~
sandyarmstrong
It's certainly possible to use C++ in native iOS apps. I'd forgotten about
HipHop, so that makes a lot of sense.

------
sidcool
I don't have access to the article. Can someone post it here or mirror it?

~~~
christiangenco
<http://pastebin.com/fqDShqiK>

~~~
sidcool
Thanks!!

------
Baba_Chaghaloo
Who voted this advertisement up, I wonder? Fuck you Facebook. I'm never
signing back up, your site is harmful to people, everyone who works there can
go to hell.

~~~
geuis
I'm going to share this link with you, since it appears you haven't read it
before.

<http://ycombinator.com/newsguidelines.html>

It's also that link in the footer called "Guidelines". Read them.

~~~
Baba_Chaghaloo
I'm fully willing to say that to their face though. If I made a dumb website
that accidentally caused even _one_ divorce I'd shutter it, Facebook must
cause hundreds every year. It created, intentionally or not, a culture of
bragging and narcissism. They're stockpiling facial recognition data. It's a
terrible company. If you work there, Fuck You. You're a bad person. I don't
know how else to say it.

~~~
mh-
>I don't know how else to say it.

Consider not.

