Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Padrino
the Godfather of Sinatra
Padrino
the Godfather of Sinatra


          ?
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
Data flow

 HTTP request

process by RUBY
  HTTP response
Rack
Rack = HTTP model

           env {}

    def ca# ( env )
[ status , { headers } , [body] ]
Rack application
Rack

Webservers

RACK app
Frameworks
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
Sinatra
Sinatra is REAL !


http://www.sinatrarb.com/wild.html
But...
my own
link_to :confirm
Missing pieces

• Generators - Gemfile, config.ru etc.
• Helpers - link_to(), image_tag()
• Mailer
• Admin interface - a.l.a...
Too simple is BAD
Padrino
gem install padrino
YARF
Yet 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     ...
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 , l...
Helpers


• Tags:   input_tag :text, :class => ‘demo’

• Assets: stylesheet_link_tag ‘layout’
• Format: escape_html( ) , t...
Mailer

• Configure: app/app.rb
• Generate: $ pd g mailer Sample register
• [views]/mailers/sample/register.plain.erb
• Del...
Simple mailer (   )
Multipart

Attachments
Dev Friendly


• Reloader - disable :reload to stop it
• Auto load paths - lib/*
• $ padrino gen | start | stop | console ...
Friendly



•             - http://jp.padrino.com/

• @udzura ( Uchio Kondo )
Padrino inside Sinatra
Helpers




Routing
Mailer in Sinatra
I18n
Padrino is GOOD !
Questions?
Padrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
Upcoming SlideShare
Loading in …5
×

of

Padrino - the Godfather of Sinatra Slide 1 Padrino - the Godfather of Sinatra Slide 2 Padrino - the Godfather of Sinatra Slide 3 Padrino - the Godfather of Sinatra Slide 4 Padrino - the Godfather of Sinatra Slide 5 Padrino - the Godfather of Sinatra Slide 6 Padrino - the Godfather of Sinatra Slide 7 Padrino - the Godfather of Sinatra Slide 8 Padrino - the Godfather of Sinatra Slide 9 Padrino - the Godfather of Sinatra Slide 10 Padrino - the Godfather of Sinatra Slide 11 Padrino - the Godfather of Sinatra Slide 12 Padrino - the Godfather of Sinatra Slide 13 Padrino - the Godfather of Sinatra Slide 14 Padrino - the Godfather of Sinatra Slide 15 Padrino - the Godfather of Sinatra Slide 16 Padrino - the Godfather of Sinatra Slide 17 Padrino - the Godfather of Sinatra Slide 18 Padrino - the Godfather of Sinatra Slide 19 Padrino - the Godfather of Sinatra Slide 20 Padrino - the Godfather of Sinatra Slide 21 Padrino - the Godfather of Sinatra Slide 22 Padrino - the Godfather of Sinatra Slide 23 Padrino - the Godfather of Sinatra Slide 24 Padrino - the Godfather of Sinatra Slide 25 Padrino - the Godfather of Sinatra Slide 26 Padrino - the Godfather of Sinatra Slide 27 Padrino - the Godfather of Sinatra Slide 28 Padrino - the Godfather of Sinatra Slide 29 Padrino - the Godfather of Sinatra Slide 30 Padrino - the Godfather of Sinatra Slide 31 Padrino - the Godfather of Sinatra Slide 32 Padrino - the Godfather of Sinatra Slide 33 Padrino - the Godfather of Sinatra Slide 34 Padrino - the Godfather of Sinatra Slide 35 Padrino - the Godfather of Sinatra Slide 36 Padrino - the Godfather of Sinatra Slide 37 Padrino - the Godfather of Sinatra Slide 38 Padrino - the Godfather of Sinatra Slide 39 Padrino - the Godfather of Sinatra Slide 40 Padrino - the Godfather of Sinatra Slide 41 Padrino - the Godfather of Sinatra Slide 42 Padrino - the Godfather of Sinatra Slide 43 Padrino - the Godfather of Sinatra Slide 44 Padrino - the Godfather of Sinatra Slide 45 Padrino - the Godfather of Sinatra Slide 46 Padrino - the Godfather of Sinatra Slide 47 Padrino - the Godfather of Sinatra Slide 48 Padrino - the Godfather of Sinatra Slide 49 Padrino - the Godfather of Sinatra Slide 50 Padrino - the Godfather of Sinatra Slide 51 Padrino - the Godfather of Sinatra Slide 52 Padrino - the Godfather of Sinatra Slide 53 Padrino - the Godfather of Sinatra Slide 54 Padrino - the Godfather of Sinatra Slide 55 Padrino - the Godfather of Sinatra Slide 56 Padrino - the Godfather of Sinatra Slide 57 Padrino - the Godfather of Sinatra Slide 58 Padrino - the Godfather of Sinatra Slide 59 Padrino - the Godfather of Sinatra Slide 60 Padrino - the Godfather of Sinatra Slide 61 Padrino - the Godfather of Sinatra Slide 62 Padrino - the Godfather of Sinatra Slide 63 Padrino - the Godfather of Sinatra Slide 64 Padrino - the Godfather of Sinatra Slide 65 Padrino - the Godfather of Sinatra Slide 66 Padrino - the Godfather of Sinatra Slide 67 Padrino - the Godfather of Sinatra Slide 68 Padrino - the Godfather of Sinatra Slide 69 Padrino - the Godfather of Sinatra Slide 70
Upcoming SlideShare
Introduction to padrino
Next
Download to read offline and view in fullscreen.

34 Likes

Share

Download to read offline

Padrino - the Godfather of Sinatra

Download to read offline

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

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Padrino - the Godfather of Sinatra

  1. 1. Padrino the Godfather of Sinatra
  2. 2. Padrino the Godfather of Sinatra ?
  3. 3. Why?
  4. 4. Quiz
  5. 5. SASS ?
  6. 6. SASS Syntactically Awesome Stylesheets
  7. 7. SASS
  8. 8. CoffeeScript ?
  9. 9. CoffeeScript
  10. 10. sprockets ?
  11. 11. sprockets Rack-based asset packaging
  12. 12. Too complicated
  13. 13. Simple is GOOD
  14. 14. Data services (mobile , API) + DB backend
  15. 15. Data flow HTTP request process by RUBY HTTP response
  16. 16. Rack
  17. 17. Rack = HTTP model env {} def ca# ( env ) [ status , { headers } , [body] ]
  18. 18. Rack application
  19. 19. Rack Webservers RACK app Frameworks
  20. 20. Rack tools
  21. 21. Rack tools
  22. 22. Rack tools
  23. 23. config.ru
  24. 24. Rack is GOOD !
  25. 25. • Renee • Presto • Hebo • RESTrack
  26. 26. TOO CROWDED
  27. 27. YARF
  28. 28. YARF Yet Another Rack Framework
  29. 29. https://github.com/zh/yarf
  30. 30. Sinatra
  31. 31. Sinatra
  32. 32. Sinatra is REAL ! http://www.sinatrarb.com/wild.html
  33. 33. But...
  34. 34. my own link_to :confirm
  35. 35. Missing pieces • Generators - Gemfile, config.ru etc. • Helpers - link_to(), image_tag() • Mailer • Admin interface - a.l.a Django
  36. 36. Too simple is BAD
  37. 37. Padrino gem install padrino
  38. 38. YARF Yet Another Rack Framework
  39. 39. Padrino = Sinatra++
  40. 40. Container ( )
  41. 41. Modular ( )
  42. 42. $ padrino ...
  43. 43. Generators
  44. 44. $ padrino g project myproj
  45. 45. $ padrino g project myproj -s jquery -c sass -e erb
  46. 46. $ padrino g project myproj -s jquery -c sass -e erb -d activerecord -a sqlite
  47. 47. $ padrino g project myproj -s jquery -c sass -e erb -d activerecord -a sqlite -t rspec -m mocha
  48. 48. 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
  49. 49. Many generators • Project generator • Controller generator • Model generator • Migration generator • Admin generator
  50. 50. padrino g admin
  51. 51. Multiple Apps by design
  52. 52. Interesting files • Gemfile - bundle install • config/apps.rb - Padrino.mount( ... ).to( ... ) • config/boot.rb - logger , locale • app/app.rb - core application install
  53. 53. Helpers • Tags: input_tag :text, :class => ‘demo’ • Assets: stylesheet_link_tag ‘layout’ • Format: escape_html( ) , truncate( ) • Links: link_to ... , :confirm => ‘Are you sure?’
  54. 54. 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
  55. 55. Simple mailer ( )
  56. 56. Multipart Attachments
  57. 57. Dev Friendly • Reloader - disable :reload to stop it • Auto load paths - lib/* • $ padrino gen | start | stop | console | rake
  58. 58. Friendly • - http://jp.padrino.com/ • @udzura ( Uchio Kondo )
  59. 59. Padrino inside Sinatra
  60. 60. Helpers Routing
  61. 61. Mailer in Sinatra
  62. 62. I18n
  63. 63. Padrino is GOOD !
  64. 64. Questions?
  • shunchu

    Jun. 23, 2012
  • AlexPagnoni

    Apr. 8, 2012
  • ApoorvSaxena

    Feb. 6, 2012
  • ncho

    Feb. 4, 2012
  • daydreamer168

    Feb. 3, 2012
  • mussegam

    Feb. 2, 2012
  • kenn

    Feb. 2, 2012
  • trikanna

    Feb. 2, 2012
  • ernadhalilovic

    Feb. 2, 2012
  • lcoullet

    Feb. 2, 2012
  • davideagostini

    Feb. 2, 2012
  • migrs

    Feb. 1, 2012
  • Pym166

    Feb. 1, 2012
  • stanbar

    Feb. 1, 2012
  • TokyoIncidents

    Feb. 1, 2012
  • googya

    Jan. 31, 2012
  • AtsuUchida

    Jan. 31, 2012
  • itangme

    Jan. 31, 2012
  • hujiahuwei

    Jan. 31, 2012
  • GauravGiri

    Jan. 31, 2012

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

Views

Total views

34,773

On Slideshare

0

From embeds

0

Number of embeds

266

Actions

Downloads

167

Shares

0

Comments

0

Likes

34

×