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
4
1.1k
三大あいまい能力/Three ambiguous abilities
kwappa
1
180
My Generation 年配者がこの先生きのこるには/My Generation How elder engineers can survive
kwappa
3
6.1k
勝ちに不思議の勝ちあり、負けに不思議の負けあり/There is a mystery to win, but there is no mystery to lose
kwappa
0
240
伸び代だらけのチームに 伸びてもらうための施策100連発/100 measures to grow up a team with a lot of growth potential
kwappa
1
170
HIGH OUTPUT Infrastructure Engineering
kwappa
1
19
礼節とHRTと心理的安全性/Civility, HRT and Psychological Safety
kwappa
0
750
エンジニアのキャリアをちょっと楽しくする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
どちらかだけじゃもったいないかも? ECSとEKSを適材適所で併用するメリット、運用課題とそれらの対応について
tk3fftk
2
240
EDRの検知の仕組みと検知回避について
chayakonanaika
12
5.2k
ABWG2024採択者が語るエンジニアとしての自分自身の見つけ方〜発信して、つながって、世界を広げていく〜
maimyyym
1
190
データベースの負荷を紐解く/untangle-the-database-load
emiki
2
540
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.7k
急成長する企業で作った、エンジニアが輝ける制度/ 20250227 Rinto Ikenoue
shift_evolve
0
180
フォーイット_エンジニア向け会社紹介資料_Forit_Company_Profile.pdf
forit_tech
1
1.7k
自分だけの仮想クラスタを高速かつ効率的に作る kubefork
donkomura
0
110
ウォンテッドリーのデータパイプラインを支える ETL のための analytics, rds-exporter / analytics, rds-exporter for ETL to support Wantedly's data pipeline
unblee
0
140
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
11k
2025/3/1 公共交通オープンデータデイ2025
morohoshi
0
100
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
540
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
What's in a price? How to price your products and services
michaelherold
244
12k
Facilitating Awesome Meetings
lara
53
6.2k
Faster Mobile Websites
deanohume
306
31k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Become a Pro
speakerdeck
PRO
26
5.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
We Have a Design System, Now What?
morganepeng
51
7.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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