Where Ruby/Sinatra falls short
BRANK

The PC hardware recommender pc-kombo is written with Ruby and Sinatra, a very comfortable and powerful small framework to build web applications. Web applications is where Ruby shines in general, the language got popular together with the more complete (and opinionated) Ruby on Rails framework.Sinatra is very nice to work with initially, but over the years it became clear to me that not everything works as good as it should. I’d still recommend it, but would urge beginners to be aware of its limitations.Some of Sinatra’s issues1. The routing order matters, and evaluation is not always obviousThat’s stated in the documentation:Routes are matched in the order they are defined. The first route that matches the request is invoked.Sounds straightforward, but in practice this gets complicated. As soon as you have routes that match by regexpressions, you won’t always know which order is the correct one. This lead to several situations where we had to shuffle the routes around in our serv…

pc-kombo.com
Related Topics: Ruby Ruby on Rails HTTP