Sinatra? Isn’t that a singer?

While you are not wrong in recognizing Sinatra as the singer, however, the Sinatra we’ll be talking about is the DSL(domain specific language) that’s implemented on top of Ruby and Rack, similar to a lightweight version of Rails. Sinatra is designed to simple and easy to get started creating web applications from the ground up with minimal efforts.

Essentially, Sinatra is Ruby Gem which speeds up the process of creating web apps considerably. It is really effective in the methods it uses for working with nested directories.

Sinatra & Corneal what is not to love?

I have to shout-out a special Sinatra skeleton that creates the basic file structures for a creating a quick web application. Corneal is literally a life save that takes out all the intitial tedious work that is related towards creating a basic application. Corneal will set up a file structure in this manner:

Directory structure:

├── config.ru
├── Gemfile
├── Gemfile.lock
├── Rakefile
├── README
├── app
│   ├── controllers
│   │   └── application_controller.rb
│   ├── models
│   └── views
│       ├── layout.erb
│       └── welcome.erb
├── config
│   ├── initializers
│   └── environment.rb
├── db
│   └── migrate
├── lib
│   └── .gitkeep
└── public
|   ├── images
|   ├── javascripts
|   └── stylesheets
|       └── main.css
└── spec
    ├── application_controller_spec.rb
    └── spec_helper.rb

What I found to be especially helpful was that Corneal comes with some default CSS styling that makes it really easy to see your project while you are busy creating your controllers in the MVC model. I found this incredibly helpful for when I was setting up my database and models to easily see if my code was working as intended.

Corneal also has this awesome method built in for creating easy rake migrations.

#flatiron-school #sinatra #web-development #sinatra-project #ruby

Fly Me to the Moon: Sinatra with Ruby will take you places!
1.40 GEEK