3 ms·
The only way this feels like an improvement over Axum (a library this is built on) is a tiny syntactical change in how one hooks up a route handler function to
by davidatbu 4y ago
The only way this feels like an improvement over Axum (a library this is built on) is a tiny syntactical change in how one hooks up a route handler function to a route.
Otherwise, it feels like it adds nothing on top of Axum. In fact, I don't see a way to do statically typed query param extraction with this, so I'm not even sure if the tiny syntactical change is worth it.
Am I missing something?
- tluyben2 4y agoTo me, most of these things are (well look) too dynamic; I like prototyping in clojure where I can write vomit to try things out fast, but when it has been done and dusted, I want to cast it in concrete and steel, which includes statically typed query/body params. It is vital to how we work because any changes there would probably mean something is very wrong (malicious most likely). I never really drank the clojure (which I really like by the way and, like said, I use for prototyping/spelunking) creator koolaid that web apis are changing all the time so you need to be flexible. This, in practice, with companies that don’t fall over tomorrow, doesn’t happen that often.
- samuelbonill 4y agoyou can statically type query param extraction with c.parse_params() and c.parse_query() let value: Json<MyStruct> = match c.parse_params().await < https://github.com/graphul-rs/graphul#-resource https://github.com/graphul-rs/graphul#-resource >
- samuelbonill 4y agoor you can use an extractor in function base handlers, in struct base handlers you can use context c.parse_query()
- davidatbu 4y agoThanks! But you haven't convinced me that this adds any value right now on top of Axum, at all. Perhaps this is sort of an early release, since you mention elsewhere that the plan is to support GraphQL (and that would be the value-add)?
- samuelbonill 4y agothe idea is not to convince you, if you like another web framework like Axum, hyper, or actix you can use it, this framework is for other developers ( javascript, python, or rust developer that wants to start building microservices with rust with a friendly syntax like express or flask)
- davidatbu 4y agoI now understand the primary value-prop of this project is the friendlier syntax. Thanks for clearing that up!
- samuelbonill 4y agohttps://github.com/graphul-rs/graphul#-context https://github.com/graphul-rs/graphul#-context
- lucasyvas 4y agoI agree that Axum already fits the bill on its own.
- samuelbonill 4y agook great, continue using your favorite tools, graphul is for other developers; the idea is to receive positive feedback; I don't like discussions about what programming languages or frameworks are better than another, Golang vs Rust, etc