4 ways Deno is different
- Web developer since
- Member of Apache and OpenJS foundations
Created by members of the original NodeJS core team with a fully clean slate based on V8 and Rust.
Secure by default
Opt into dangerzone
Common utils are builtins
Web spec standards
Modern and fast JS
Web defacto standards
First class support for JSX and TypeScript
This is important to you because
JS evolves faster than Node.
And besides more tools for the toolbox is always helpful.
1. Secure by default
All code is sandboxed
Permission to network, env, disk and process is opt in
deno run -A myfile.js
This is important because
security is our job.
Opt in means we have to deal with the consequences of security up front rather than putting it on the backburner.
Builtin authortime experience
Format, lint, bundle and test all first class
Builtin runtime experience
Runtime library and standard library cover vast majority of common use cases
deno lint --unstable myfile.js
This shed is still being painted… 💅🏾
deno fmt myfile.js
Antidote to Parkinson's law of triviality
A good overview here.
This is important to because
you are immediately productive.
No more debates about lint config, prettier config, test runner or assertion syntax. Just code.
This is important because we can build with confidence
there will be no unplanned work
due to breaking changes.
Focus on core business value instead of chasing dep fashion around.
3. Web spec standards
Yes, this includes ESMODULES
Modules are downloaded and cached first run. Same as npm except not manual!
The other big one:
No more server/client shims! Full browser interop is a goal.
Also excite: WASM
deno bundle https://denopkg.com/chiefbiiko/dynamodb/mod.ts
Yes, a builtin bundler!
deno cache --reload https://denopkg.com/chiefbiiko/dynamodb/mod.ts
Cache invalidation made easy?
- Web crypto
- DOM (eg. HTMLElement)
This is important because the web is the most important
distribution channel in human history.
Focus on core business value instead of fixing brittle compiler chains.
4. Defacto standards
This statement is more perception than data based!
Compilation is completely transparent to the end user
No compile step 🤯
This is important because TS requires maintenance
which can be handled by the runtime.
Focus on your code instead of