The eclectic musings of a bitter software engineer.

A few more details on Thoth and Ramaze

Friday February 08, 2008 @ 08:48 PM (PST)

Update (2008-03-12): Riposte has been renamed Thoth to avoid a trademark conflict. This post has been edited accordingly. Sorry for the confusion.

Aphyr asked for some technical details about Thoth, so here they are.

One of the lovely things about Ramaze, the young (but rapidly maturing) Ruby web framework I used to build Thoth, is that it provides lots of nice features to help you get things done quickly and cleanly, yet it does so without dictating that you build your application a particular way. In fact, it’s so modular and so customizable that it’ll happily allow you to use just about any template engine or ORM you prefer.

I initially chose DataMapper as my ORM layer, largely (I confess) due to its pretty website. Unfortunately, it turns out you can’t judge an ORM by its cover. I quickly became frustrated with the lack of documentation, and when the source code itself proved difficult to understand due to a severe lack of useful comments, I decided to drop it in favor of Sequel, which has much better documentation and a more mature (and better-commented) codebase. So far I’ve been very happy with that choice.

I chose Erubis as my template engine primarily due to its maturity and speed. Ezamar, Ramaze’s native (and default) template engine, was also appealing, but it can’t compete with Erubis in the performance department. In addition, Ezamar evaluates its templates as Ruby strings in order to use Ruby’s native string interpolation features. This means that # characters must be escaped when displaying user-supplied content to prevent the user from executing arbitrary Ruby code like "#{File.read('/etc/passwd')}". Ramaze now includes a helper method to do this, but at the time it didn’t, which was a factor in my decision to use Erubis.

Since Ramaze is still young, the documentation isn’t quite as complete as I would have liked. However, the source code is well-commented and very clean, and when I had learned everything I could from the documentation on the Ramaze wiki, I found that it wasn’t hard at all to figure things out by poking through the source. On the few occasions when even the source didn’t answer all my questions, manveru and the other folks in #ramaze were happy to help.

Thoth is now feature complete and ready for release. I’m just waiting on Ramaze 0.3.6 (which contains a few features Thoth uses) before I push it out the door. In the meantime, if you’d like to try it out, you can follow these instructions to install a nightly build of Ramaze and the latest Thoth code. Let me know what you think.

Comments

Since Ramaze is still young, the documentation isn't quite as complete as I would have liked.

Could you say in particular what you think are some significant missing things in the documentation?

Saturday February 09, 2008 @ 12:22 PM (PST) Posted by Pistos

The TodoList tutorial and the examples provided with Ramaze are great for getting started with a small app, but they didn't cover some of the more advanced questions I had, such as how to structure a medium-sized app like Riposte that will be distributed as a gem, how (and when it's appropriate) to call a template from within another template, how to allow people to conveniently override Riposte's default templates and static resources, etc.

I was able to figure most of these things out by reading the RDocs and poking through the source, but that required more of a time investment on my part than I think some people would be willing to make.

I don't consider this a failing of Ramaze or the Ramaze contributors; the kind of "best practices" documentation I was looking for is the sort of thing that grows very slowly as more and more people begin to use a framework and write about their experiences. It'll happen gradually as Ramaze's popularity grows and the early adopters share their knowledge.

Saturday February 09, 2008 @ 12:48 PM (PST) Posted by wonko
Post a comment

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile or Markdown.

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Copyright © 2002-2008 Ryan Grove. All rights reserved.
Powered by Thoth.