Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Source Code Generator for Team Development/code...
Search
Taketo Yoshida
August 08, 2017
Programming
0
1.6k
Source Code Generator for Team Development/code-generator-for-team-development
Otemachi.swift x Kyobashi.swift #01
Taketo Yoshida
August 08, 2017
Tweet
Share
More Decks by Taketo Yoshida
See All by Taketo Yoshida
Beautiful Japanese line break for the Web
tamanyan
1
390
新しい画像フォーマットHEIFを 用いたiOSアプリの通信量削減/iosdc-heif
tamanyan
9
6.5k
How to Design Great Alerts/how-to-design-great-alerts
tamanyan
0
580
iOSエンジニアがReact-Nativeに触れてみた/ios-developer-react-native
tamanyan
0
450
フォーシームのスピン量とその効果/the-effect-of-fourseam-fastball-spin-rate
tamanyan
1
880
Objective-CからSwift移行を始めて感じた事/ObjC-to-Swift
tamanyan
1
1.5k
Modern and Practical Networking in Swift
tamanyan
2
750
まだJPEGで消耗してるの?/iOSDC-Reject-Conference
tamanyan
0
3k
SwiftでWebPを使ってみた/melon-swift-webp
tamanyan
1
1.4k
Other Decks in Programming
See All in Programming
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
140
Return of the Full-Stack Developer
simas
PRO
1
320
아직도 SOLID 를 '글'로만 알고 계신가요?
sh1mj1
0
360
Devin , 正しい付き合い方と使い方 / Living and Working with Devin
yukinagae
3
700
SideKiqでジョブが二重起動した事象を深堀りしました
t_hatachi
0
240
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
450
PsySHから紐解くREPLの仕組み
muno92
PRO
1
530
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
490
DomainException と Result 型で作る型安全なエラーハンドリング
karszawa
0
720
gen_statem - OTP's Unsung Hero
whatyouhide
0
110
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
280
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
130
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
69
4.7k
The Language of Interfaces
destraynor
157
24k
Gamification - CAS2011
davidbonilla
81
5.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
51
2.4k
Site-Speed That Sticks
csswizardry
4
450
Building Adaptive Systems
keathley
41
2.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Designing for humans not robots
tammielis
251
25k
Making Projects Easy
brettharned
116
6.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Transcript
4PVSDF$PEF(FOFSBUPS GPS5FBN%FWFMPQNFOU 5BLFUP:PTIJEB 0UFNBDIJTXJGUY,ZPCBTIJTXJGU
5BLFUP:PTIJEB J04%FWFMPQFS!/JLLFJ فٗꅿ椔⚾ծة؎桬㕂" !5BNB0CKFDU !UBNBOZBO J04%$ד涫㠡׃תׅ )&*'חאְג
.Z8PSLT
5-%3 4UBOEBSEJ[FZPVSBSDIJUFDUVSFPGBOBQQMJDBUJPOJOZPVSUFBN 4PVSDF$PEF(FOFSBUPSIFMQTPVUXJUIDPEFTUBOEBSEJ[BUJPO %FNP
5FBN%FWFMPQNFOUJT%JDVMU
4UBOEBSEJ[FZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF ,FFQTPVSDFDPEFDMFBO )PXUPJOWJUFOFXDPNFS
4UBOEBSEJ[FZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF ,FFQTPVSDFDPEFDMFBO )PXUPJOWJUFOFXDPNFS
)PXUP4UBOEBSEJ[F ZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF
4PVSDF$PEF(FOFSBUPS
(FOFSBNCB 4PVSDF$PEF(FOFSBUPSXPSLJOHXJUI9DPEF %FTJHOFEUPHFOFSBUF7*1&3NPEVMFT &BTZUPDVTUPNJ[F
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<Bool> { get } var hasError: Driver<Bool> { 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<Bool> { get } var hasError: Driver<Bool> { get } }
5IF&FDUPGVTJOH(FOFSBNCB 3FEVDFUIFSJTLPGPSJHJOBMJNQMFNFOUBUJPO %POUOFFEUPXSJUFDPNNPODPEF "VUPNBUJDBMMZBEETPVSDFDPEFNPEVMFTJOUPZPVS9DPEF1SPKFDU
6TF$BTFJO/JLLFJ
5IF"SDIJUFDUVSFPG/JLLFJ"QQ .77. 3Y4XJGU 7*1&38JSFGSBNF $POTUSVDUPS*OKFDUJPO &ODBQTVMBUFTB6TF$BTFPSB'VODUJPOBMJUZBT.PEVMF
$MBTTFT .PEVMFT "SUJDMF-JTU /JLLFJ $PNNPO 4FBSDI -PHJO &ODBQTVMBUFTB6TF$BTFPSB'VODUJPOBMJUZBT.PEVMF 6TF$BTFPS'VODUJPOBMJUZ
7JFX "SUJDMF-JTU 7JFX.PEFM -BZFSTJOBNPEVMF .PEFM 8JSFGSBNF #VJMEFS
.Z1SPKFDU(FOFSBNCB5FNQMBUF
view_model.swift.liquid protocol {{ module_info.name }}ViewModel: class { /** Output
Definition of ViewModel */ var isLoading: Driver<Bool> { get } var hasError: Driver<Bool> { get } var toastMessage: Driver<String> { get } /** Input Definition of ViewModel */ }
view_model.swift.liquid final class {{ module_info.name }}ViewModelImpl: {{ module_info.name }}ViewModel
{ let disposeBag = DisposeBag() // output let isLoading: Driver<Bool> let hasError: Driver<Bool> let toastMessage: Driver<String> // 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()) } }
%FNP
4VNNBSZ *UTEJDVMUUPTUBOEBSEJ[FZPVSBSDIJUFDUVSFBOEDPEJOHTUZMF (FOFSBNCBIFMQTPVUXJUIDPEFTUBOEBSEJ[BUJPOJOBUFBN -JOUFSUPPMT DPEJOHTUZMFHVJEFBOEDPEFSFWJFXBSFBMTPFFDUJWF
TOJLLFJDPNTBJZP
5IBOLT%