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
Padrino in Production
Search
Hiromu Shioya
January 13, 2013
Technology
8
23k
Padrino in Production
2012-01-13 TokyoRubyKaigi10 #tkrk10
"Padrino in Production"
by kwappa
Hiromu Shioya
January 13, 2013
Tweet
Share
More Decks by Hiromu Shioya
See All by Hiromu Shioya
My Generation 年配者がこの先生きのこるには (Developers CAREER Boost 2024 Edition)/My Generation How elder engineers can survive
kwappa
3
500
三大あいまい能力/Three ambiguous abilities
kwappa
1
140
My Generation 年配者がこの先生きのこるには/My Generation How elder engineers can survive
kwappa
3
5.9k
勝ちに不思議の勝ちあり、負けに不思議の負けあり/There is a mystery to win, but there is no mystery to lose
kwappa
0
220
伸び代だらけのチームに 伸びてもらうための施策100連発/100 measures to grow up a team with a lot of growth potential
kwappa
1
150
HIGH OUTPUT Infrastructure Engineering
kwappa
1
9
礼節とHRTと心理的安全性/Civility, HRT and Psychological Safety
kwappa
0
720
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
2
3.4k
デスマーチから身を守るたったひとつの方法
kwappa
2
6.9k
Other Decks in Technology
See All in Technology
GeometryReaderやスクロールを用いた表現と紐解き方
fumiyasac0921
0
100
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
3
820
KMP with Crashlytics
sansantech
PRO
0
240
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
450
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
6
6.3k
あなたの知らないクラフトビールの世界
miura55
0
110
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
Goで実践するBFP
hiroyaterui
1
120
🌏丸い地球を効率的に平たくする 〜🗺️地図の幾何学とWeb地図技術〜
syotasasaki593876
0
140
Reactフレームワークプロダクトを モバイルアプリにして、もっと便利に。 ユーザに価値を届けよう。/React Framework with Capacitor
rdlabo
0
110
コロプラのオンボーディングを採用から語りたい
colopl
5
940
いま現場PMのあなたが、 経営と向き合うPMになるために 必要なこと、腹をくくること
hiro93n
9
7.2k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Documentation Writing (for coders)
carmenintech
67
4.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Done Done
chrislema
182
16k
Six Lessons from altMBA
skipperchong
27
3.6k
Facilitating Awesome Meetings
lara
51
6.2k
RailsConf 2023
tenderlove
29
970
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
The Invisible Side of Design
smashingmag
299
50k
Transcript
Padrino in Production 2013-01-13 TokyoRubyKaigi10 @kwappa / SHIOYA, Hiromu Framework
beyond Rails
Hello, #tkrk10
http:/ /www.kwappa.net/ kwappa SHIOYA, Hiromu
Presented by
Notice
Next Sunday is...
None
Second Birthday http:/ /amzn.to/kwappason-wishlist
that aside
Padrino in Production Framework beyond Rails
http://www.padrinorb.com/ Padrino
Agenda
Agenda 1. What’s Padrino?
Agenda 1. What’s Padrino? 2. Sub Application
Agenda 1. What’s Padrino? 2. Sub Application 3. Padrino or
Rails?
1. What’s Padrino?
Sinatra
Sinatra http://www.sinatrarb.com/ get '/hi' do "Hello World!" end
Sinatra
Sinatra Helpers Generaors Rake Tasks Console Admin Mailer Cache Sub
Application
Sinatra Helpers Generaors Rake Tasks Console Admin Mailer Cache Sub
Application
Buffet Style Development
Buffet Style Development
None
None
ʮҰาઌΏ͘3VCZʯ @udzura http://amzn.to/VYR35r
2. Sub Application
None
None
None
None
None
None
None
music.dwango.jp
music.dwango.jp music.animelo.jp
music.dwango.jp music.animelo.jp music.dwango.jp/melody
Using Application
Clients Backends
Clients Backends
Clients Backends
Clients Subapps
Clients Subapps
Clients Subapps dwangojp
Clients Subapps dwangojp jQuery Mobile Backbone
Clients Subapps dwangojp jQuery Mobile Backbone Ajax
Clients Subapps dwangojp API jQuery Mobile Backbone Ajax
Clients Subapps dwangojp API jQuery Mobile Backbone Ajax JSON
Clients Subapps animelo API jQuery Mobile Backbone Ajax JSON
Clients Subapps melody API jQuery Mobile Backbone Ajax JSON
Generating Application
% padrino g project tkrk10
tkrk10 ├── Gemfile ├── app │ ├── app.rb │ ├──
controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp % padrino g project tkrk10
tkrk10 ├── Gemfile ├── app │ ├── app.rb │ ├──
controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp
% padrino g app kuro_kaigi tkrk10 ├── Gemfile ├── app
│ ├── app.rb │ ├── controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp
% padrino g app kuro_kaigi tkrk10 ├── Gemfile ├── app
│ ├── app.rb │ ├── controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp ├── kurokaigi │ └── kurokaigi
% padrino g app kuro_kaigi tkrk10 ├── Gemfile ├── app
│ ├── app.rb │ ├── controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp ├── kurokaigi │ └── kurokaigi kurokaigi ├── app.rb ├── controllers ├── helpers └── views └── layouts
tkrk10 ├── Gemfile ├── app │ ├── app.rb │ ├──
controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp ├── kurokaigi │ └── kurokaigi kurokaigi ├── app.rb ├── controllers ├── helpers └── views └── layouts Common Bootstrap Config Models Libs
tkrk10 ├── Gemfile ├── app │ ├── app.rb │ ├──
controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp ├── kurokaigi │ └── kurokaigi kurokaigi ├── app.rb ├── controllers ├── helpers └── views └── layouts Exclusive Common Bootstrap Config Models Libs Public Dir Controllers Helpers Views
Mounting Application
% cat config/apps.rb Padrino.mount("Tkrk10").to('/')
% cat config/apps.rb Padrino.mount("Tkrk10").to('/') # mount to path # http://localhost/kurokaigi
Padrino.mount("KuroKaigi") .to("/kurokaigi")
% cat config/apps.rb Padrino.mount("Tkrk10").to('/') # mount to path # http://localhost/kurokaigi
Padrino.mount("KuroKaigi") .to("/kurokaigi") # mount to hostname # http://kurokaigi.example.com/ Padrino.mount("KuroKaigi") .to("/") .host("kurokaigi.example.com")
% cat config/apps.rb
% cat config/apps.rb # both path and host can be
used # http://example.com/kurokaigi Padrino.mount("KuroKaigi") .to("/kurokaigi") .host("example.com")
% cat config/apps.rb # both path and host can be
used # http://example.com/kurokaigi Padrino.mount("KuroKaigi") .to("/kurokaigi") .host("example.com") # also Regular expressions can be used # http://kurokaigi.{host_name} Padrino.mount("KuroKaigi") .to("/") .host(/kurokaigi\..*/)
music.dwango.jp music.animelo.jp music.dwango.jp/melody
Tips
tkrk10 ├── Gemfile ├── app │ ├── app.rb │ ├──
controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp ├── kurokaigi │ └── kurokaigi kurokaigi ├── app.rb ├── controllers ├── helpers └── views └── layouts Exclusive Common Bootstrap Config Models Libs Public Dir Controllers Helpers Views
tkrk10 ├── Gemfile ├── app │ ├── app.rb │ ├──
controllers │ ├── helpers │ └── views │ └── layouts ├── config ├── config.ru ├── log ├── public └── tmp ├── kurokaigi │ └── kurokaigi kurokaigi ├── app.rb ├── controllers ├── helpers └── views └── layouts Exclusive Common Bootstrap Config Models Libs Public Dir Controllers Helpers Views
Sharing Helpers and Conrollers
Sharing Helpers and Conrollers http://qa.atmarkit.co.jp/q/51
3. Padrino or Rails
Merit
Merit Simple but Expandable
Merit Simple but Expandable Lightweight
Merit Simple but Expandable Lightweight Sub Application
Demerit
Demerit Lack of Information
Demerit Lack of Information Conflict of Classname
Demerit Lack of Information Conflict of Classname Shortage of Engineer
దࡐదॴ Right Man in the Right Place
Conclusion
Padrino is...
Padrino is... Simple and Expandalbe
Padrino is... Simple and Expandalbe Sub Application is nice
Padrino is... Simple and Expandalbe Sub Application is nice Use
in the right place
Links The Elegant Ruby Web Framework - Padrino Ruby Web
Framework http:/ /www.padrinorb.com/ Padrino ͰૉఢͳΣϒ։ൃΛ - Padrino Ruby Web Framework http:/ /jp.padrinorb.com/ Rubyist Magazine - Sinatra ࠶ೖɺ Padrino / Rack / ͦͷઌͷԿ͔ http:/ /jp.rubyist.net/magazine/?0036-SinatraReintroduction Amazon.co.jpɿ WEB+DB PRESS Vol.69 http:/ /amzn.to/VYR35r λά padrino ͕͚ΒΕ࣭ͨ - QA@IT http:/ /qa.atmarkit.co.jp/q/tagged/padrino Padrino framework jp (Facebook Group) https:/ /www.facebook.com/groups/105007729664623 O'Reilly Japan - ೖ Sinatra http:/ /www.oreilly.co.jp/books/9784873115597/
Padrino in Production Framework beyond Rails Thank you for listening!
2013-01-13 TokyoRubyKaigi10 @kwappa / SHIOYA, Hiromu