29 comments

[ 0.24 ms ] story [ 109 ms ] thread
On an unrelated note, do arrow functions inherit the parent context's `this` and `arguments` correctly in Node or io.js now?
Good question, I wonder that too.

I'm kinda tired of var that = this.

As you might have guessed by the missing/broken links, the website is still a WIP.
> Quinn was created to address the utter lack of small, elegant web frameworks in the node ecosystem.

Uhhh, that's because all those frameworks linked are designed to get you up and running with almost everything you need quickly, not just handling routing and leave you setting up boilerplate.

Yes, and if you want to seriously build a product, each and every one of those would be a better fit than Quinn. I'm saying that as the author of Quinn. It's a bunch of thought experiments, not a production-ready piece of software.
You should make it more clear. By default, when we see a page like that, we assume that someone is putting it up to use it.
Definitely a valid point. I updated the wording a bit already. It was definitely not meant for a larger audience in its current form.
"It achieves breathtaking performance, made possible by the almost complete absence of features." While pithy, I'm not really sure that's the best way of selling your product.
Not really trying to sell it. It's a playground / thought experiment and not something I would propose someone use in production. Thus also all the links to other frameworks.
It's a rite of passage to create a crappy, half baked web framework. It's a great thing that every web developer should do so that they understand, end to end, the tensions facing the creators of web frameworks, the tradeoffs between the various attempts to balance purity with convenience, and how much 'magic' you want a framework to perform vs how much should be completely explicit.

However, nobody should ever use these frameworks, there are probably 5000 of them floating around out there in github, and beyond an exercise in pedagogy they are mostly half broken and stupid.

So to the author of Quinn: don't let this get you down, stay excited, but realize that it's possible that you can't just swoop in and do something great on your first try. OTOH, node.js' ecosystem is so amateurish and shitty that maybe you actually could.

You can call it amateurish and shitty all you want, but I'll take Express (on Node) over Flask or Tornado (on Python) any day.
Well, to be fair, Flask is kind of crappy and does anyone even use Tornado anymore?

I always just set up a project myself using Werkzeug, in the era of WSGI, almost all of the heavy lifting for web apps is done automatically and outside of your application anyway.

This is the first time I've seen Flask being called crappy. Do you mind elaborate why?
Because it's not written in javascript, obviously
Flask isn't crappy. It's an excellent way for learners & aspiring polyglots (like me) to build a functional app and learn about routing. And it's got a bazillion useful extensions.

Is it great for a production environment? No clue. Same with Tornado. But it's definitely a solid pick.

>does anyone even use Tornado anymore?

We do for as many apps as possible. The async / callback structure is far easier for our developers to understand over Javascript/Node. Tornado is significantly different from other Python frameworks like Django and Flask, but IMHO it is under appreciated.

> Instead of taking the response as a second argument, the dispatch function is expected to return the response... The moment the function returns, both the status code and all headers are known.

I highly doubt this convention will work. You need to be able to return errors or DB information in the response code and headers, which would be impossible since Node is nonblocking. Even something as basic as storing session information in Redis suddenly becomes impossible. This seems like it gives a very minor benefit and causes a whole lot of problems.

That's why quinn uses async/await
Title attribute of the massive image on the top of the page

"Huge logo to hide any actual information"

I'm not convinced we need more JavaScript frame works also FYI the site loads very slowly on my iPhone 6+, Australia.
While in general it's important that sites load well on mobile, I'm not sure that's a valid critique for a developer tools site where most users will have at least a well-powered laptop with a large screen. I'm sure you're familiar with that old saw about the correlation between screen size and productivity.
Reminds me of WSGI in Python – which is to say, the simplicity of functions that take requests and return responses, and then all your composition techniques are regular programming techniques. (With Promises added into the mix of course, but then you have .then() chaining with similar effect.)

It doesn't seem like a huge deal, but it's so much more convenient, makes it easier to think about the code, modify and rewrite values, all the normal programmy stuff people like to do in programs with values, instead of objects and actions. And yeah, if you use websockets or HTTP/2 or some other low-level stuff then it's going to break down, but there's only a couple of those and they should each just get their own separate layer.