Difference between web frameworks

What is the difference between

And

https://kemalcr.com/guide

Maybe there are other frameworks doing more or less the same thing ?

All web frameworks technically do the same thing. Among other things, they provide means to run logic to handle a given request and return a response. However, each framework has its own approach, goals, and features that set them apart, which is why there can be so many actively being used.

In this particular case Grip was inspired by Kemal, but wanted to try and solve some of the limitations of Kemal. Mainly that Kemal pollutes the global namespace, and doesn’t have a structure in regards to what a controller is for example. Because of that, some of the core features may seem similar, but they cannot really be considered the same framework anymore as there any many large differences, such as how routing works, or how you define controllers, etc.

See [WIP] Refactor global namespace into encapsulated application class by straight-shoota · Pull Request #378 · kemalcr/kemal · GitHub.

There are also quite a few more frameworks out there that are in themselves unique, even tho they all do essentially do the same thing at a high level.

See GitHub - veelenga/awesome-crystal: A collection of awesome Crystal libraries, tools, frameworks and software.

4 Likes

Is Grip prefferable to amber, or at least more developed?

Preference is variable based on your preferences.

Kemal is a bare minimal web application framework in the spirit of Sinatra, and Grip is one small step up from that. It’ll handle more code-complexity because it’s more natural to organize your code. Amber is a full framework in the spirit of Rails, so it may be even better suited to large application code organization – but that is a matter of opinion. Amber is one of the older web frameworks in the Crystal ecosystem with releases as old as 2017, Grip is a relatively new entrant with it’s first release here in 2021. That doesn’t mean one is better suited for you or not, but it’s a data point you should consider.

For maintenance statistics and development activity, check out the Pulse (grip) page on github. Pulse for Amber. It’s not perfect, but it gives a 30,000’ view of recent development.

I second the nod to the awesome-crystal list of web frameworks linked above.

2 Likes

I don’t see scafolding for Kemal, does Grip have scaffolding, that looked like a good feature, while I focus on back end.

With Kemal you have to create the folders and files yourself.

Example of how to structure your Kemal application.

1 Like

That kinda sucks, since I want to focus on back end stuff, but it might not be too bad, if I use a framework like Vue.

Grip does have scaffolding, REST API and GraphQL API

2 Likes