Talking about how to build smart design and architecture for app development. Let your app can easy develop and deploy components on your app. And more topic of version control and quality improvement.
5. Personal works
NewYork Times - Best Top 10 photography app
App store Top 2 paid app in US
App store Top 40 in world
Best recommended app in app review sites
18. Easy to present content
Benefit of UICollectionView
Flexible layout
Reuse cells
Memory management
Automatic updates
Waterfall or running water in nature
19. Easy to present content
Custom UICollectionView for production
UICollectionView
20. Easy to present content
Custom UICollectionView for production
UICollectionView
UICollectionReusableView
!
21. Easy to present content
Custom UICollectionView for production
UICollectionView
UICollectionReusableView
UICollectionViewCell
!
22. Easy to present content
Custom UICollectionView for production
UICollectionView
UICollectionReusableView
UICollectionViewCell
UICollectionViewLayout
Waterfall or running water in nature
25. Change once apply anywhere
The pain for change
Hard to sync with designer
Designer or PM always change
After change need to rewrite code
26. Challenge on Color
Design easy sync tool for designer
Design: I want red color background.
Developer: Sure!
self.backgroundColor = [UIColor redColor];
27. Challenge on Color
Design easy sync tool for designer
Design: I want #7b19a9 background.
Developer: What!?
!?
28. Challenge on Color
Design easy sync tool for designer
Design: I want Yahoo background.
Developer: Mom, I want go home. :(
#@*$!
29. Challenge on Color
Design easy sync tool for designer
Using Category to improve UIColor
+ (UIColor *)colorWithHexString:(NSString *)hexstring;
+ (UIColor *)colorWithHexNumber:(NSUInteger)hexNumber;
30. Challenge on Color
Design easy sync tool for designer
Management your theme color
+ (UIColor *)themeBackground;
+ (UIColor *)themeForeground;
+ (UIColor *)themeDisabled;
+ (UIColor *)themeFocus;
+ (UIColor *)themeHighlight;
+ (UIColor *)themeTitle;
+ (UIColor *)themeSubtitle;
31. Change once apply anywhere
Theme color management
You don’t need write import everywhere
.pch file is your friend
54. Why Version Control
Colleagues often break my code
Have critical bugs but I can’t fix it
Wanting different version (Free / Pro)
Customer told me previous change was better
55. Solutions for code change
Code management
Source code management
Git / SVN
3rd open source libraries
CocoaPods / Repo
56. Storyboard may make you CRAZY
Multiple developers work together
Easy to conflict
Hard to read and fix it
Wait a long time when open huge one
57. Storyboard may make you Crazy
Multiple developers work together
Split to smaller storyboard
58. Storyboard may make you Crazy
Multiple developers work together
Split to independent xib files
60. Test will not waste your time
Test can prove your code run well
Save lots of time to verify bugs
Find change problems immediately
Keep boring task away
67. Automation test
Implement automation test
UIATarget.onAlert = function onAlert(alert) {
var title = alert.name();
UIALogger.logWarning("Alert with title '" + title + "' encountered!");
UIATarget.localTarget().captureScreenWithName("alert_" + (new Date()).UTC());
return false;
}
for (var i = 0; i < 200; i++) {
// exposureSettingButton
checkInstanceExist(target.frontMostApp().mainWindow().buttons()[“exposure”].tap);
target.frontMostApp().mainWindow().buttons()[“exposure”].tap();
}
68. Automation test
Implement monkey test
if (times % 2 == 0) {
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT);
} else {
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPERIGHT);
}
if (times % 5 == 0) {
target.lockForDuration(5);
target.delay(2);
}
69. Location automated test
Implement location test
Location service is hard to test
Some developer will go out for test
74. Present your content
Use core data to cache data
Lazy loader provides smooth interaction
Use data model process you data
!
75. Core data
Benefit of core data
Easy way to implement data storage
Cache larger data from internet / log
Multiple thread is big challenge
Recommend MagicalRecord library
76. Lazy loader
Benefit of lazy loader
Lazy loader will not block UI thread
Implement heavy process when stop interaction
Using right format in app
Manage memory carefully
77. Data model
Benefit of data model
Part of MVC design pattern
Change data source will easier
Separate logic and data layer
Easy automated test and verify
79. Summary
We have learned in this session
Our design should be flexible and easy deployment
List view is good architecture for data presentation
Cache everything if you can
Put project in Version Control
Test will improve quality and saving time
85. Related sharing
MOPCON 2013 tech talk slide
http://www.slideshare.net/anistarsung/mopcon-share
86. More information
Anistar Sung
Yahoo Lead Engineer!
http://www.facebook.com/anistarsung
http://blog.riaproject.com
anistarsung@gmail.com
cfsung@yahoo-inc.com