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
frourioがとりあえずすごかった話
Search
Kurogoma4D
December 20, 2020
Programming
0
700
frourioがとりあえずすごかった話
Kurogoma4D
December 20, 2020
Tweet
Share
More Decks by Kurogoma4D
See All by Kurogoma4D
2019-12-08 学生LT in Tokyo
kurogoma4d
0
680
初参加なので就活の話をします
kurogoma4d
1
350
Other Decks in Programming
See All in Programming
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
41
15k
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
550
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
890
定理証明プラットフォーム lapisla.net
abap34
1
1.7k
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
200
Immutable ActiveRecord
megane42
0
130
チームリードになって変わったこと
isaka1022
0
190
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
Featured
See All Featured
Unsuck your backbone
ammeep
669
57k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
YesSQL, Process and Tooling at Scale
rocio
171
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Thoughts on Productivity
jonyablonski
69
4.5k
Faster Mobile Websites
deanohume
306
31k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
The Language of Interfaces
destraynor
156
24k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
950
Transcript
frourioが とりあえずすごかった話 Kurogoma4D
鈴木 崇史 / Kurogoma4D @Krgm4D 木更津高専出身 Flutterメインのモバイルアプリエンジニア 一人暮らし,エアコンしかなくて足元が寒いです
✗ 業務の話 ✗ Flutterの話
ある日友人が言ってたこと • メモ帳にテンプレ的な項目が設定できて • 後から項目が追加できて • すでにあるメモに追加した項目が 反映される そんなメモ帳ほしいなぁ
※要約
None
None
何を使ったか
https://frourio.io/
frourio is 何 • “Fast and type-safe full stack framework,
for TypeScript” • 早い話Ruby on RailsのTypeScript版
prisma + aspidaがすごい! ORM HTTPクライアント 形を共有
schema.prisma にスキーマを定義して `prisma generate` すると node_modules/配下に型が作られる これ
aspida側 aspidaのリクエスト/レスポンス型定義 (ルーティングはディレクトリ構成と同 じになる) GET /api/memos?post_id=1
prismaの型定義が使える
aspidaのコントローラー やってることはRoRの コントローラーと同じ
prismaでクエリを書く様子
サーバーサイドTS,良い…
ちなみにクライアントでは aspida用のSWR React Hook `useAspidaSWR` フックを使えば 型定義を参照することなくレスポンスの型をそのまま使える ※SWR(stale-while-revalidate)
: データフェッチ用のHook Next.jsではただ使うだけならクライアントサイドからリクエストが送れる便利なやつ https://swr.vercel.app/
快適
Thanks!