Live data from Hacker News

Show HN: Rocket – Web Framework for Rust

rocket.rs

81–90 of 123 posts

Re: Show HN: Rocket – Web Framework for Rust

#81
post #78

I'm not sure the syntax extension specific items are good if the intent is to present this as an argument for moving to Rust from some other language for building such a framework. I'm a bit biased: I'd avoid using syntax extensions that aren't part of the standard, because it adds a point of friction for novice and seasoned Rust developers alike.

Are you talking about the route specification syntax? It doesn't seem much worse than say flask.

Re: Show HN: Rocket – Web Framework for Rust

#82
post #80
post #74

Earlier quoted context omitted.

Personally I don't like domain-specific sugared syntax. I prefer clarity above all, especially since I hope to spend the least possible amount of time in the networking domain, and this means I'd otherwise have to relearn the syntax whenever I have to dig into the code again.

When digging into new projects I always find that there's going to be cognitive overhead because of certain abstractions. let always_forward = Route::ranked(1, Get, "/", forward); this is a normal function call, but what does it mean? Is that really better than special syntax that desugars to this code?

Yes, because function calls are much easier to trace down than special syntax.

Re: Show HN: Rocket – Web Framework for Rust

#83
post #78

I'm not sure the syntax extension specific items are good if the intent is to present this as an argument for moving to Rust from some other language for building such a framework. I'm a bit biased: I'd avoid using syntax extensions that aren't part of the standard, because it adds a point of friction for novice and seasoned Rust developers alike.

Are you talking about the route specification syntax? It doesn't seem much worse than say flask.

In this specific case, yes those particularly would be an example.

But I don't mean in comparison to other languages or frameworks, I mean in generally, as in, I'd avoid creating syntax extensions or using them in any project.

Re: Show HN: Rocket – Web Framework for Rust

#86
I am not a web development guy, so this question might seem ridiculous: To me, it always seems that there are a lot of hazards in any web development project, security-wise: A number of attacks, be it injections, XSS, etc. When seeing a new web development framework, I always ask myself: Are the basic security concerns known today addressed? How can I make sure that choosing cool web framework in language X doesn't lead me to an unsafe webapp? Perhaps somebody with more knowledge in web development could chime in here and help me; I would really appreciate that.

Re: Show HN: Rocket – Web Framework for Rust

#87
post #83

Earlier quoted context omitted.

Are you talking about the route specification syntax? It doesn't seem much worse than say flask.

In this specific case, yes those particularly would be an example. But I don't mean in comparison to other languages or frameworks, I mean in generally, as in, I'd avoid creating syntax extensions or using them in any project.

i understand your argument but if you look at " rel="nofollow">https://news.ycombinator.com/item?id=13246361>, it seems clear to me the use of syntax extensions created an awesome developer experience that would be otherwise impossible (sure you could use the built in typesystem but then you wouldn't have human readable routes in the source)

Re: Show HN: Rocket – Web Framework for Rust

#88
This looks pretty nice, it reminds me of Play! framework for Scala. I am curious to see if Rust or Swift will prevail for this kind of thing. Both have the opportunity to reach fairly deep into systems programming all the way up to UI and webapps.

Re: Show HN: Rocket – Web Framework for Rust

#89
post #58

edit: see replies to my comment. I mistook the Hyper pull request being merged for being in the latest release, but it isn't. Rocket uses Hyper for its HTTP server. So I checked to see if the Hyper HTTP server was really production-ready. Particularly, if it could handle async IO / solve the C10K problem[0]. It looks like Hyper implemented async IO[1], so it should be adequate for production use in this regard. This…

Hyper is not yet async, the preliminary work in the PR you linked to is for a version which has not been pushed to crates.io and is not finished yet.

Hyper 0.9 is async. It does not use futures/tokio ecosystem so it's ergonomics are weak in places, particularly on the client side. I believe the tokio branch of hyper is basically complete and only waiting on tokio to release.

Re: Show HN: Rocket – Web Framework for Rust

#90
post #86

I am not a web development guy, so this question might seem ridiculous: To me, it always seems that there are a lot of hazards in any web development project, security-wise: A number of attacks, be it injections, XSS, etc. When seeing a new web development framework, I always ask myself: Are the basic security concerns known today addressed? How can I make sure that choosing cool web framework in language X doesn't l…

It's a fair question, considering things like Cross Site Scripting (XSS) and Cross Site Request Forgery (CSRF) -- especially the latter -- can be mitigated by using a well constructed and tested framework.
Post reply on HN