inchworm

inchworms

Summer of Coding, one inch at a time...

These Boots Were Made for Walkin'

inchworms -

We spent a couple of hours in the morning with Matt having CGI (Common Interface Gateway) explained to us. It’s the old-school way of doing simple dynamic content on the web.

He then walked us through FastCGI, SimpleCGI, and WSGI until he arrived at Rack, the current protocol that Rails and Sinatra apps use for passing requests and responses back and forth across the internets. This post by Hubert Łępicki was very useful in explaining how Rack works.

We were then set the task of building a simple Sinatra app. We used a tutorial from the excellent Jump Start Sinatra book by Darren Jones. We modified his sample app a little. You can check out our initial work here. We’ve still got more work to do but we’ve learnt some fundamentals about how Sinatra works.

We also had to make a diagram of the basic way a Sinatra app handles a request. We came up with this, a messy representation of how an app talks to a client:

rack Diagram

On the http level this is what Sinatra is doing:

http Diagram

more or less…