Less is more: Sinatra & Ruby – a web swiss-knife!
Posted in Uncategorized on November 27th, 2009 by Marcelo de Moraes Serpa – 1 CommentWhile brainstorming on the best way to have a maintainable web site, leveraging the power of ruby to create additional features on demand to support a better but no-more-no-less-than-needed CMS experience, I just had one of those “clicks”: Sinatra is the way to go.
I used WordPress on this blog because I wanted to get up to speed as quickly as possible. This was some months ago, and I never had a blog before, so the inertia was really, really big. Getting something up quickly and starting writing was the only way to fight that.
However, I don’t really want a “blog”. I want a web place. My web place. A place where I can share my thoughts (blog), put interesting static/dynamic content/pages (CMS), that will change constantly as I try try and learn new things, a place I can expand to my heart’s need on demand, quickly, leveraging my ruby knowledge. It’s not a web application, nor a static web site, it’s not a CMS nor a blog… it’s a little bit of each. It’s my sandbox, in a constant metamorphosis, and willing to cope with the constant change.
Let me define my concept of “website” here. I’m talking about my web place, which many consider a blog. However, the web has so much potential, that just putting a pre-installed blog and start writing stuff isn’t enough anymore.
- What if you want to add some minimal shopping-cart functionality to sell a product/service of yours?
- What if you want to integrate some external technology?
- What if you want to create the next coolest feature that only you could do?
And what if you don’t want to search for pre-made plugins for WordPress and other existing publishing platforms? (You don’t know how they work, they might be bloated or full of security holes, or simply they might just get on your way when you need something more specific that the framework/plugin does not provide.
Before having this insight, I though on using Plone 3 (already worked with it in the past), Mephisto and Radiant. However, both of these solutions really didn’t fit my need. They are big frameworks/platforms (specially Plone 3) and, while they might be good for varios other use cases, for me these would mean additional time to learn the plugin architecture of one of these, and whenever I wanted a change, I would have to try to choose from the ways to expand the application through the framework. I would have to fight a big Gorilla before having my new ideas implemented on my web site.
I already know Ruby, very well. Ruby is a beautiful language and, for me, it is a real swiss-knife. So, the click was simply using a real lightweight ruby web framework, start simple, with a basic blog and build other features from there, with minimal layers of abstractions. This allows rapid turn-around, and to have exactly what is needed when it is needed. This will also allow me to focus more on the client-side stuff and presentation (graphics design), which is something I want to improve myself on.
Sinatra seems to be the logical choice, but it doesn’t have to be it. It has to be ruby for the web, without being a huge Gorilla of multiple layers of abstractions (like Rails).
This means less abstraction layers, minimal or no web “control panels”, no complicated architecture to support plugins, down to earth simple workflows – like editing the (x)HTML file on the filesystem. Oh, the simple things in life are what makes it worth it.
I’m thinking about basing this new project one of these:
There’s also a very interesting discussion on stackoverflow on which the OP originally asks about Radiant vs Mephisto, but that ends up being a nice discussion about lightweight alternatives to these frameworks:
I haven’t looked deeply on either of those, I will check it out when I have more time.
If someone else has suggestions on other cool projects I could base it on, don’t hesitate to let me know!
So, that’s the idea, going really lightweight, so I’m able to implement my ideas better and in a timely manner. Best tool for the job, always.
I will start working on this and will be sharing my experience as I progress towards replacing this wordpress site with a self-made especially-tailored-to-me sinatra web-site.
