- Published on
Choosing a Framework
Prologue
I'm faced with the task of choosing a backend stack for a new project. At the back of my mind, I knew that I wanted to use Golang due to:
- It's statically typed (I do not to use an external type system, e.g if I chose Javascript)
- Simpler syntax (only 25 reserved words)
- Concurrency
- Blazing fast
- Easy to learn
But, then I had to choose a framework to use for the API. 🤔 Below are the questions that guided my thinking before making the decision.
- What factors did I have to keep in mind?
- What framework has the features that any project would need (e.g CORS) while building an API?
- What are the pitfalls that I need to avoid e.g performance and complexity?
- Which framework has a lower learning curve for the rest of the team (both present and past)?
- Which one has better documentation and support online?
I ended up choosing Gin, because:
- It's fast (It used a radix tree-based routing to speed things up)
- Middleware support
- Simpler
- Supports different data formats: JSON, XML & HTML.
Conclusion
The above is a mental framework that could be applied whenever faced with making a technical decision, e.g relating to frameworks or a language. The popular adage, "It depends", holds true in this case. Be ready to realistically look at the pros and cons of each technology before making a decision.
Let me know what your thoughts are about this article hi[at]luigimorel.com. Cheers!