310 likes | 457 Views
LinkedIn Mobile. How we do we do it?. Build. Platform. Design Code Testing Deploy. iOS Android Browser Other. Code. iOS Native 30%. Android 80%. Mobile Web 100%. Other OS Wrappers 100%. Mobile Web JS/HTML. Screen based REST API. Mobile Server (node.js + MongoDB).
E N D
LinkedIn Mobile • How we do we do it?
Build Platform • Design • Code • Testing • Deploy iOS Android Browser Other
iOS Native30% Android80% Mobile Web 100% Other OS Wrappers 100% Mobile Web JS/HTML Screen based REST API Mobile Server (node.js + MongoDB) Domain REST API LinkedIn Platform
iOS Native30% Android80% Mobile Web 100% Other OS Wrappers 100% Mobile Web JS/HTML Screen based REST API Mobile Server (node.js + MongoDB) Domain REST API LinkedIn Platform
Client/Server Border Typical Web Application Controller View Model
Client/Server Border Rails Systems Process Rails Controllers ERB ActiveRecord
Client/Server Border Tiered Systems Process Controllers Templating Process Data Service
Process Process Client/Server Border Process Process Process Process Tracking Data Service ... Data Service ... BG Queue Process Controllers Templating Real Systems
Process Process Client/Server Border Process Process Process Process Tracking Data Service ... Data Service ... BG Queue Real HTML5 Systems Browser / Mobile Client Controllers Templating
Process Process Client/Server Border Process Process Process Process Browser / Mobile Client Tracking Data Service Data Service ... ... BG Queue Controllers Templating Real HTML5 with Node.JS Node.JS - Aggregation, Formatting
Why Node.JS: Evented & JS • I/O Bound for most interaction • Aggregation and Manipulation of Strings • Lots of persistent socket connections • Client developers are doingserver development
Nginx Nginx Node JS Server Node JS Server Mobile Server • Stateless • Platform Transport: JSON In / JSON Out • Nginx as Web Server • CDN for Static Content • Log / Track Everything Load Balancer MongoDB Logging Server Tracking Server LinkedIn Platform
Screen Based JSON • Single Request per screen • JSON is template based • Updatable on server { ttype: nut1, time: 298349823, header: “Wow, that is pretty cool”, ....... ...... footer: “shared by Kiran Prasad”, id: 1298398127, }
iOSJS/HTML + Native AndroidNative Mobile Web JS/HTML OtherWrap JS/HTML Screen based REST API Mobile Server (node.js + MongoDB) Domain REST API LinkedIn Platform
iOS • Native for all infinite lists • Native for Window Manager • JS/HTML for all screens that are detail views (70% of App today) • Per screen choice for the stuff in the middle • Async JS/iOS Bridge
iOSJS/HTML + Native AndroidNative Mobile Web JS/HTML OtherWrap JS/HTML Screen based REST API Mobile Server (node.js + MongoDB) Domain REST API LinkedIn Platform
Android • Native for all the screens • WebView for 20% of screens • Moving towards more HTML5 • Contacts locally stored but rest only in memory cache
iOSJS/HTML + Native AndroidNative Mobile Web JS/HTML OtherWrap JS/HTML Screen based REST API Mobile Server (node.js + MongoDB) Domain REST API LinkedIn Platform
Mobile Web • Backbone for MVC • Underscore for utils • Zapto for DOM Manipulation • Modified iScroll for Scrolling • LocalStorage for personal Cache • SASS for CSS • Closure for compiling • Hash based Loader
Test • Automation: Vows, Robotium, Selenium, FoneMonkey, GHUnit • Hudson for build management • Internal Tool for Layout Testing • PhantomJS based Tool for Performance • Bug Bash + 2 Week Demos • 2 Week Team Demo
Deploy / Monitor • Enterprise Build available to employees • Ship everything 2 times a week • Apps and Server Deploy independently • 2 Week Bake for Big Stuff • Keynote for Performance and Availability monitoring • DeviceAnywhere for compatibility testing • Internal monitoring for QPS, Uptime, etc • Client Crash Log Metrics tracked daily
Interaction vs Visual • Designing a house’s floorplan • Focus on Rooms, Doors and Hallways • Stay away from Paint, Furniture and Carpet • Has & Does for each screen • Black & White then add color
Search, Compose, Room Navigation Stream You Inbox Following Notifications Breadth < 4 Depth < 3
Adjust for App Platform • On Screen Back vs Hardware Back • Up vs Back / Stacks vs Pages • Pull To Refresh vs Button Refresh • Settings • Visual Design
Mobile WebEnter the house • SEO • Email • Organic