SlideShare a Scribd company logo
iOS团队开发实践经验
shengxuanwei
2015-06-29
流程
Process
Workflow
Begin With Milestone
• ⺫⽬目标
• 功能
• 责任
• 依赖
• ⻛风险
• MRD
One Feature, One Branch
5
开发就像打怪,怪物就是issues
重构永⽆无⽌止境
以Code Reviewer姿态对待你的代码
How to make reviewers life harder
• large commits
• reformatting of code
• lots of refactoring
• omit issue number when committing
http://kaczanowscy.pl/tomek/sites/default/files/2012_code_reviews.png
iOS Testing
http://neglectedpotential.com/wp-content/uploads/iOS-Testing-Mind-Map-1.2.png
规范
Specification
Specification
• 开发规范
• 设计⽂文档
• 接⼝口指南
Developer’s Guide
• Objective-C Style Guide
• Git Flow Spec
• Git Commit Spec
• Logging Spec
• ……
Git Flow Workflow
https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow
Telling Stories With Your Git History
• ⼀一个 commit 只做⼀一件事情,⽐比如⼀一个 feature,⼀一
个bugfix
• 每个 commit 的粒度不要太⼤大,⼤大型 feature 分解成
多个⼦子 feature 做多个 commit
• git push 之前在本地进⾏行 git rebase
• 每个 commit 需要撰写详尽的 commit message,相
关 issue 需要注明 issue number。关闭对应 issue,
需要注明 close #issue-number.
https://about.futurelearn.com/blog/telling-stories-with-your-git-history/
– Martin Fowler
“Code as Documentation”
架构
Architecture
MVC
MEGA-ViewController
http://code.oursky.com/viper-ios-architecture-beyond-mega-viewcontroller/
事件、通知、⺴⽹网络请求、UI显⽰示、业务逻辑、⽤用户输⼊入、数据正确性验证、内
存和⺴⽹网络条件检测,⾏行为统计,缓存,登录状态认证,⻚页⾯面切换...
Light View Controllers
• Move Domain Logic into the Model
• Move View Code into the View Layer
• Separate Out Data Source and Other Protocols
• Creating the Store Class
• Move Web Service Logic to the Model Layer
• Communication
http://www.objc.io/issues/1-view-controllers/lighter-view-controllers/
A little-monster-collection
http://code.oursky.com/viper-ios-architecture-beyond-mega-viewcontroller/
VIPER
Single Responsibility Principle
VIPER
• View (UserInterface)
• Presenter
• Interactor
• Entity
• Routing (Wireframe)
VIPER Checklist
• Views and view controllers receive user interactions and pass
them to Presenters for decision making
• Presenters contain the view logics and prepare content for display
and reacting to user inputs
• Presenters should not know about the existence of all UIViews
• Interactors contain business logics and they should be
independent of UI
• Entities are model objects only manipulated by Interactors
• Wireframe is the only place to define screen navigations and their
transition animations
Benefits of VIPER
• Easy to iterate on
• Collaboration friendly
• Separated out concerns
• Spec-ability
• Vipergen
Other Frameworks
• AOP (Aspects)
• DeepLink (DeepLinkKit)
• AutoLayout (Masonry)
• Logging (CocoaLumberjack)
⼯工具
Tool
抛弃SVN,拥抱Git
• Branching and Merging
• Small and Fast
• Distributed
• Data Assurance
• The Staging Area
GitLab
• Activity Stream
• Issue Tracking
• Git Powered Wiki
• Code Review
• Git Hooks
• Services
Choosing the Right IDE
• Performance
• Editor (syntax highlight, autocomplete)
• Extensions
• Refactoring
• Vi mode
Linter
• uncrustify
• OCLint
• FBInfer
CocoaPods
• Dependency Manager
• Podfile
• Podspec
• Submodule
Other Tools
• Dash
• Reveal
• Charles
• Paw
• SmartGit
• Beyond Compare
规划
Planning
One Month
• VIPERing
• Deep Link
• Code Quality
Three Month
• Performance (UI, Network)
• Crash
• Unit Test
• iOS 9
• iPad Universal
Six Month
• Modularization
• CI
• UI Automation
• Swift
The End.
References
• http://twasink.net/2004/05/17/refactoring-vs-re-architecting-vs-redesign-vs-
rewriting/
• http://mp.weixin.qq.com/s?__biz=MjM5NTIyNTUyMQ%3D
%3D&idx=1&mid=208090692&sn=ebcac43c3af9d07a9916bcfeca3bbf2a
• https://netguru.co/blog/a-quick-guide-to-peer-code-review
• https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-
workflow
• https://about.futurelearn.com/blog/telling-stories-with-your-git-history/
• http://code.oursky.com/viper-ios-architecture-beyond-mega-viewcontroller/
• https://www.youtube.com/watch?v=4XpnKHJAok8
• http://product.hubspot.com/blog/architecting-a-large-ios-app-with-cocoapods

More Related Content

PPT
A Tour of Swagger for APIs
PDF
JEE Conf 2015: Less JS!
PPTX
Feature flag launchdarkly
PDF
Design Driven API Development
PDF
Microservice Approach for Web Development with Micro Frontends
PPTX
Argentesting 2017 - Workshop Webdriver.io
PPTX
SofiaDev L9 Source Control Management
PPTX
Dev Ops Geek Fest: Automating the ForgeRock Platform
A Tour of Swagger for APIs
JEE Conf 2015: Less JS!
Feature flag launchdarkly
Design Driven API Development
Microservice Approach for Web Development with Micro Frontends
Argentesting 2017 - Workshop Webdriver.io
SofiaDev L9 Source Control Management
Dev Ops Geek Fest: Automating the ForgeRock Platform

What's hot (19)

PPTX
Extending Arquillian graphene
PPTX
Codestrong 2012 breakout session alloy (mvc) app framework overview
PDF
WSO2Con USA 2015: End-to-end Microservice Architecture with WSO2 Identity Ser...
PPTX
Micro Front Ends for Micro Services using Oracle JET
PDF
Building Salesforce1 Communities Apps with React Native and Flux
PPTX
Swagger 2.0 and Model-driven APIs
PPTX
Swagger - Making REST APIs friendlier
KEY
Single Page Applications - Desert Code Camp 2012
PPTX
Understanding how to use Swagger and its tools
PPTX
SUGCON 2015 Modelling
PDF
A guide to hiring a great developer to build your first app (redacted version)
PPTX
Agile .NET Development with BDD and Continuous Integration
PPTX
Writer APIs in Java faster with Swagger Inflector
PDF
How to build a Whatsapp clone in 2 hours
PPTX
Swagger APIs for Humans and Robots (Gluecon)
PDF
Sahi Web Automation and Testing Tool
PDF
Swagger 2.0: Latest and Greatest
PDF
UI5con 2018: UI5 Evolution - The Core Changes
PPTX
Web application I have always dreamt of
Extending Arquillian graphene
Codestrong 2012 breakout session alloy (mvc) app framework overview
WSO2Con USA 2015: End-to-end Microservice Architecture with WSO2 Identity Ser...
Micro Front Ends for Micro Services using Oracle JET
Building Salesforce1 Communities Apps with React Native and Flux
Swagger 2.0 and Model-driven APIs
Swagger - Making REST APIs friendlier
Single Page Applications - Desert Code Camp 2012
Understanding how to use Swagger and its tools
SUGCON 2015 Modelling
A guide to hiring a great developer to build your first app (redacted version)
Agile .NET Development with BDD and Continuous Integration
Writer APIs in Java faster with Swagger Inflector
How to build a Whatsapp clone in 2 hours
Swagger APIs for Humans and Robots (Gluecon)
Sahi Web Automation and Testing Tool
Swagger 2.0: Latest and Greatest
UI5con 2018: UI5 Evolution - The Core Changes
Web application I have always dreamt of
Ad

Viewers also liked (6)

PDF
下一个读代码的人就是你
PDF
WireMock 起飞手册
PPTX
Windows App development for iOS, Android developer
PDF
人人车二手车 iOS 客户端架构演进史
PDF
MVVM on iOS
PPTX
Training on iOS app development - Samesh Swongamikha & Neetin Sharma
下一个读代码的人就是你
WireMock 起飞手册
Windows App development for iOS, Android developer
人人车二手车 iOS 客户端架构演进史
MVVM on iOS
Training on iOS app development - Samesh Swongamikha & Neetin Sharma
Ad

Similar to iOS团队开发实践经验 (20)

PDF
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
PPTX
Introductie Visual Studio ALM 2012
PPTX
Introductie Visual Studio ALM 2012
PPTX
Azure functions
PDF
Is it possible to write cross-native apps in 2020 ?
PPTX
Spring
PPTX
DevOps in the Microsoft world part 1
PDF
TejaSoft Code Audit Case Studies
PPTX
Serverless Computing with Azure Functions and Xamarin
PPTX
Visual studio 2012 - What's in it for me?
PDF
12 Factor Scala
PPTX
Vincent biret azure functions and flow (toronto)
PPTX
Vincent biret azure functions and flow (ottawa)
PPTX
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
PDF
JavaOne 2015: 12 Factor App
PDF
Incremental deployment of new features
PDF
12-factor-jruby
PDF
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
PPTX
Getting started with Office 365 SharePoint 2010 online development
PDF
Microsoft power point automation-opensourcetestingtools_matrix-1
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
Azure functions
Is it possible to write cross-native apps in 2020 ?
Spring
DevOps in the Microsoft world part 1
TejaSoft Code Audit Case Studies
Serverless Computing with Azure Functions and Xamarin
Visual studio 2012 - What's in it for me?
12 Factor Scala
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (ottawa)
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
JavaOne 2015: 12 Factor App
Incremental deployment of new features
12-factor-jruby
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Getting started with Office 365 SharePoint 2010 online development
Microsoft power point automation-opensourcetestingtools_matrix-1

More from Jiyee Sheng (9)

PPTX
tree-sitter-objc-slides.pptx
PDF
我的键盘习惯 - 盛宣玮.pdf
PDF
如何高效工作
PDF
下一个读代码的人就是你
PDF
Mac - 推开程序员的另一扇窗
PDF
2013年京JS参会分享
PDF
一个顽强的bug修复经历
PDF
Using Shell & Mastering Shell
PDF
正则指引
tree-sitter-objc-slides.pptx
我的键盘习惯 - 盛宣玮.pdf
如何高效工作
下一个读代码的人就是你
Mac - 推开程序员的另一扇窗
2013年京JS参会分享
一个顽强的bug修复经历
Using Shell & Mastering Shell
正则指引

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Nekopoi APK 2025 free lastest update
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
top salesforce developer skills in 2025.pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
medical staffing services at VALiNTRY
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Introduction to Artificial Intelligence
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
System and Network Administration Chapter 2
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
history of c programming in notes for students .pptx
PPTX
CHAPTER 2 - PM Management and IT Context
ManageIQ - Sprint 268 Review - Slide Deck
Nekopoi APK 2025 free lastest update
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
top salesforce developer skills in 2025.pdf
ISO 45001 Occupational Health and Safety Management System
Operating system designcfffgfgggggggvggggggggg
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
medical staffing services at VALiNTRY
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Design an Analysis of Algorithms II-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Introduction to Artificial Intelligence
VVF-Customer-Presentation2025-Ver1.9.pptx
System and Network Administration Chapter 2
Upgrade and Innovation Strategies for SAP ERP Customers
history of c programming in notes for students .pptx
CHAPTER 2 - PM Management and IT Context

iOS团队开发实践经验