Saturday, August 18, 2012

Sinatra To Padrino

5PM - At the moment, I have learned how to serve static pages with the Sinatra web framework. I need to be able to use a database with sinatra... but how?

I am thinking of either moving everything into Padrino, which is another Ruby web framework, or use Padrino modules/helpers with my Sinatra app.

Building a web app with Sinatra while learning Ruby on Rails, I get to understand some of the Ruby on Rails concepts better. I am able to extend some of my Sinatra web app by adapting what I learned from Ruby on rails. What I can't get through right now is how to use a databse with Sinatra.

Padrino is Sinatra, taken to the next level. I'll create a web app with Padrino on one pc, and I will continue development with Sinatra on the other PC. This way, I can compare, and learn more about building ruby web frameworks.

6.30PM - EDIT:

I have been playing around with the padrino framework in the last few hours. I am running the framework in the j@ime machine--same as where I am running the RoR and Sinatra frameworks.

Padrino is between Ruby on rails and Sinatra... Rails is big and almost complete, while sinatra has the bare essentials. Learning Padrino, I am going see the difference between these three frameworks.

I have been following the padrino sample blog tutorial. This is how the padrino admin panel looks like...

...and how the sample blog, with one post looks like

The next question now is, will it be difficult deploying this on heroku?

I will finish this sample blog tutorial, have dinner, then see how I can deploy this later.

8.05PM - Reading further into the sample blog tutorial, I found this...

Padrino documentation shows that it is relatively easy to deploy to heroku. It follows the same process that I used to deploy my Sinatra app--except that with Padrino, I need to configure the database.

Not bad, isn't it?

Here's what's going to happen now.

I am going to find the difference between my Sinatra app and this Padrino app, then learn how I can use, and incorporate the Padrino standalone modules with my Sinatra app.

1 comment: