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
HanamiでB2B SaaSを開発・運用している話
Search
Yuta Tokitake
November 29, 2018
Programming
1
180
HanamiでB2B SaaSを開発・運用している話
- HanamiでB2B SaaSのJSON APIを開発してます
- クラスごとに責務を明確化した書き方ができて保守性に優れます
- マルチデータベースで利用しようと思うとちょっとつらいです
Yuta Tokitake
November 29, 2018
Tweet
Share
More Decks by Yuta Tokitake
See All by Yuta Tokitake
実際のところHanamiってどうなんですか?という話
tokichie
2
1.7k
リーガルテックを支えるアーキテクチャ
tokichie
0
6.9k
Other Decks in Programming
See All in Programming
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
280
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
910
Java on Azure で LangGraph!
kohei3110
0
160
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
1.9k
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.5k
從零到一:搭建你的第一個 Observability 平台
blueswen
1
960
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
170
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
810
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu38
1
110
すべてのコンテキストを、 ユーザー価値に変える
applism118
1
270
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
A comprehensive view of refactoring
marabesi
0
970
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Automating Front-end Workflow
addyosmani
1370
200k
How GitHub (no longer) Works
holman
314
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
43
2.4k
Building Adaptive Systems
keathley
43
2.6k
Practical Orchestrator
shlominoach
188
11k
KATA
mclloyd
29
14k
Visualization
eitanlees
146
16k
Transcript
HanamiB2B SaaS 2018/11/29 #startuptech vol.1
• Hanami " • rack, Rails
• Hanami ! # • Hanami view
@tokichie_riyu LegalForce CTO ex-DeNA RubyTypeScript
Chief Tsuri Officer
LegalForce 2017 4 LegalTech B2B SaaS 8 4
LegalForce https://www.legalforce.co.jp
Powered by Hanami
Hanami • RubyWeb • • Rails
Hanami Clean Architecture • #% "$ Monolith First
• Monolith !"
Hanami • !#"
• Rails Sinatra • Rails
Hanami Production Ready • Rails
rack Action Interactor Repository MySQL InteractorResult Entity response params
validated params API call
Action • Rails Controller • class • Request
Interactor !
Action • rack app class Foo include Web::Action def call(params)
self.status = 201 self.body = ‘Hello’ self.headers.merge!({ 'X-Custom' => 'OK' }) end end
Interactor • $ • ! # • def call(*)"%
Interactor class AddBook include Hanami::Interactor expose :book def call(params) @book
= execute_something(params) end end • callInteractorResult
Repository • • API •
Repository ActiveRecord books = Book.where(author: ‘JK Rowling’) .order(created_at: :desc) !
# " " • view! ↑ …
Repository Hanami class BookRepository def where_by(author:) books.where(author: author).order { created_at.desc
} end end ! " " !
DB • LegalForce • 11
DB • Hanami::Repository DB ↓ ORMROM
Ruby Object Mapper • Hanami::Repository • HanamiORM
DB • ORM Hanami
↓ rake Sequel::Migration
Amazon ECR
Hanami • #
• app !' Vanilla Ruby • Rails core_ext% • &(Hanami::Utils "$
• Hanami • DB ⚡
Hanami