Bulding apps data-first with Sinatra

The Ruby ecosystem is rich with tools that make us developers more productive at what we do. Both Rails and Sinatra have been used to build web application proof-of-concepts and prototypes. But which one is better?

In this article, I try to explain why a back-to-basics approach is better suited for the ideation and conceptualization phase and how this ties in with an underrated aspect of software development — the design process.

https://fullstackplus.tech/2023/02/23/data-first-sinatra

1 Like

Corresponding tweet for this thread:

Share link for this tweet.

1 Like

There will be a lot of challenges for using Sinatra. One of the very obvious thing will be tooling.
There are not so many tools supporting Sinatra syntax highlight or autocomplete nicely.

Also the resource or best practice has been faded out for years without properly picking up the latest ruby conventions, not to mention the contemporary library support.

1 Like

“Sinatra syntax”? There’s no such thing. Sinatra is written in Ruby, so any tool capable of highlighting and autocompleting Ruby will work for a Sinatra app.

Also, the latest commit to the Sinatra repo on Github was made 4 days ago. This is an actively maintained project, and I don’t think that people in charge of it are less cognisant of the “latest ruby conventions” than you are.

2 Likes

Sinatra now is in very inactive maintenance mode.
The current status of the project is mainly upgrading some simple dependencies, build tool of the project and typo of documentation.

There are several critical features that no one is taking care of.
One of the examples is upgrading Rack to 3. It has been 3 years since this thread has opened.

Another one is upgrading the code to adopt keyword argument style.

1 Like

The Rack 3 issue says: “dentarg opened this issue on Jul 20, 2022”, as you can plainly see from the screenshot. So it’s not 3 years ago but less than one year ago.

Also if you actually read the thread, there are engineers discussing how best to upgrade to Rack 3 in terms of resolving dependencies, etc. So there might be a reason that they don’t just rush off and upgrade to the Latest Version of Everything as soon as it’s out.

2 Likes

I guess, this statement comes from the fact that Sinatra is a DSL. Thus, there’s specific Sinatra syntax.

Also, resources are scarce, not up to date, that’s sad for the ruby community.

2 Likes

Yes, and my statement comes from the fact that the Sinatra DSL syntax is a subset of the Ruby programming language syntax. Meaning, any editor / IDE that supports Ruby automatically supports Sinatra via the magic (and the beauty!) of set theory.

Resources are partially outdated, but I haven’t so far had an issue to which I wasn’t able to find an answer or solution after doing a little bit of digging.

1 Like

That’s great!

Moreover it seems that the Rack 3 support is handled.

3 Likes

Bingo! I’m running rack 2.2.5, I guess it’s time to update.

3 Likes

Has anyone tried Roda?

2 Likes

I haven’t, but the fact that it was made by Jeremy Evans (the author of Sequel) makes it interesting. He knows what he’s doing, and I’m looking forward to watching the Roda talk.

2 Likes