Reasons for using roda rather than sinatra? #388
Replies: 1 comment
-
|
Roda is designed to be roughly as easy to use as Sinatra, and deliberately follows the same basic idea, which is that routes are defined by blocks, and the return value of the route block is used as the response. The main advantage with Roda is that routes can be nested (forming a tree), removing a lot of redundancy that you typically see in larger Sinatra applications. By having routes in a tree, routing is generally O(log(N)) in Roda, while in Sinatra, routing is generally O(N), as Sinatra stores routes in an array. Roda is significantly faster than Sinatra as well, even for a small number of routes. Roda also includes a plugin system and ships with a large number of plugins. With the plugins that Roda ships with, Roda's feature set is much larger than Sinatra. However, Roda is still smaller and uses less memory by default than Sinatra, since with Roda, you only pay the memory and performance costs for the plugins you choose to use. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there folks,
People recommended roda on various places, reddit etc..; also there is a mastering roda
tutorial which is nice. I have not finished it yet though, as I am currently committed to
sinatra. I want to finally ditch all my old .cgi scripts, tons of ruby scripts. The autogeneration
of HTML I already handle, so now I need to unify tons of things into modules and then
be able to use the same code base for both .cgi, sinatra etc... - that will take me a while.
I am mostly using sinatra, since it is super-simple. I am not too happy with its documentation
though; I also realised this is in part because rack has a really poor documentation too. Anyway.
Why may people prefer roda over sinatra? Please assume this is a genuine question. Right now
I know sinatra, but I don't know roda. I don't know what a tree root actually means or what the
advantage may be.
Beta Was this translation helpful? Give feedback.
All reactions