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
AtCoder Conference 2025
shindannin
0
1k
CSC307 Lecture 03
javiergs
PRO
1
490
Oxlint JS plugins
kazupon
1
740
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
100
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
6k
高速開発のためのコード整理術
sutetotanuki
1
390
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
ぼくの開発環境2026
yuzneri
0
100
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
SourceGeneratorのススメ
htkym
0
190
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
1.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
82
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
63
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
64
Building Adaptive Systems
keathley
44
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
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? ճ