Re:Goravel, Web framework inspired from Laravel in Golang
by kaba0 on Thursday July 06, 2023 @11:14AM
(#36617290)
> Then interfaces like io.Reader and io.Writer mean you can pretty much use anything to read requests and write responses.
Yeah, that’s not the hard part at all. What about routing, converting from/to json/params/cookies safely, sessions, authz/n..
Re:Goravel, Web framework inspired from Laravel in Golang
by maccard on Thursday July 06, 2023 @05:53PM
(#36623621)
I'm a fan of gin over the builtins but:
> What about routing, converting from/to json/params/cookies safely All supported out of the box with the standard library. It's also table stakes, and not the hard part.
> sessions, authz/n
This is where you need to step out of the standard
The standard library defines some decent interfaces already around HTTP handling and SQL calls. Most libraries are built to integrate with them. Then interfaces like io.Reader and io.Writer mean you can pretty much use anything to read requests and write responses.
This means that usually you're composing libraries and some application code together, rather than building everything on top of some jack of all trades framework. You get to choose the best tool for each job.