Padrino - the Godfather of Sinatra
Upcoming SlideShare
Loading in...5
×
 

Padrino - the Godfather of Sinatra

on

  • 31,027 views

Padrino is a ruby framework built upon the Sinatra web library.

Padrino is a ruby framework built upon the Sinatra web library.

Statistics

Views

Total Views
31,027
Views on SlideShare
30,794
Embed Views
233

Actions

Likes
34
Downloads
155
Comments
0

14 Embeds 233

http://a0.twimg.com 172
http://us-w1.rockmelt.com 31
https://twitter.com 5
http://www.twylah.com 5
http://strawberryj.am 5
http://localhost 3
http://duckduckgo.com 3
http://tweetedtimes.com 2
https://si0.twimg.com 2
http://bottlenose.local 1
http://www.m.techgig.com 1
http://www.linkedin.com 1
http://www.techgig.com 1
http://www.hanrss.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Padrino - the Godfather of Sinatra Padrino - the Godfather of Sinatra Presentation Transcript

  • Padrinothe Godfather of Sinatra
  • Padrinothe Godfather of Sinatra ?
  • Why?
  • Quiz
  • SASS ?
  • SASSSyntactically Awesome Stylesheets
  • SASS
  • CoffeeScript ?
  • CoffeeScript
  • sprockets ?
  • sprocketsRack-based asset packaging
  • Too complicated
  • Simple is GOOD
  • Dataservices (mobile , API) + DB backend
  • Data flow HTTP requestprocess by RUBY HTTP response
  • Rack
  • Rack = HTTP model env {} def ca# ( env )[ status , { headers } , [body] ]
  • Rack application
  • RackWebserversRACK appFrameworks
  • Rack tools
  • Rack tools
  • Rack tools
  • config.ru
  • Rack is GOOD !
  • • Renee• Presto• Hebo• RESTrack
  • TOO CROWDED
  • YARF
  • YARFYet Another Rack Framework
  • https://github.com/zh/yarf
  • Sinatra
  • Sinatra
  • Sinatra is REAL !http://www.sinatrarb.com/wild.html
  • But...
  • my ownlink_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
  • Padrinogem install padrino
  • YARFYet Another Rack Framework
  • Padrino = Sinatra++
  • 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
  • Agnostic ( )Component Default Alias Options activerecord ORM none -d , mongoid Renderer haml -e erb,slim jquery, Script none -s prototype sass , less , Style none -c compass Test none -t rspec, bacon
  • Many generators• Project generator• Controller generator• Model generator• Migration generator• Admin generator
  • padrino g admin
  • Multiple Appsby 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 ( )
  • MultipartAttachments
  • 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
  • HelpersRouting
  • Mailer in Sinatra
  • I18n
  • Padrino is GOOD !
  • Questions?