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
Rails-resource-routing-design-bootstrap(ja)
Search
MOROHASHI Kyosuke
July 23, 2012
Programming
4
2k
Rails-resource-routing-design-bootstrap(ja)
Sendagaya.rb#12での講演資料に口頭のまとめを追記したものです。
MOROHASHI Kyosuke
July 23, 2012
Tweet
Share
More Decks by MOROHASHI Kyosuke
See All by MOROHASHI Kyosuke
Identifying User Idenity
moro
6
9.3k
Simplicity on Rails -- RDB, REST and Ruby
moro
14
16k
ちょうどよい Rails E2E テスト/enough-good-rails-e2e-test
moro
5
2.3k
フレームワークを作らない方法/How NOT to build frameworks
moro
4
1k
全体がいい感じになるために、私たちRailsをホームにするWeb技術者ができること/let-our-whole-system-grow
moro
2
1.8k
フォームオブジェクトとの向き合い方/Grow Form Objects up
moro
1
1.9k
チームによるいきいきとしたソフトウェア開発/an-alive-team-grows-software
moro
3
3.3k
Web-E2E-Testing-from-Ruby
moro
5
490
Joyful user foundation restructuring with Ruby
moro
9
19k
Other Decks in Programming
See All in Programming
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
230
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.1k
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
270
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
530
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
260
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
180
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
150
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
2k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
330
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
290
みんなでプロポーザルを書いてみた
yuriko1211
0
150
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
300
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
15
2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Rails Girls Zürich Keynote
gr2m
93
13k
Navigating Team Friction
lara
183
14k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
360
A Modern Web Designer's Workflow
chriscoyier
693
190k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
505
140k
Transcript
पΊͷ Ϧιʔεઃܭ Eiwa System Management, Inc ॾڮګհ (@moro) 2012-07-23 #sendagaya.rb
http://amzn.to/rails3recipebook
http://tatsu-zine.com/books/cuke
·ͱΊ w3BJMTͷ63-ઃܭɺϦιʔεΛͲ͏ ݟग़͔͕͢ݤ w%#ςʔϒϧͱࣅΔ͜ͱ͋Δ͚Ͳඞͣ ͠ରԠ͠ͳ͍ wͺͬͱݟ͑ͳ͍Ϧιʔε୳͢ͷ͕؊ཁ wؔ࿈ΤϯςΟςΟ ྫregistrations wʮॲཧʯΛද͢Ϧιʔε ྫimports
ه
3BJMTͷϦιʔεઃܭ wSPVUFTSCΞϓϦέʔγϣϯ͕ఏڙ ͢ΔϦιʔεΛఆٛ͢Δɻ w·ͣΞϓϦέʔγϣϯ͕ѻ͏ใΛ ཧ͢Δͷ͕ઌɻ w͝ࢀߟhttp://togetter.com/li/341718
3BJMTYҎ߱ 3&45GVM wϦιʔεϢʔβ͕ѻ͍͍͢୯Ґʹ· ͱΊͨใ wˢ͜ΕΛ͍Ζ͍Ζ͍͡Δ͜ͱͰαʔϏ εΛ࣮ݱ͢Δͷ͕Ϩʔϧ wurl_forͱ͔fom_forͱ͔͍Ζ͍Ζ લఏʹͳͬͯΔ
ϦιʔεΛ͍͡Δͧ Ұཡ ୯Ұදࣔ ࡞ ߋ৽ আ GET /res index GET
/res/:id show POST /res create PUT /res/:id update DELETE /res/:id destroy
Πϕϯτ: ΄͛;͕ ݱࡏͷࢀՃऀҰཡ - alice - bob - charles ࢀՃొ͢Δ
͜Ε!!
ѻ͏ใ w·ͣɺը໘ʹඞཁͦ͏ͳใΛɺ%# ʹ֨ೲ͢Δํ๏Λߟ͑Α͏ wྫΠϕϯτʹొΞϓϦ
events users registrations 0..* 0..* 1 1 Event, has_many :users,
through: :registrations
•/events/42/add_users wΠϕϯτʹϢʔβΛՃ͢Δ •/events/42/registrations wΠϕϯτͷࢀՃొใΛ࡞Δ ؔ࿈ϦιʔεΛ࡞Δ
ϨίʔυʺϦιʔε wࣅ͍ͯΔ͜ͱ͋Δɻͱ͘ʹؔ࿈ςʔ ϒϧͱ͔ɻ wࣅ͍ͯͳ͍͜ͱ͋Δɻ࣮ΤϯςΟ ςΟΛ͍͡Δ߹ͱ͔ɻ
ͨͿΜlabelsผςʔϒϧ
ϨίʔυʺϦιʔε wԿΛݟͤΔ͔ɺͲ͏·ͱΊΔ͔ɺͱ͍ ͏ͷ6*ͷ࡞ΓͰஅ͢Δɻ wવɺͯ͢ͷςʔϒϧʹରԠ͢ΔϦ ιʔεఆٛͳͲෆཁ w3BJMT"ENJOͰΖ͏
SFTPVSDFTͷΞΫγϣϯୡ wͥΜͿΘͳͯ͘Α͍ wҰཡܥJOEFY w୯ମ$36%TIPX DSFBUF VQEBUF EFTUSPZ wOFX FEJU6*ͬΆ͍ͷ
Πϕϯτ: ΄͛;͕ ݱࡏͷࢀՃऀҰཡ - alice -bob - charles ࢀՃొ͢Δ POST
/events/42/registrations ·ͨ GET /events/42/registrations/new
όονॲཧ wτϥϯβΫγϣϯϦιʔεΛ࡞Δ wPOST /importsͰॲཧ։࢝ wGET /imports/42Ͱਐ݁ՌΛදࣔ
NFNCFSͱ DPMMFDUJPO wNFNCFSɺͦͷϦιʔεͷҰ෦ͩ ͚Λѻ͏ɻʮϝϯόมʯͷϝϯό wωετͨ͠SFTPVSDF ୯ ʹ͢Δ͜ ͱ͋Δ w/users/42/tokenͱ͔ wDPMMFDUJPOJOEFYͷ෦ू߹ɻ
·ͱΊ w3BJMTͷ63-ઃܭɺϦιʔεΛͲ͏ ݟग़͔͕͢ݤ w%#ςʔϒϧͱࣅΔ͜ͱ͋Δ͚Ͳඞͣ ͠ରԠ͠ͳ͍ wͺͬͱݟ͑ͳ͍Ϧιʔε୳͢ͷ͕؊ཁ wؔ࿈ΤϯςΟςΟ ྫregistrations wʮॲཧʯΛද͢Ϧιʔε ྫimports
ه