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
mf_cloud_expense_mobile_app_rearchitecture
Search
yuki shinohara
May 14, 2025
Programming
0
870
mf_cloud_expense_mobile_app_rearchitecture
yuki shinohara
May 14, 2025
Tweet
Share
More Decks by yuki shinohara
See All by yuki shinohara
Road to Swift 6
shino8rayu9
0
530
Other Decks in Programming
See All in Programming
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
1
270
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.6k
Is Xcode slowly dying out in 2025?
uetyo
1
280
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
130
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
120
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
2
13k
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
100
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
270
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
1
6k
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
120
Porting a visionOS App to Android XR
akkeylab
0
470
Goで作る、開発・CI環境
sin392
0
240
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Designing for Performance
lara
610
69k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
It's Worth the Effort
3n
185
28k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Six Lessons from altMBA
skipperchong
28
3.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Docker and Python
trallard
44
3.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Transcript
マネーフォワード クラウド経費 モバイルアプリのリアーキ テクチャをめぐる紆余曲折 2025/05/14
Introduction 篠原 裕貴 ・仕事: マネーフォワード クラウド経費 iOSエンジニア ・経歴: 地方公務員→英会話講師→iOSエンジニア
マネーフォワード クラウド経費
明細入力画面
None
None
課題
明細入力画面の課題 ❏ ViewControllerファイルのコードが1,900行+ ❏ テストカバレッジは0.8% ❏ ViewModelのファイルも1,900行+ ❏ テストカバレッジは20.6% ❏
新規機能追加の度に多くの時間を手動で動作確認が必須
その他の画面の課題 ❏ 大部分はReactorKitによりリファクタ済 ❏ Reducerのテストカバレッジは90%前後 ❏ しかしもうメンテされていない(最終更新日は 2022年1月) ❏ 依存コードが直接実装されてしまっている
❏ カメラ画面の呼び出し、写真アプリの呼び出し etc ❏ テストが書けない ❏ 毎回コンパイルに時間がかかる
当初
TCA https://github.com/pointfreeco/swift-composable-architecture
なぜTCAか ❏ テスト書きやすい ❏ ReactorKitに似てる ❏ Pay for Businessで利用実績があった
なぜTCAか ❏ テスト書きやすい ❏ ReactorKitに似てる ❏ Pay for Businessで利用実績があった
リファクタ開始 ❏ まずは新規画面をTCAを使って作成 ❏ ゆくゆくは明細入力画面→ReactorKitの画面をリファクタしていく
苦しくなってきた ❏ バージョンアップが多くしんどくなってきた ❏ 新規iOSエンジニアの学習コストが大きい ❏ 画面が大きくなるとコンパイルがうまく行かない ❏ おそらくもっとモジュール分けすべきだった
方向転換
基本に立ち返る ❏ 諸悪の根源はテストがない・書けないこと ❏ 明細入力画面をテストを書ける形にするべき ❏ ViewControllerとViewModelのコードを整理 ❏ 各種ロジックを別クラスに整理しテストを追加 ❏
依存コードをモジュールに分ける ❏ テストで依存コードをモックに置き換えられるようにする ❏ モジュールごとにコンパイルでき、開発スピードが上がる
テストで依存コードをモックに置き換えられるようにする/モジュールご とにコンパイルでき、開発スピードが上がる
先を見据える ❏ iOSエンジニアの採用は難しい ❏ TCAエンジニアの採用はもっと難しい ❏ サードパーティの利用メリット vs 学習コストやメンテナンスが止まるリスク
まとめ
まとめ ❏ 長い目で見て今はなるべく言語機能に沿った開発を進めて行く方針 ❏ それでもTCAは個人的には好きだし、個人的にはキャッチアップは続けていきたい
おわり