DEV Community

Luigi Morel
Luigi Morel

Posted on

Choosing a Framework

banner

A couple of days ago, I was faced with the task of choosing a tech 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.

This article first appeared on personal website https://luigimorel.co

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry 🕒

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay