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
Search
Stoyan Zhekov
June 25, 2013
Programming
0
120
Padrino
Padrino is a ruby framework built upon the Sinatra web library.
Stoyan Zhekov
June 25, 2013
Tweet
Share
More Decks by Stoyan Zhekov
See All by Stoyan Zhekov
ZeroMQ
zh
4
410
Foreman
zh
0
110
Other Decks in Programming
See All in Programming
認証・認可の基本を学ぼう後編
kouyuume
0
260
チームをチームにするEM
hitode909
0
420
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1k
Vibe codingでおすすめの言語と開発手法
uyuki234
0
140
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
430
ゆくKotlin くるRust
exoego
1
180
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
150
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
36k
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
250
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
430
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
830
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
590
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
150
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
39
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
220
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
74
エンジニアに許された特別な時間の終わり
watany
106
220k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Unsuck your backbone
ammeep
671
58k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
63
Transcript
Padrino the Godfather of Sinatra
Padrino the Godfather of Sinatra ?
None
None
None
Why? ͳͥͰ͔͢ʁ
Quiz ΫΠζ
SASS ?
SASS Syntactically Awesome Stylesheets
SASS
CoffeeScript ?
CoffeeScript
sprockets ?
sprockets Rack-based asset packaging
Too complicated
Simple is GOOD γϯϓϧ͕ྑ͍Ͱ͢ɻ
Data services (mobile , API) + DB backend
process by RUBY HTTP request HTTP response Data flow
Rack
def ca# ( env ) env {} [ status ,
{ headers } , [body] ] Rack = HTTP model
Rack application
RACK app Webservers Frameworks Rack
Rack tools
Rack tools
Rack tools
config.ru
Rack is GOOD !
• Renee • Presto • Hebo • RESTrack
TOO CROWDED
YARF
YARF Yet Another Rack Framework
https://github.com/zh/yarf
Sinatra
None
Sinatra
Sinatra is REAL ! ຊͰ͢ɻ http://www.sinatrarb.com/wild.html
But... ͚ͩͲɻɻɻ
None
my own link_to :confirm
Missing pieces • Generators - Gemfile, config.ru etc. • Helpers
- link_to(), image_tag() • Mailer • Admin interface - a.l.a Django ͚͍ܽͯΔ෦
Too simple is BAD ͋·Γʹγϯϓϧѱ͍Ͱ͢
Padrino gem install padrino
YARF Yet Another Rack Framework
Padrino = Sinatra++
None
Container (ίϯςφ)
Modular (Ϟδϡʔϧ)
$ padrino ...
Generators
$ padrino g project myproj
$ padrino g project myproj -s jquery -c sass -e
erb
$ padrino g project myproj -s jquery -c sass -e
erb -d activerecord -a sqlite
$ padrino g project myproj -s jquery -c sass -e
erb -d activerecord -a sqlite -t rspec -m mocha
Component Default Alias Options ORM none -d activerecord , mongoid
Renderer haml -e erb,slim Script none -s jquery, prototype Style none -c sass , less , compass Test none -t rspec, bacon Agnostic (ෆՄऀ)
Many generators • Project generator • Controller generator • Model
generator • Migration generator •Admin generator
padrino g admin
Multiple Apps by design
Interesting files • Gemfile - bundle install • config/apps.rb -
Padrino.mount( ... ).to( ... ) • config/boot.rb - logger , locale • app/app.rb - core application install
Helpers • Tags: input_tag :text, :class => ‘demo’ • Assets:
stylesheet_link_tag ‘layout’ • Format: escape_html( ) , truncate( ) • Links: link_to ... , :confirm => ‘Are you sure?’
Mailer • Configure: app/app.rb • Generate: $ pd g mailer
Sample register • [views]/mailers/sample/register.plain.erb • Deliver: deliver(:sample, :register, “foo@bar”) • Tests: set :delivery_method, :test
Simple mailer (؆୯)
Multipart Attachments
Dev Friendly • Reloader - disable :reload to stop it
• Auto load paths - lib/* • $ padrino gen | start | stop | console | rake
ຊਓ Friendly • ຊޠαΠτ - http://jp.padrino.com/ • @udzura ( Uchio
Kondo )
Padrino inside Sinatra
Helpers Routing
Mailer in Sinatra
I18n
Padrino is GOOD !
Questions? ճ