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
410
三大あいまい能力/Three ambiguous abilities
kwappa
1
130
My Generation 年配者がこの先生きのこるには/My Generation How elder engineers can survive
kwappa
3
5.7k
勝ちに不思議の勝ちあり、負けに不思議の負けあり/There is a mystery to win, but there is no mystery to lose
kwappa
0
210
伸び代だらけのチームに 伸びてもらうための施策100連発/100 measures to grow up a team with a lot of growth potential
kwappa
1
140
HIGH OUTPUT Infrastructure Engineering
kwappa
1
6
礼節とHRTと心理的安全性/Civility, HRT and Psychological Safety
kwappa
0
710
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
2
3.3k
デスマーチから身を守るたったひとつの方法
kwappa
2
6.8k
Other Decks in Technology
See All in Technology
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
250
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
140
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
.NET 9 のパフォーマンス改善
nenonaninu
0
500
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
Storage Browser for Amazon S3
miu_crescent
1
130
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
170
Featured
See All Featured
Optimizing for Happiness
mojombo
376
70k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Unsuck your backbone
ammeep
669
57k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Gamification - CAS2011
davidbonilla
80
5.1k
Scaling GitHub
holman
458
140k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Agile that works and the tools we love
rasmusluckow
328
21k
Optimising Largest Contentful Paint
csswizardry
33
3k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
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