I am creating a backend server with following functonalities:
- upload files
- call another url’s as well
- validations
- implement access rules
- localization
- Oauth
- sockets
I am creating a backend server with following functonalities:
Any of those would work just fine. Which one do you prefer in terms of approach? There was also recently a discussion on the go sub about this exact topic that might be of use:
Which one you will prefer in terms of simplicity and performance?
I hav been through gin and echo and I found both great.
But echo has great documentation and middleware support.
I personally generally use stdlib + gorilla/mux or julienschmidt/httprouter. It doesn’t get much simpler than that and it has served me well. Gin has been around a long time and has great documentation. Echo also looks great and has a large user base and great documentation.
In general, performance will not be limited by your choice of web framework / router (unless they are poorly built). In my experience, you will spend most of your performance-tuning time on other things like data access. It doesn’t matter how many ns/op your router/framework is putting out when you have a query that takes 10 seconds to complete, or something like a memory leak. Many production apps have been built with both Gin and Echo; they aren’t going to limit your performance. Put a different way (by the venerable Donald Knuth):
The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.
You can build a performant API with either gin or echo. Pick your framework based on how much you want to work with it and run with it, unless you have a specific reason not to. Out of the two, I think Echo looks slightly more interesting to me. Which one do you prefer?
@Dean_Davidson, Thanks for your detailed response. I really appreciate.
I think Echo is slightly better but i will get my hands dirty on both frameworks.
I just moved from nodejs to golang, Echo feels like more of express framework.
I am just choosing a framework because i don’t wanna do stuff from scratch.
This is never ending debate. I think i just have to pick one and start.
In some scenarios iris has its own advantages.
I have seen discussions regarding this, Usually developers go with stdlib with httprouter.
I’m also using gorilla toolkit because of its simplicity
Seems great, will definitely give it a try.
This is never ending debate. I think i just have to pick one and start.
Exactly this. Good luck!
I would suggest echoing, it is easy to use.
Good luck!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.