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. 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. The View - “if you can see it”
● LISearchV3ViewController.xib
● LISearchT1Cell.xib
● LISearchT1CellHigh.xib
● LISearchT1CellUltraHigh.xib
● LISearchT2Cell.xib
● LISearchT2CellHigh.xib
● LISearchV2FilterButton.xib
6. MVC … try to think of it as VCM
1010010100
1010100101
0100101001
0100111011
1111010100
1101001010
0101010010
1010010100
TM
7.
8. 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
9. 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
14. 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. 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. 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. 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
24. Unit Testing
● SenTestCase
● LISearchV3JobScheduler
o LISearchV3ProductionJobScheduler.m
o LISearchV3TestJobScheduler.m
● OCMock
25. 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”);
}
26. Dependency Injection
// similar to an interface in Java
@protocol LISearchV3JobScheduler <NSObject>
- (void)enqueueOnMainThread:(void(^)())block;
@end
27. OCMock
#import "OCMock.h"
id op = [OCMockObject mockForClass:[LINetworkOperation class]];
NSDictionary *tag = @{@”key”: @”value”};
[(LINetworkOperation *)[[op stub] andReturnValue:OCMOCK_VALUE(tag)] tag];
30. 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