|
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
How LinkedIn used Node.js and HTML5 to build a better, faster app
http://venturebeat.com/2011/08/16/linkedin-node/
The app is two to 10 times faster on the client side than its predecessor, and on the server side, it’s using a fraction of the resources, thanks to a switch from Ruby on Rails to Node.js, a server-side JavaScript development technology that’s barely a year old but already rapidly gaining traction.
Also, the development time was unusually fast.
“It was fast by all standards,” LinkedIn’s mobile development lead Kiran Prasad told VentureBeat. “I’ve worked at startups and big companies like Yahoo, and yeah, it was fast.”
Part of the development speed was due to the fact that the team knew ahead of time exactly what needed to be built. “We really, soundly knew what we wanted to do at the beginning,” said Prasad. “To build a product when you have two years’ worth of data on user behavior makes it a lot faster.”
One part of the development speed was due to the way the team used HTML5 in the web app and reused a bunch of the same code in the native applications for iOS and Android.
“There’s this battle between HTML5 web apps and native apps. But we’ve interspersed HTML5 in the native app, where web-based content excels. The things that are hard to do in HTML5 are a scrolling infinite list, so we went native with that.”
The reuse of HTML5 code across all three applications (mobile web, iOS and Android) will speed up iterations of the app, too. “We can grow our feature set more quickly without having to do a whole new client build,” Prasad said.
In addition to HTML5, the team also used a handful of lesser-known free and open-source tools, such as Backbone and Underscore, in developing the apps.
“The way our mobile web app works is it’s all rendered on the browser side. The value of that is you send less data back and forth, so it’s much faster.”
Also, the app is insanely lightweight. “If you take our entire app and you combine all the framework pieces and zip it, it’s under 50K,” said Prasad.
“We don’t use the browser’s caching system, so once you’ve brought the app down, unless we’ve changed something in the app, the most you have to download is 1K. So especially for international users, it’ really important to not make a bunch of extra traffic.”
To speed up performance on the mobile web app, Prasad told us, “Connections are all stored locally, also for speed and so if you’re offline, you can still access them.” |
评分
-
查看全部评分
|