Open ReneWerner87 opened 2 years ago
It looks very cool.
This is an idea that I have never seen before. I'm looking forward to it.
I've tried implementing similar on the top of Goravel Framework https://github.com/sujit-baniya/goravel/blob/master/app/helpers/view.go
I've used go-chi
, gin-gonic
and fiber
router interchangeable
Hi @ReneWerner87 , I would like to know if you need any help in the flavored fiber versions... I was thinking in something like the adaptor but for the whole app like:
package main
import (
"github.com/gofiber/fiber/v2"
"flavours/laravel"
)
func main() {
app := laravel.New(fiber.New())
// now here the router looks like laravel way
app.Listen(":3000")
}
So in that way each flavor works as a "proxy" to the real fiber app. Each flavor has its own use cases and syntax. What you think?
will start with the implementation on wednesday
after that i might need help for the adaptor
current state https://github.com/gofiber/fiber/compare/main...v3-Interchangeable-router
this feature is bigger than expected and unfortunately will not be developed in v3
we first have to standardize everything step by step besides, the gain is not too big and the usage probably only reaches a small niche of developers
our plan is to enable major changes more quickly in the future, as other large software companies have done in recent years
so that our breaking changes are not a problem in the future and this can be driven forward slowly
Feature Description
π£οΈ through user feedback we have learned that the syntax and behavior of route registration and expiration is a much discussed topic
depending on which frameworks/programming languages the developers have had good experiences with, they want syntax and behavior that is close to what they know and have had positive experiences with.
π‘the idea
is to address the problem by creating the possibility to use different router syntax and/or behavior via contribution packages
with this it should be possible to use different concepts of route registration syntax like a laravel router or other routers like a radix tree router, which has a completely different behavior when processing the routes.
π’ steps necessary to make it possible
π Sidenote:
β Not yet defined
app.Router()
Related issues
2190
2200
1829
Code Snippet (optional)
Checklist: