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
320
新しい画像フォーマットHEIFを 用いたiOSアプリの通信量削減/iosdc-heif
tamanyan
9
6.4k
How to Design Great Alerts/how-to-design-great-alerts
tamanyan
0
560
iOSエンジニアがReact-Nativeに触れてみた/ios-developer-react-native
tamanyan
0
440
フォーシームのスピン量とその効果/the-effect-of-fourseam-fastball-spin-rate
tamanyan
1
850
Objective-CからSwift移行を始めて感じた事/ObjC-to-Swift
tamanyan
1
1.4k
Modern and Practical Networking in Swift
tamanyan
2
740
まだJPEGで消耗してるの?/iOSDC-Reject-Conference
tamanyan
0
3k
SwiftでWebPを使ってみた/melon-swift-webp
tamanyan
1
1.3k
Other Decks in Programming
See All in Programming
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.6k
Nuxt UI Pro、NuxtHub、Nuxt Scripts、Nuxtエコシステムをふんだんに利用して開発するコーポレートサイト@Vue Fes Japan 2024
shingangan
3
880
役立つログに取り組もう
irof
26
8.6k
Identifying User Idenity
moro
6
7.7k
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
Realtime API 入門
riofujimon
0
100
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
490
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.3k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
130
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
23
11k
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
692
190k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
For a Future-Friendly Web
brad_frost
175
9.4k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Thoughts on Productivity
jonyablonski
67
4.3k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
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%