Building Ruby Applications       With Sinatra           January 5, 2012        East Bay Rails Meetup
Outline      Sinatra, Bootstrap and RSpec• Sinatra vs. Rails• Random Text Generator• Sinatra Routes• TDD with RSpec• Boots...
Sinatra vs. Rails• Lighter, rack-based alternative to Rails.• Pro & Con: Less structure.• Does not enforce MVC.• Supports ...
Random Text Generator       http://asdftextgenerator.com/• Serving up asdf and Lorem Ipsum text.• No back-end, various opt...
Sinatra Routes    Example route pattern with named parameterget /hello/:name do  # matches "GET /hello/foo" and "GET /hell...
TDD with RSpec       Setup in spec_helperRSpec.configure do |config| config.include Rack::Test::Methodsend
BootstrapCSS Framework built with Less by Twitter get stylesheets/bootstrap.css do end
References• Sinatra: http://sinatrarb.com/• Redis: http://redis.io/  Sinatra-Redis Tutorial:• http://goo.gl/xktVk  Bootstr...
Upcoming SlideShare
Loading in …5
×

East Bay Rails: January 2012

1,515
-1

Published on

Presentation slides for East Bay Rails: January 2012.

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
1,515
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

East Bay Rails: January 2012

  1. 1. Building Ruby Applications With Sinatra January 5, 2012 East Bay Rails Meetup
  2. 2. Outline Sinatra, Bootstrap and RSpec• Sinatra vs. Rails• Random Text Generator• Sinatra Routes• TDD with RSpec• Bootstrap
  3. 3. Sinatra vs. Rails• Lighter, rack-based alternative to Rails.• Pro & Con: Less structure.• Does not enforce MVC.• Supports Rails toolchain: Gemfile, etc.
  4. 4. Random Text Generator http://asdftextgenerator.com/• Serving up asdf and Lorem Ipsum text.• No back-end, various options available.• Modular, reusable design.
  5. 5. Sinatra Routes Example route pattern with named parameterget /hello/:name do # matches "GET /hello/foo" and "GET /hello/bar" # params[:name] is foo or bar "Hello #{params[:name]}!"end
  6. 6. TDD with RSpec Setup in spec_helperRSpec.configure do |config| config.include Rack::Test::Methodsend
  7. 7. BootstrapCSS Framework built with Less by Twitter get stylesheets/bootstrap.css do end
  8. 8. References• Sinatra: http://sinatrarb.com/• Redis: http://redis.io/ Sinatra-Redis Tutorial:• http://goo.gl/xktVk Bootstrap.js:• http://twitter.github.com/bootstrap/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×