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
三大あいまい能力/Three ambiguous abilities
kwappa
1
100
My Generation 年配者がこの先生きのこるには/My Generation How elder engineers can survive
kwappa
3
5.6k
勝ちに不思議の勝ちあり、負けに不思議の負けあり/There is a mystery to win, but there is no mystery to lose
kwappa
0
190
伸び代だらけのチームに 伸びてもらうための施策100連発/100 measures to grow up a team with a lot of growth potential
kwappa
1
130
HIGH OUTPUT Infrastructure Engineering
kwappa
1
6
礼節とHRTと心理的安全性/Civility, HRT and Psychological Safety
kwappa
0
690
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
2
3.3k
デスマーチから身を守るたったひとつの方法
kwappa
2
6.7k
メタエンジニアリングという選択肢/The choice named meta-engineering
kwappa
1
1.9k
Other Decks in Technology
See All in Technology
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
360
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
120
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
SSMRunbook作成の勘所_20241120
koichiotomo
1
110
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Being A Developer After 40
akosma
86
590k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Gamification - CAS2011
davidbonilla
80
5k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Happy Clients
brianwarren
98
6.7k
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