Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Scalaで新規サービス作ってる話
Search
Naoki Aoyama - @aoiroaoino
October 13, 2023
Technology
2.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scalaで新規サービス作ってる話
Scalaで新規サービス作ってる話
2023/10/13
Scalaわいわい勉強会【東京】LT1
Naoki Aoyama - @aoiroaoino
October 13, 2023
More Decks by Naoki Aoyama - @aoiroaoino
See All by Naoki Aoyama - @aoiroaoino
EitherT_with_Future
aoiroaoino
3
2.9k
Refactoring Domain Objects with Scalafix
aoiroaoino
0
420
Re-architecting in GANMA!
aoiroaoino
2
5.1k
大変だよ、Tagless-final パターン
aoiroaoino
5
7.8k
Scala におけるモナドって何だろう?
aoiroaoino
6
6.7k
Scala における継続モナドの実装と活用
aoiroaoino
12
7k
Other Decks in Technology
See All in Technology
JSONataとAWS Step Functionsで目指すRuntimelessな世界
mu7889yoon
0
400
Minecraft JavaのMODをSwiftで作る
1mash0
0
190
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
180
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.5k
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
880
データ_AIの事業の勝敗をわけるもの
nek0128
1
470
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
120
Genieを崇めよ
kameitomohiro
0
170
AI時代、データエンジニアが一番おもろい
genshun9
0
680
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
25
17k
安心して変更できるWebフロントエンドの作り方
pirosikick
5
2.9k
beyond jj: config & tools ecosystem
indirect
0
5.8k
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
880
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
30 Presentation Tips
portentint
PRO
1
400
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
The Limits of Empathy - UXLibs8
cassininazir
1
680
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Transcript
Scalaで新規サービス作ってる話 2023/10/13 Scalaわいわい勉強会 Naoki Aoyama - @aoiroaoino
❖ Naoki Aoyama ❖ Twitter/GitHub: @aoiroaoino ❖ 実践Scala入門 共著者 ❖
Working: $ whoami
None
None
関数型プログラミング 大好きな人類猫が 新規サービスをゼロから 開発している話
None
None
None
バックエンドアプリケーションに Scala を採用 ❖ 言語(ランタイム)/ビルドツール ➢ Scala 2.13.12 ➢ Java
(JDK) 17 ➢ sbt ❖ 主なライブラリ/フレームワーク ➢ Play Framework 2.9.0-RC3 ➢ Scalikejdbc 4.0.0 ➢ AWS SDK (Java) ➢ その他、連携サービスの SDK など ❖ ざっくり規模感 ➢ 数十の集約 ➢ 数十のユースケースクラス ➢ 数十のエンドポイント ➢ 数個のサービス(アプリケーションプロセス)
Tips: 関数型プログラミングや IO はどうしてる? ❖ FP: Cats 使ってます ➢ 目的の9割は
cats.data.Validated, NonEmptyList を使いたかったから ➢ ごく一部、cats.data.EitherT を採用 ▪ Future[Either[E, A]] を for 式でうまく扱うため ▪ 基本的には public メソッドのシグネチャに登場させないルール ➢ ごく一部、cats.data.ContT を採用 ▪ ただし、Controller での処理を合成/ハンドリングするくらい ❖ IO: scala.concurrent.Future 使ってます ➢ Scala 標準ライブラリにあること、 Play Framework との親和性を優先 ➢ 3rd party 製よりも学習コストの低さや中長期的なメンテナンス性も考慮
Tips: 他にも色々こだわってます ❖ フロントエンドアプリケーション ➢ React w/ TypeScript ➢ Next.js
❖ 設計、アーキテクチャ、プロジェクト構成 ➢ Domain Driven Design (DDD) ➢ Event-driven architecture ➢ Modular Monolith ❖ 継続的デリバリー、開発サイクル ➢ ほぼ毎日定期リリース ➢ トランクベース開発、 GitOps ➢ ほぼスクラム、ステークホルダー大集合のスプリントレビュー会
全然モナモナしていない?🤔
モナモナ => ワイワイ ※ワイワイするためにモナモナが必要の意味ではない
Scala の優位性を再考した ❖ 表現力の高さ ➢ プログラミング言語そのものが多機能 ➢ 強力な静的型システム ❖ Better
Java + α ➢ 強力な標準ライブラリ/コレクション操作 ➢ 様々な Java 資産との親和性 ❖ ほぼ公式で提供される Lint ツール群 ➢ Scalafix, Scalafmt
目指すはビジネスインパクト、速度、品質の全部取り ❖ 速く作りたい、気軽に変更したい、そして品質は妥協しない ➢ 認知負荷や学習コストを極力下げる為の技術選定 ➢ Scalafix, Scalafmt を用いてレビューコストの低減 ❖
学習コスト、オンボーディング工数の削減 ➢ DDD やアーキテクチャと関連づけられた命名規則 ➢ 一貫した一覧性の高いパッケージ構成など ➢ ただし、まだ体験した人はいない ...体験したい方います?
技術的チャレンジ ≠ 簡単な課題を難しく解く ※関数型プログラミングや過去の取り組みが簡単な課題を難しく解いていたという主張ではない
複雑な業務課題をできるだけ 簡潔に、素早く、継続的に 解決していきたい
その武器に Scala を選んだ \\\💪('ω'💪) ///
まとめ ❖ 新サービス「Scalebase ペイメント」を Scala で開発しています ❖ Better Java +
α で Scala の良さを再考し最高の開発したい ❖ 今後も技術トピック公開していくよ、お楽しみに(?) ❖ 興味ある方、お話ししませんか? 👉 お仕事でも Scala の話題でワイワイしようぜ!!