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 年配者がこの先生きのこるには/My Generation How elder engineers can survive
kwappa
3
5.3k
勝ちに不思議の勝ちあり、負けに不思議の負けあり/There is a mystery to win, but there is no mystery to lose
kwappa
0
150
伸び代だらけのチームに 伸びてもらうための施策100連発/100 measures to grow up a team with a lot of growth potential
kwappa
1
120
礼節とHRTと心理的安全性/Civility, HRT and Psychological Safety
kwappa
0
670
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
2
3.2k
デスマーチから身を守るたったひとつの方法
kwappa
2
6.7k
メタエンジニアリングという選択肢/The choice named meta-engineering
kwappa
1
1.9k
レビューのつらさを倒したい/To Defeat the Pain of Reviewing
kwappa
3
4.9k
リモートワーク時代のコミュニケーションデザイン : コーチングに学ぶ1on1の基礎/Learn Basics of 1on1 from Coaching
kwappa
1
1.8k
Other Decks in Technology
See All in Technology
RAG: from dumb implementation to serious results
glaforge
0
250
What a Good Platform Looks Like and How to Get There @ Large Financial Organization, Oct 2024
mfpais
PRO
0
100
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
2
240
CData Virtuality 日本ローンチイベントのKeynote
cdataj
0
230
SageMaker学習のツボ / The Key Points of Learning SageMaker
cmhiranofumio
0
200
これはPerl? それともRuby? クイズ〜〜〜〜〜!!!- Perl or Ruby Quiz
moznion
2
1.9k
Low Latency Join Method for Distributed DBMS
yugabytejapan
0
180
WSUSが非推奨に!? Windowsの更新管理を改めて勉強する!
ebibibi
0
270
今こそ変化対応力を向上させるとき 〜ログラスが FAST に挑戦する理由〜 / Why Loglass is Talking on the Challenge of Agile Framework FAST
shioyang
0
150
OPENLOGI Company Profile
hr01
0
54k
業務ヒアリングと知識の呪い
tamai_63
0
290
LINEヤフー新卒採用 コーディングテスト解説 実装問題編
lycorp_recruit_jp
1
13k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Practical Orchestrator
shlominoach
186
10k
Designing for Performance
lara
604
68k
How GitHub Uses GitHub to Build GitHub
holman
473
290k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
A Tale of Four Properties
chriscoyier
156
22k
The Mythical Team-Month
searls
218
43k
Building Your Own Lightsaber
phodgson
102
6k
Being A Developer After 40
akosma
84
590k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
249
21k
Embracing the Ebb and Flow
colly
84
4.4k
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