LinkedIn Mobile Search iPhone Architecture

790 views

Published on

This is a high level presentation of the LinkedIn mobile search page.

Published in: Internet
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
790
On SlideShare
0
From Embeds
0
Number of Embeds
22
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

LinkedIn Mobile Search iPhone Architecture

  1. 1. LinkedIn Mobile Search iPhone Architecture Dennis Byrne
  2. 2. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing
  3. 3. The Model - “if you can’t see it” ● Think nouns, not verbs ● LISearchV3Model.m o SearchData.m o NSArray o NSDictionary ● Ridiculously Good Looking
  4. 4. The View - “if you can see it” ● LISearchV3ViewController.xib ● LISearchT1Cell.xib ● LISearchT1CellHigh.xib ● LISearchT1CellUltraHigh.xib ● LISearchT2Cell.xib ● LISearchT2CellHigh.xib ● LISearchV2FilterButton.xib
  5. 5. The Controller ● LISearchV3ViewController.m ● Think verbs, not nouns ● Delegate Pattern ● Event Listeners ● Glue code ● Logic
  6. 6. MVC … try to think of it as VCM 1010010100 1010100101 0100101001 0100111011 1111010100 1101001010 0101010010 1010010100 TM
  7. 7. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing
  8. 8. Retrieval Data Sources ● Local Cache o Core Data o SQLite ● Typeahead o phone-fe o Typeahead Restli server ● Federated Search o phone-fe o Federated Search Restli server
  9. 9. Retrieval - Core Data
  10. 10. Retrieval - Remote Results ? ?
  11. 11. Retrieval - Threading Model ● Everything is on the main thread ● Except … o Core Data retrieval o Core Data callbacks o HTTP requests
  12. 12. Retrieval Controller phone-fe
  13. 13. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing
  14. 14. Cell Construction - Builder Pattern ● LISearchV3UITableViewCellBuilder.m
  15. 15. Cell Builder Retrieval Controller phone-fe
  16. 16. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing
  17. 17. Metrics ● LISearchV3Metrics.m ● Page Views & Actions ● Performance o First o Second o Third o Platform  iPhone  android  touch web
  18. 18. Cell Builder Metrics LPTimer Retrieval Controller Perf phone-fe
  19. 19. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing
  20. 20. Full Screen Scrolling
  21. 21. Cell Builder Full Screen Scrolling Metrics LPTimer Retrieval Controller Perf phone-fe
  22. 22. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing
  23. 23. Unit Testing ● SenTestCase ● LISearchV3JobScheduler o LISearchV3ProductionJobScheduler.m o LISearchV3TestJobScheduler.m ● OCMock
  24. 24. SenTest … similar to JUnit < 4.0 -(void)setUp { } -(void)testSomething { STAssertEquals(YES, NO, @"msg here"); STAssertEqualsWithAccuracy(1.0, 1.2, 0.1, @””); STFail(@”msg here”); }
  25. 25. Dependency Injection // similar to an interface in Java @protocol LISearchV3JobScheduler <NSObject> - (void)enqueueOnMainThread:(void(^)())block; @end
  26. 26. OCMock #import "OCMock.h" id op = [OCMockObject mockForClass:[LINetworkOperation class]]; NSDictionary *tag = @{@”key”: @”value”}; [(LINetworkOperation *)[[op stub] andReturnValue:OCMOCK_VALUE(tag)] tag];
  27. 27. Cell Builder Full Screen Scrolling Metrics LPTimer Retrieval Controller Perf phone-fe Job Scheduler
  28. 28. The Napkin Test
  29. 29. Agenda ● Model View Controller Pattern ● Retrieval o Core Data o Typeahead o Federated Search ● Cell construction & the Builder pattern ● Metrics ● Full Screen Scrolling ● Unit Testing

×