Slide 1

Slide 1 text

1 / 11 DENO, A new javascript way Prakhar Dixit, Frontend developer, MyGlamm

Slide 2

Slide 2 text

2 / 11

Slide 3

Slide 3 text

3 / 11 What is Deno? Deno is runtime for executing JavaScript and TypeScript outside the browser in a single executable (denocode). Deno is secure by default, with no file, network, or environment access unless explicitly enabled. It is built on top of: ● V8 ● Rust ● Tokio (event loop) ● TypeScript

Slide 4

Slide 4 text

4 / 11 Why Deno, when node is there? Problems of using NodeJs: ● A poorly designed module system, with centralized distribution. ● Lots of legacy APIs that must be supported. ● Security. (These problems aren't unique to Node. Python and Ruby suffer similarly)

Slide 5

Slide 5 text

5 / 11 How Deno attempts to correct design mistakes in Node. ● ES modules are the one and only module system ○ HTTP URLs are used to link to third party code ○ Deno has the ability to fetch resources itself, so it is its own package manager. ● Deno is secure by default ○ Users must give extra permission to access the disk, network, or otherwise do privileged operations. ● Deno maintains browser compatibility ○ The subset of Deno programs which are written completely in JavaScript and do not use the global Deno object should also run in a modern web browser without change.

Slide 6

Slide 6 text

6 / 11 Examples import { serve } from "https://deno.land/[email protected]/http/server.ts"; for await (const req of serve({ port: 8000 })) { req.respond({ body: "Hello World\n" }); } And you can run by deno run example.js. Other commands include: deno -h REPL deno --types cat program location.href import.meta

Slide 7

Slide 7 text

7 / 11 Comparison of deno with linux

Slide 8

Slide 8 text

8 / 11 Deno internal design

Slide 9

Slide 9 text

9 / 11 Deno performance

Slide 10

Slide 10 text

10 / 11 Deno I/O Performance

Slide 11

Slide 11 text

11 / 11 Thanks