Hack Reactor, 2020-01-16
Laurie Voss
@seldo
Did things at
Doing things at: Netlify
Web development:
By the end of this talk,
you will be a web developer.*
* A beginner, but still a web developer.
Four reasons.
1 You visited Amazon.com
2 You downloaded the web page
3 Your browser ran the code
4 It rendered the page
5 You clicked a button
6 The code interpreted your click
7 Your browser told Amazon what to do
8 You got sent to a new web page
1 How the internet works
2 How the web works
3 How browsers work
4 How HTML works
5 How CSS works
6 How JavaScript works
7 How security works
8 How APIs work
Don't worry; we got this.
The first web page.
The web = Hypertext + HTTP
Computers talking to each other over wires.
The Cloud is just other people's computers.
IP = Internet Protocol
Old style, IPv4:
157.131.152.72
New style, IPv6:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
(We don't talk about IPv5)
Computers passing packets around.
It's another computer.
Many computers, many wires, to get to a destination.
"If I just keep passing it around it'll get there"
It relies on humans to tell it.
And sometimes evil!
Use a domain name.
Domain Name System
(we are very good at naming things)
Maintained by a very large number of computers.
13 very special computers.
They don't.
DNS is too trusting.
Light travels fast, but being closer is always faster.
And it shows.
1 You visited Amazon.com ✅
2 You downloaded the web page
3 Your browser ran the code
4 It rendered the page
5 You clicked a button
6 The code interpreted your click
7 Your browser told Amazon what to do
8 You got sent to a new web page
<b>Hello</b>, there.
HTML = HyperText Markup Language:
HyperText Transfer Protocol
We continue to be good at names.
GET /bob.html
Host: seldo.com
HTTP/2 200
Hello.
<!DOCTYPE html>
<html>
<head>
<title>My web page</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Hello!</p>
</body>
</html>
(Colors just for readability)
1 You visited Amazon.com ✅
2 You downloaded the web page ✅
3 Your browser ran the code
4 It rendered the page
5 You clicked a button
6 The code interpreted your click
7 Your browser told Amazon what to do
8 You got sent to a new web page
A: Parsing
B: Tree rendering
C: Layout
D: Painting
E: Interactivity
What browsers do with HTML:
What browsers do
What browsers do
What browsers do
What browsers do
What browsers do
<address> <article> <aside> <footer> <header> <h1>, <h2>, <h3>, <h4>, <h5>, <h6> <main> <nav> <section> <details> <dialog> <menu> <summary>
Tim
Vint
Not a presentation format.
I like <a href="https://apple.com">Apple</a> laptops.
You can find this book at my <a href="https://amazon.com">favorite bookstore</a>.
<select>
<option>Afghanistan</option>
<option>Angola</option>
...
</select>
By default, and for free.
A Braille screen reader
Thanks, Tim.
We tried the other way and it was bad.
1 You visited Amazon.com ✅
2 You downloaded the web page ✅
3 Your browser ran the code ✅
4 It rendered the page ✅
5 You clicked a button
6 The code interpreted your click
7 Your browser told Amazon what to do
8 You got sent to a new web page
vs
1 You visited Amazon.com ✅
2 You downloaded the web page ✅
3 Your browser ran the code ✅
4 It rendered the page ✅
5 You clicked a button ✅
6 The code interpreted your click ✅
7 Your browser told Amazon what to do
8 You got sent to a new web page
They are, in fact, out to get you.
You can do it. I believe in you.
Monster In The Middle
Transport Layer Security
(replaces SSL, Secure Sockets Layer)
Proof of identity
You have to trust somebody, and that's the problem.
They're not infallible.
How do you prove you are who you say you are?
We are really, really good at naming things.
1 You visited Amazon.com ✅
2 You downloaded the web page ✅
3 Your browser ran the code ✅
4 It rendered the page ✅
5 You clicked a button ✅
6 The code interpreted your click ✅
7 Your browser told Amazon what to do ⬅️
8 You got sent to a new web page
GET /bob.html
Host: seldo.com
HEAD GET POST PUT PATCH DELETE CONNECT OPTIONS TRACE
POST /buythething.html
Host: amazon.com
Cookie: mysecret=nd4vbpotp
Buy book 123.
HTTP/2 200
Hello.
HTTP/2 302
Location: http://amazon.com/congrats.html
1 You visited Amazon.com ✅
2 You downloaded the web page ✅
3 Your browser ran the code ✅
4 It rendered the page ✅
5 You clicked a button ✅
6 The code interpreted your click ✅
7 Your browser told Amazon what to do ✅
8 You got sent to a new web page ⬅️
The cloud is just lots of other computers.
Don't worry, this is the easiest part.
1. Create a folder
2. Save your HTML into a file called index.html
3. Put index.html into the folder
4. Drag and drop the folder onto
There is no step 5.
1 You visited Amazon.com ✅
2 You downloaded the web page ✅
3 Your browser ran the code ✅
4 It rendered the page ✅
5 You clicked a button ✅
6 The code interpreted your click ✅
7 Your browser told Amazon what to do ✅
8 You got sent to a new web page ✅
🎉
Do it later.
And if so which one?
Computers are frameworks upon frameworks
until eventually you get to hot sand.
It doesn't matter which one.
The web is constantly evolving.
and also it's fun.
but the web is better
Simple but world-changing.
And so is the web.
And I want you to try.
These slides are at