Fascia: Improving on Express by Brian Schiller


Details
Talk:
Fascia: Improving on Express
Express has served the Node.js community pretty well, but it's starting to show its age. Frameworks from other languages have explored new ground, and we can learn from their work. We can leverage TypeScript to improve our ability to reason about code, and catch errors early. In this talk, I will propose a new framework that improves upon express, specifically in these ways:
- Built on express' foundation. No reason to throw away the many existing libraries and codebases already using express.
- "Type-aware middleware". If middleware adds a req.user or req.token property, we should have type-level confirmation. If the middleware isn't included, we should get a compile-time error in trying to use it.
- Consistent returns. Express controllers and middleware have five different ways to terminate. Let's reduce that to 2: success and error.
- Promises instead of callbacks. Return values instead of mutations. In addition to the usual benefits, this change makes controllers and middleware easier to test and more composable. We'll see that promises are the key to our accomplishing our other improvements
These ideas, first presented at DVLP DNVR 2019, are now packaged as the fascia library on npm (still in beta).
---
Speaker:
Brian Schiller
Brian is a Senior Software Engineer at Devetry. He likes SQL, TypeScript, Python, and teaching and learning from others.
---
Schedule:
6:30pm: networking
7:00pm: Talk
7:45pm: Questions
Hope you all can make it out to this great talk. If you have any questions, don't hesitate to reach out.
The event will be streamed live at https://www.twitch.tv/brookzerker and archived to YouTube after. View the playlist at https://www.youtube.com/playlist?list=PLrmY5pVcnuE9XsFJVLTbv_08V58xNk7zd
If you would like to speak at the meetup, please fill out the form at https://docs.google.com/forms/d/e/1FAIpQLSf-iiIfFMhoRLkmOSFpVMNFwC2DQTM0MVtwiPswU5vVhfV83w/viewform?usp=sf_link


Fascia: Improving on Express by Brian Schiller