6 ms·
Quinn – A web framework designed for things to come
- vortico 11y agoOn an unrelated note, do arrow functions inherit the parent context's `this` and `arguments` correctly in Node or io.js now?
- talles 11y agoGood question, I wonder that too. I'm kinda tired of var that = this.
- bl4ckm0r3 11y agoThat's why!
- sync 11y agoThey definitely inherit `this`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- SanderMak 11y agoI believe the arguments should not be available in arrow functions according to the spec. (source: discussion here https://github.com/Microsoft/TypeScript/issues/1609 https://github.com/Microsoft/TypeScript/issues/1609)
- benologist 11y agoThey explicitly do that in ES6: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- vortico 11y agoRight, but implementation hadn't caught up to spec since I last checked.
- benologist 11y agoIt's natively supported in typescript and iojs, and babel (prev. 6to5) + other libs enable it in browsers.
- jkrems 11y agoAs you might have guessed by the missing/broken links, the website is still a WIP.
- Killswitch 11y ago> 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.
- jkrems 11y agoYes, 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.
- bshimmin 11y ago"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.
- justin_vanw 11y agoIt'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.
- reverius42 11y agoYou can call it amateurish and shitty all you want, but I'll take Express (on Node) over Flask or Tornado (on Python) any day.
- justin_vanw 11y agoWell, 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.
- NhanH 11y agoThis is the first time I've seen Flask being called crappy. Do you mind elaborate why?
- Twirrim 11y agoBecause it's not written in javascript, obviously
- nealrs 11y agoFlask 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.
- DiggityDug7 11y ago> 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.
- jauco 11y agoThat's why quinn uses async/await
- michaelmior 11y agoTitle attribute of the massive image on the top of the page "Huge logo to hide any actual information"
- mrmondo 11y agoI'm not convinced we need more JavaScript frame works also FYI the site loads very slowly on my iPhone 6+, Australia.
- jgalt212 11y agoWhile 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.
- ianbicking 11y agoReminds 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.