Slide 1

Slide 1 text

4PVSDF$PEF(FOFSBUPS GPS5FBN%FWFMPQNFOU 5BLFUP:PTIJEB 0UFNBDIJTXJGUY,ZPCBTIJTXJGU

Slide 2

Slide 2 text

5BLFUP:PTIJEB J04%FWFMPQFS!/JLLFJ فٗꅿ椔⚾ծة؎桬㕂" !5BNB0CKFDU !UBNBOZBO J04%$ד涫㠡׃תׅ )&*'חאְג

Slide 3

Slide 3 text

.Z8PSLT

Slide 4

Slide 4 text

5-%3 4UBOEBSEJ[FZPVSBSDIJUFDUVSFPGBOBQQMJDBUJPOJOZPVSUFBN 4PVSDF$PEF(FOFSBUPSIFMQTPVUXJUIDPEFTUBOEBSEJ[BUJPO %FNP

Slide 5

Slide 5 text

5FBN%FWFMPQNFOUJT%JDVMU

Slide 6

Slide 6 text

4UBOEBSEJ[FZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF ,FFQTPVSDFDPEFDMFBO )PXUPJOWJUFOFXDPNFS

Slide 7

Slide 7 text

4UBOEBSEJ[FZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF ,FFQTPVSDFDPEFDMFBO )PXUPJOWJUFOFXDPNFS

Slide 8

Slide 8 text

)PXUP4UBOEBSEJ[F ZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF

Slide 9

Slide 9 text

4PVSDF$PEF(FOFSBUPS

Slide 10

Slide 10 text

(FOFSBNCB 4PVSDF$PEF(FOFSBUPSXPSLJOHXJUI9DPEF %FTJHOFEUPHFOFSBUF7*1&3NPEVMFT &BTZUPDVTUPNJ[F

Slide 11

Slide 11 text

view_model.swift.liquid SomeViewModel.swift // // {{ module_info.file_name }} // {{ module_info.project_name }} // // Created by {{ developer.name }} on {{ date }}. // Copyright © {{ year }} {{ developer.company }}. // All rights reserved. // import Foundation import RxSwift import RxCocoa protocol {{ module_info.name }}ViewModel: class { var isLoading: Driver { get } var hasError: Driver { get } } // // SomeViewModelViewModel.swift // Nikkei // // Created by Taketo Yoshida on 23/02/2017. // Copyright © 2017 nikkei. // All rights reserved. // import Foundation import RxSwift import RxCocoa protocol SomeViewModel: class { var isLoading: Driver { get } var hasError: Driver { get } }

Slide 12

Slide 12 text

5IF&FDUPGVTJOH(FOFSBNCB 3FEVDFUIFSJTLPGPSJHJOBMJNQMFNFOUBUJPO %POUOFFEUPXSJUFDPNNPODPEF "VUPNBUJDBMMZBEETPVSDFDPEFNPEVMFTJOUPZPVS9DPEF1SPKFDU

Slide 13

Slide 13 text

6TF$BTFJO/JLLFJ

Slide 14

Slide 14 text

5IF"SDIJUFDUVSFPG/JLLFJ"QQ .77. 3Y4XJGU 7*1&38JSFGSBNF $POTUSVDUPS*OKFDUJPO &ODBQTVMBUFTB6TF$BTFPSB'VODUJPOBMJUZBT.PEVMF

Slide 15

Slide 15 text

$MBTTFT .PEVMFT "SUJDMF-JTU /JLLFJ $PNNPO 4FBSDI -PHJO &ODBQTVMBUFTB6TF$BTFPSB'VODUJPOBMJUZBT.PEVMF 6TF$BTFPS'VODUJPOBMJUZ

Slide 16

Slide 16 text

7JFX "SUJDMF-JTU 7JFX.PEFM -BZFSTJOBNPEVMF .PEFM 8JSFGSBNF #VJMEFS

Slide 17

Slide 17 text

.Z1SPKFDU(FOFSBNCB5FNQMBUF

Slide 18

Slide 18 text

view_model.swift.liquid protocol {{ module_info.name }}ViewModel: class { /** Output Definition of ViewModel */ var isLoading: Driver { get } var hasError: Driver { get } var toastMessage: Driver { get } /** Input Definition of ViewModel */ }

Slide 19

Slide 19 text

view_model.swift.liquid final class {{ module_info.name }}ViewModelImpl: {{ module_info.name }}ViewModel { let disposeBag = DisposeBag() // output let isLoading: Driver let hasError: Driver let toastMessage: Driver // input init(model: {{ module_info.name }}Model, wireframe: {{ module_info.name }}Wireframe, scheduler: SchedulerService = MainSchedulerService.shared) { self.isLoading = model.isLoading .asDriver(onErrorDriveWith: Driver.empty()) self.hasError = model.errors .map({ $0.isError }) .asDriver(onErrorDriveWith: Driver.empty()) self.toastMessage = model.errors .map({ $0.description }) .filterNil() .asDriver(onErrorDriveWith: Driver.empty()) } }

Slide 20

Slide 20 text

%FNP

Slide 21

Slide 21 text

4VNNBSZ *UTEJDVMUUPTUBOEBSEJ[FZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF (FOFSBNCBIFMQTPVUXJUIDPEFTUBOEBSEJ[BUJPOJOBUFBN -JOUFSUPPMT DPEJOHTUZMFHVJEFBOEDPEFSFWJFXBSFBMTPFFDUJWF

Slide 22

Slide 22 text

TOJLLFJDPNTBJZP

Slide 23

Slide 23 text

5IBOLT%