!SLIDE
* Sinatra
* Rápido
* Agnóstico <style> pre { font-family: monospace; } </style>
!SLIDE
* project
* mailer
* controller
* model
* migration
!SLIDE
@@@ bash
gem install padrino
@@@
!SLIDE
@@@ bash
padrino generate project blag -t shoulda -e haml -d activerecord
cd blag
bundle install
@@@
!SLIDE
@@@ ruby
class Blag < Padrino::Application
register Padrino::Rendering
register Padrino::Helpers
# GET /
get "/" do
"Hello UP!"
end
end
@@@
!SLIDE
@@@ bash
padrino generate admin
@@@
!SLIDE
@@@ bash
padrino rake ar:create
padrino rake ar:migrate
@@@
!SLIDE
@@@ bash
padrino rake seed
@@@
!SLIDE
@@@ bash
padrino generate model post title:string body:text
@@@
!SLIDE
@@@ bash
padrino rake ar:migrate
@@@
!SLIDE
@@@ bash
padrino generate admin_page post
@@@
!SLIDE
@@@ bash
padrino start
@@@
!SLIDE
* Ejemplo: [https://github.com/etagwerker/blag](https://github.com/etagwerker/blag)
* Fuente: [http://www.padrinorb.com/guides/blog-tutorial](http://www.padrinorb.com/guides/blog-tutorial)
* Padrino: [http://www.padrinorb.com/](http://www.padrinorb.com/)
* Sinatra: [http://www.sinatrarb.com/](http://www.sinatrarb.com/)