Slide 1

Slide 1 text

THE BRIEF SEEDS OF PADRINO by @aereal, at Padrino Sabbath in Kyoto

Slide 2

Slide 2 text

WHO AM I? @aereal id:aereal GitHub: aereal Undergraduate student majoring (Cognitive) Psychology Part-time (Rails) engineer at Happy Elements K.K. see also: kerare.org/

Slide 3

Slide 3 text

WORKS Padrino::Validation::HTML5 Add supports HTML5 form validations to Padrino github.com/aereal/padrino-validation-html5 Hated mocking server which can be utilized for Hatena Diary github.com/aereal/hated

Slide 4

Slide 4 text

TABLE OF CONTENTS The essentials of developing a Web Application The History of Web Application Frameworks Padrino and Sinatra Padrino and Rails Padrino and Others

Slide 5

Slide 5 text

THE ESSENTIALS OF DEVELOPING WEB APPLICATION

Slide 6

Slide 6 text

THE ESSENTIALS OF DEVELOPING A WEB APP. Fast Compact Portable

Slide 7

Slide 7 text

FAST? Reading Coding Setting-up Loading Deploying

Slide 8

Slide 8 text

COMPACT? Application Code Framework Code Dependencies Architecture

Slide 9

Slide 9 text

PORTABLE? Dependencies Hosting Services Size of Application (and Framework)

Slide 10

Slide 10 text

“Less is more.” Ludwig Mies van der Rohe (1886-1969)

Slide 11

Slide 11 text

I MEAN Keep developing a web app: Fast Compact Portable Then you take a delight in!

Slide 12

Slide 12 text

THE HISTORY OF WEB APPLICATION FRAMEWORK

Slide 13

Slide 13 text

History repeats itself

Slide 14

Slide 14 text

DRY = Don’t Repeat Yourself

Slide 15

Slide 15 text

We should learn from the History

Slide 16

Slide 16 text

THE HISTORY OF WEB APP. FRAMEWORK (CGI, Common Gateway Interface) Full-stack (Minimal) Micro-framework

Slide 17

Slide 17 text

FULL-STACK FRAMEWORK Rails (Ruby) Django (Python) Catalyst (Perl)

Slide 18

Slide 18 text

FULL-STACK FRAMEWORK Forms the big cultural sphere Relieves your mind by hiding what you mind You’ll never know them unless you will

Slide 19

Slide 19 text

MICRO-FRAMEWORK Sinatra (Ruby) Juno (Python) Mojolicious::Lite, Amon2 (Perl) Loli (!) -> Miku (!!!) (Haskell) Scalatra (Scala)

Slide 20

Slide 20 text

MICRO-FRAMEWORK Forms small/open cultural sphere Relieves your mind by showing what you do You should write/know only what you do

Slide 21

Slide 21 text

!!! Rails vs. Sinatra !!!

Slide 22

Slide 22 text

IMAGINE!

Slide 23

Slide 23 text

ੜଘઓུʙ

Slide 24

Slide 24 text

SURVIVING STRATEGY Rails doesn’t kill Sinatra Rails doesn’t have small spin-up Sinatra doesn’t kill Rails Sinatra doesn’t have the order

Slide 25

Slide 25 text

your_desires << small spin-up your_desires << fast spin-up your_desires << the order your_desires << scaling

Slide 26

Slide 26 text

Padrino.include?(your_desire) # -> true

Slide 27

Slide 27 text

PADRINO AND SINATRA

Slide 28

Slide 28 text

PADRINO IS BUFFET

Slide 29

Slide 29 text

PADRINO IS BUFFET Routing (Named, Multiple Format) Helpers Logger Admin Apps (like Django) Reloader (It’s smart!) see also: www.padrinorb.com/#introduction

Slide 30

Slide 30 text

PADRINO IS FXXKIN’ SHIT? Extending Sinatra through Public / Safe API but Padrino::Routing is like a abyss ... use (Rack Middleware) register (Sinatra Extension)

Slide 31

Slide 31 text

Sinatra’s World?

Slide 32

Slide 32 text

THE DOMAIN OF SINATRA = HTTP

Slide 33

Slide 33 text

KEEP IT LESS No DBs No helpers No anything luxurious

Slide 34

Slide 34 text

LESS IS NOT IMPOSSIBLE DB / ORM View Helpers You can use it with Sinatra!

Slide 35

Slide 35 text

ON THE SINATRA Sinatra discovered potential / real needs Sinatra built them Specifications beat Conventions

Slide 36

Slide 36 text

PADRINO AND RAILS

Slide 37

Slide 37 text

PADRINO AND RAILS Rails is full-stack Padrino can be full-stack This means you can use Padrino as not full-stack

Slide 38

Slide 38 text

RAILS IS THE INNOVATOR Discovered many important things Spirit of DRY, or CoC ActiveRecord, ActiveSupport, etc. Sometimes it makes a detour The innovation involves pains

Slide 39

Slide 39 text

PADRINO IS THE GODFATHER

Slide 40

Slide 40 text

PADRINO IS THE GODFATHER He glues the components of Web Applications Test Frameworks ORM etc. He guards Sinatra’s World

Slide 41

Slide 41 text

ROUTING Rails config/routes.rb resource[s] (>= 3.0) Padrino & Sinatra HTTP Verbs (get, post, etc ...)

Slide 42

Slide 42 text

VIEW Rails ActionView Padrino & Sinatara Tilt (>= 1.0)

Slide 43

Slide 43 text

HERITAGES Architectures and Spirits MVC DRY Luxuoriousness

Slide 44

Slide 44 text

CONCLUSIONS Padrino is on the Sinatra’s World Rails’ heritages are behind Padrino, Sinatra, and Rails should be all in harmony

Slide 45

Slide 45 text

SEE ALSO Padrino Official Web (www.padrinorb.com) Padrino Official Web (ja) (jp.padrinorb.com) Padrino on GitHub (github.com/padrino/padrino- framework) Padrino Recipes (github.com/padrino/padrino-recipes) Sinatra The Book (sinatra-book.gittr.com)

Slide 46

Slide 46 text

SEE ALSO @udzura’s Blog (blog.udzura.jp/) and, my blog :) (aereal.hateblo.jp)