The Deno Show
In this episode of Syntax, Scott and Wes bring you the long-awaited Deno show — what it is, what it replaces, how you can use it, and more!
Deque’s free axe browser extension helps developers instantly catch 50% of accessibility bugs while they code. It’s lightweight, easy-to-use, and has zero false positives. Get started for free at deque.com/axe.
If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up.
Mux Video is an API-first platform that makes it easy for any developer to build beautiful video. Powered by data and designed by video experts, your video will work perfectly on every device, every time. Mux Video handles storage, encoding, and delivery so you can focus on building your product. Live streaming is just as easy and Mux will scale with you as you grow, whether you’re serving a few dozen streams or a few million. Visit mux.com/syntax.
02:13 - What is it?
- Built by Ryan Dhal — same guy who initially built Node.js
- API is JS or TS out of the box
04:55 - Does it replace / what is it in relation to?
- It’s a replacement for Node.js
- Web Server Frameworks like Express will run on Deno, but Express itself won’t currently run because they are build on Node APIs
- Deno can be used for anything, so it can be used for serverless functions, or a traditional web server
- Serverless, Deno and TypeScript with Brian Leroux
- React / Vue / Svelte
- It comes with all browser APIs out of the box!
- Window + Add Event listener
- Webpack / Parcel / Snowpack
- Deno is a bundler
- Deno is a formatter
- Deno is a TypeScript compiler and runtime
- Deno is a linter
- Deno is a Test Runner
- Deno is a package manager - it pulls in packages from URLs
14:51 - Modules
- ES modules from the start
- Modules are loaded from URLs
- Why? No package registry to worry about
- This is how the browser works
- Import from URL
- You can also specify it in the json file
- Fetch is built in!
- It’s a browser API, but who cares?!
- Browser APIs
- window.add event Listener
- Deno is event based, like the browser
20:10 - A nice standard library
22:14 - WASM
- Deno can run WASM with the same APIs that the browsers can
- Node is doing this too (experimental)
25:06 - Multi-threading with Web Workers
26:13 - Speed
- It’s fast!
- They took everything they learned from Node - good and bad
- Built in Rust
- From what we understand:
- V8 is written in C++
- How it talks to V8 - Rust sits in-between the JS runtime, and the C++ V8 runtime and communicates between the two.
29:44 - Security
- You can specify which dirs it can access
33:39 - Run from anywhere
37:43 - Async out of the box
- Everything is based on async + await / promises right away. No callback APIs, no promise wrapping.
- Top level await
38:53 - Node Compatibility
- Node APIs are being filled
- This means if a browser package ships an ES module of a package, we can just import it
42:21 - What we’ve built
- A bunch of sample scripts
- Lots of simple demos
- Very intuitive
- Fetched and downloaded every single Syntax mp3
46:54 - Hosting
48:29 - Final thoughts
- Scott: Now is a great time to learn, but don’t put any crucial work into that space unless you are ready to write everything. Libraries are still being written and evolved. Docs are still sparse. Many things didn’t work on first try. I had to read lots of source.
- Wes: If You know JS or TS, you are already 90% there.
- The package ecosystem isn’t there yet
- Scott: Deno 101 For Web Developers - Sign up for the year and save 25%!
- Wes: All Courses - Use the coupon code ‘Syntax’ for $10 off!