News for hackers. Stuff that matters.
Re:Show HN: An Express-inspired web framework for Rust by davidatbu on Sunday October 16, 2022 @01:52AM (#33221357)
The only way this feels like an improvement over Axum (a library tjis os 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. I'm 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?

Re:Show HN: An Express-inspired web framework for Rust by tluyben2 on Sunday October 16, 2022 @04:09AM (#33221996)
To 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.

Re:Show HN: An Express-inspired web framework for Rust by samuelbonill on Sunday October 16, 2022 @08:28AM (#33223079)
you 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 >

Re:Show HN: An Express-inspired web framework for Rust by samuelbonill on Sunday October 16, 2022 @08:40AM (#33223138)
or you can use an extractor in function base handlers, in struct base handlers you can use context c.parse_query()
Re:Show HN: An Express-inspired web framework for Rust by davidatbu on Monday October 17, 2022 @02:31PM (#33237744)
Thanks! 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)?
Re:Show HN: An Express-inspired web framework for Rust by samuelbonill on Monday October 17, 2022 @02:55PM (#33238003)
the 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)
Re:Show HN: An Express-inspired web framework for Rust by davidatbu on Monday October 17, 2022 @03:02PM (#33238085)
I now understand the primary value-prop of this project is the friendlier syntax. Thanks for clearing that up!
Re:Show HN: An Express-inspired web framework for Rust by samuelbonill on Sunday October 16, 2022 @08:45AM (#33223173)
Re:Show HN: An Express-inspired web framework for Rust by lucasyvas on Sunday October 16, 2022 @09:44AM (#33223575)
I agree that Axum already fits the bill on its own.
Re:Show HN: An Express-inspired web framework for Rust by samuelbonill on Monday October 17, 2022 @03:03PM (#33238098)
ok 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