Slide 1

Slide 1 text

ʰλοϓϧ஀ੜʱͷίʔσΟϯάن໿ ͱ ݕ౼தͷΞʔΩςΫνϟ

Slide 2

Slide 2 text

Profile - 2014ʹ৽ଔೖࣾ - 2014-2017 ৽نΛ͍Ζ͍Ζ(Unity/Android/iOS) - 2017೥3݄ʹʰλοϓϧ஀ੜʱʹJOIN (iOS) sasaki tomohiro

Slide 3

Slide 3 text

ίʔσΟϯάن໿

Slide 4

Slide 4 text

ϓϧϦΫग़͠·ͨ͠ʔ JOINͨ͠ͱ͖

Slide 5

Slide 5 text

ϓϧϦΫग़͠·ͨ͠ʔ JOINͨ͠ͱ͖

Slide 6

Slide 6 text

ϓϧϦΫग़͠·ͨ͠ʔ JOINͨ͠ͱ͖ ͋ɺίʔσΟϯάن໿ͬͯ͋Γ·͔͢ʁ

Slide 7

Slide 7 text

ϓϧϦΫग़͠·ͨ͠ʔ JOINͨ͠ͱ͖ ͋ɺίʔσΟϯάن໿ͬͯ͋Γ·͔͢ʁ Α͠ʂ࡞Ζ͏ʂʘ(^o^)ʗ

Slide 8

Slide 8 text

Survey - Github https://github.com/github/swift-style-guide - eureka https://github.com/eure/swift-style-guide/blob/master/README_jp.md - ϦΫϧʔτϥΠϑελΠϧ https://github.com/recruit-lifestyle/swift-style-guide - εϚʔτςοΫɾϕϯνϟʔζ https://github.com/SmartTechVentures/swift-style-guide - Wantedly http://qiita.com/susieyy/items/f71435cc962e70d81b37

Slide 9

Slide 9 text

- ࣗݾຬͷίʔσΟϯάن໿ʹ͠ͳ͍ - ϝϯόʔ͕ࠔ͍ͬͯΔ͜ͱΛղܾ͢Δ Important

Slide 10

Slide 10 text

How ॻ͖ํΛ೰ΜͰ͍Δ Օॴͷऩू ٞ࿦ υΩϡϝϯτ࡞੒ ڞ༗ = Trello

Slide 11

Slide 11 text

How

Slide 12

Slide 12 text

ίʔσΟϯάن໿Λ঺հ

Slide 13

Slide 13 text

ΦϓγϣφϧܕͷnilνΣοΫ Ͳ͏͢Δʁ if let _ = optionalObject { } if optionalObject != nil { }

Slide 14

Slide 14 text

ΦϓγϣφϧܕͷnilνΣοΫ Ͳ͏͢Δʁ if let _ = optionalObject { } if optionalObject != nil { }

Slide 15

Slide 15 text

[weak self]ͷguard letͷself Ͳ͏͢Δʁ guard let `self` = self else { return } guard let wSelf = self else { return } guard let me = self else { return }

Slide 16

Slide 16 text

[weak self]ͷguard letͷself Ͳ͏͢Δʁ guard let `self` = self else { return } guard let wSelf = self else { return } guard let me = self else { return }

Slide 17

Slide 17 text

ܕਪ࿦Ͳ͏͢Δʁ // Good let title = “Tapple” // Bad let title: String = “Tapple” // Good let groups = [String]() // Bad let groups: [String] = [] let groups: [String] = [String]() // Good let score = CGFloat(0) // Bad let score: CGFloat = 0 ࢖͏ʂ

Slide 18

Slide 18 text

array/dictionary͸ܕΛॻ͍ͨํ͕
 Ϗϧυ͕ૣ͍Β͍͔͠Β͠·ͤΜ͔ʁ ͦ͏͠Α͏ʂ // Good let title = “Tapple” // Bad let title: String = “Tapple” // Good let score = CGFloat(0) // Bad let score: CGFloat = 0 // Good let groups = [String]() // Bad let groups: [String] = [] let groups: [String] = [String]() array/dictionary͸ܕਪ࿦͠ͳ͍

Slide 19

Slide 19 text

IBOutletͷม਺ʹ֎͔ΒΞΫηε͠ͳ͍ͱ͖ ͸fileprivate͚ͭͨํ͕ྑ͘ͳ͍ʁ @IBOutlet fileprivate weak var title: UILabel! @IBOutlet weak var title: UILabel? - ͚ͭΔ - ଞͷΫϥε͔Βࢀর͢Δͱ͖͸ʁʹ͢Δ swift4Ͱprivateͷڍಈ͕มΘͬͨͷͰ ͜͜͸privateʹͳΓ·ͨ͠

Slide 20

Slide 20 text

ϓϩτίϧͷ࣮૷͸ผʑͷextension ʹ͠ͳ͍ʁ ͢Δ - ؔ࿈ϝιουͷՄಡੑͱϓϩτίϧ௥Ճͷ༰қ͞޲্ͷͨΊ - UITableViewDataSourceUITableViewDelegate΋όϥόϥ

Slide 21

Slide 21 text

໌ࣔతʹselfΛॻ͘ʁ - Ϋϩʔδϟʔ಺΍ύϥϝʔλͷিಥ͕͋Δͱ͖͚ͩ -Ϋϩʔδϟʔʹ͓͚ΔselfͷΩϟϓνϟϦϯά໨ཱ - ৑௕͕͞ແ͘ͳΔ ॻ͔ͳ͍ʂ

Slide 22

Slide 22 text

ܧঝ͠ͳ͍Ϋϥεʹ͸final͚ͭͨํ͕ ྑ͘ͳ͍ʁ - ܧঝͷਖ਼౰ͳඞཁੑ͕͋Δ৔߹ʹͷΈ͚ͭͳͯ͘΋ྑ͍ ͚ͭΔʂ

Slide 23

Slide 23 text

String΁ͷΩϟετͲ͏͠·͢ʁ return "\(score)" return String(score)

Slide 24

Slide 24 text

String΁ͷΩϟετͲ͏͠·͢ʁ return "\(score)" return String(score)

Slide 25

Slide 25 text

ίʔσΟϯάن໿ - ίʔυʹ౷Ұײ͕ͰΔ - ৽͘͠JOINͨ͠ਓ͕ࠔΒͳ͍ - ٞ࿦͕͠΍͍͢νʔϜʹͳͬͨ

Slide 26

Slide 26 text

Architecture

Slide 27

Slide 27 text

- Flux - CleanArchitecture Architecture

Slide 28

Slide 28 text

Guide to App Architecture Google Developers : https://developer.android.com/topic/libraries/architecture/guide.html

Slide 29

Slide 29 text

MVVM + Repositoryύλʔϯ Architecture

Slide 30

Slide 30 text

https://github.com/ssk5460/SwiftMVVMRepositoryPatternSample Github

Slide 31

Slide 31 text

MainViewController DetailViewController Mobile Data UserRepository update data observe/notify

Slide 32

Slide 32 text

UserRepositoryʹ͍ͭͯ final class UserRepository { static let shared = UserRepository() private let apiClient: ApiClientType private let bag = DisposeBag() let updatedUser: Observable private let _updatedUser = PublishSubject() init(apiClient: ApiClientType = UserApiClientMock()) { self.apiClient = apiClient self.updatedUser = _updatedUser } func updateUser(user: UserEntity) -> Observable { return apiClient.updateUser(user) .do(onNext: { [weak self] in self?._updatedUser.onNext($0) }) .flatMap { _ in Observable.empty() } .catchError { .just($0) } } } 7JFX.PEFM͸͜ΕΛ؂ࢹ

Slide 33

Slide 33 text

End