I am about to build a small web application to solve my personal financial tracking and planning. I don’t have any ambitions to make it public, just need it for myself and my family.
Normally I would run rails new my-awesome-app and next steps would be pretty straightforward as I am 10 years Ruby/Rails developer or in an edge case, I would use simple Sinatra or Node.js, but that is a not good way when you just want to add features without solving orchestration, libs etc…
But today I said I will finally give a try to Crystal. The question is which framework use? I would love to see in the answers your experiences of problem you tried to solve and Crystal framework you chose. What it gives you compared to previous experience and what it takes as it is still new. Missing features, missing libraries, etc…
From the quick research, I see 3 options and it is Amber, Lucky and Onyx. All seem to have a similar set of features. Later I will write the differences which I see as a newcomer.
Now I would love to see your answers which will help me and other newbies from choosing the right tool for their projects.
@pynixwang That is kind of nonvaluable answer. Without a little more elaboration, nobody can learn from it and nobody can make it better for the future.
And we live in a world of many possibilities: once I made a pretty complex project with language I just learned (Clojure) and without any advanced framework. Just basic “Kemal like” web server and ton of libs. It was a mess, but it worked and served its purpose. Crystal and its world are much more advanced than this was
Those would be the more popular ones currently, in addition to Kemal.
However which one to use depends on what type of project you are making. If you would be making a railsesque app with server rendered pages, then one of those three would probably be the way to go.
Kemal would be more suited for a simpler site, it’s more based on Sinatra and I would say less of a full framework than the other options. That does come with benefits as there wouldn’t be as much to learn/setup just to have features you’re not going to use.
If you are wanting to make a JSON API to server a frontend JS framework, could checkout Athena. It is kinda unique in how it does some things compared to other frameworks, more similar to a Symfony or Spring framework style. Athena was created with the JSON API mindset, but it’s also able to render ECR if you liked the features it offered. I’d be interested in seeing someone using it for server rendered pages to see if there are any issues/improvements that could be made. Or anything as a newcomer you think I could improve either in the docs or usage of it @schovi.
In the end it comes down to which one you think fits your need the most; with the right features, good docs, etc.
I think amber is a good place to start and a good default. It also has recipes that can bootstrap you into vue and react if you are into that. I have an Onyx app and a Clear + Kemal app they are great and have their strengths but they are a little more involved and not as straight forward to implement.
All good suggestions in here so far, and really it’s only you who can answer your own question depending on your criteria and appetite for ‘risk’ (in the framework lock-in sense). I found the framework selection process to be quite difficult for crystal as you have many community members building and maintaining their own frameworks, which for the record I do belive to be a healthy thing for the crystal ecosystem but creates the situation where there appear to be as many frameworks as there are users of those frameworks. That is to say that framework maturity feels a little lower than other languages.
With that being said I opted to go with Spider-Gazelle for a number of reasons:
‘Corporate’ backing - although a crystal framework never going to have a backer such as facebook at this stage, I like that they’re dogfooding their own framework and that it is live to real-world clients.
Understandable - I was able to scan through the source and understand at a relative glance what was going on. The abstractions are familiar to me, and likely will be to a lot of Rails developers. Alongside this, the docs are of a high standard and are precise enough for me to parachute in and out without feeling like I’ve got to learn more than I need to. Perhaps I’m lucky in this instance but they feel quite tailored to my skill level as a developer (not too advanced to merely decorate the internal classes, not to basic to feel like it’s handholding me through every concept.)
Light enough to be replaceable - this is probably one of the bigger ones and I don’t say it to cause offence, I mean it as a feature and a compliment. Although heading in the right direction I don’t yet think the community has grown large enough for any of the frameworks to reach true critical mass. It goes hand in hand with being understanable but I like that it’s slim enough for me to rip it out easy enough should I need to.
Responsiveness of communication - @stakach has responded to the few issues and PR’s I’ve raised very quickly. Any framework you choose will have some bugs so the speed and willingness of maintainers to merge PR’s and interate on their framework is crucial.
These are really just some notes about the personal trade-offs I’ve made so they may or may not be applicable. FWIW if you’re after an ORM I also ended up on Clear primariliy due to responsiveness of communication/iteration and feature set.
All other suggestions in this thread are also good choices and worth consideration