-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·542 lines (508 loc) · 20.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dev & DOM</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<!--custom CSS -->
<link rel="stylesheet" href="./devdom.css" id="custom">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<script type="text/javascript" src="./js/jquery.min.js"></script>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-background-transition="slide" data-background-size="400px" data-background-position="50% 95%" data-background="./img/sqm-bg-light.png">
<h1>The Developer and the DOM</h1>
<h3>A history of manipulation and abstraction.</h3>
<p>
<small>Presented by <a href="">Zack Michael</a> / <a href="">Greg Noack</a></small>
</p>
<aside class="notes">
<p>Hello everyone! Thanks for coming. This is "The Developer and the DOM, a history of manipulation and abstraction."</p>
</aside>
</section>
<section data-background-transition="slide" data-background-size="400px" data-background-position="50% 95%" data-background="./img/sqm-bg-light.png" >
<h2>Who are we?</h2>
<p>We are two developers from Squishymedia.</p>
<div class="half"><p>Zack Michael</p><img class="clean" src="./img/zack_michael.jpg" alt="Zack Michael" /></div>
<div class="half"><p>Gregory Noack</p><img class="clean" src="./img/gregory_noack.jpg" alt="Gregory Noack" /></div>
<aside class="notes">
<p>My Name is Gregory Noack and this is Zack Michael... and we both really like Javascript. </p>
<p>We each have ten plus years in development and design. </p>
<p>Zack is a Javascript Engineer and I am a senior Frontend developer.</p>
<p>We work at Squishymedia, an agency right here in East Portland.</p>
<p>Squishymedia specializes in data driven applications and websites.</p>
</aside>
</section>
<section data-background-transition="slide" data-background="./img/2001.gif">
<h2>Why are we here?</h2>
<aside class="notes">
<ul>
<li>We are here to entertain and amaze you. But falling short of that hopefully our slides will make you laugh</li>
<li>We plain to:</li>
<li>Trace the trajectory of client-side javascript from the begining until present day.</li>
<li>With that said, Neither one of us is David Crockford (a master of javascript and javascript lectures)</li>
<li>We plan to explain some of the problems faced by developers and the solutions that have evolved.</li>
<li>We will also examine a few of the current problems in more detail</li>
<li>And Finally we will look at where javascript may be headed</li>
</ul>
</aside>
</section>
<section>
<section>
<h2>Where did javascript come from?</h2>
<pre class=" code"><span class="jsmark-f">document</span><span class="jsmark-m ">.write</span><span class="jsmark-par">(</span><span class="jsmark-q ">"</span><span class="jsmark-str ">Hello Open Source Bridge!</span><span class="jsmark-q ">"</span><span class="jsmark-par ">)</span><span class="jsmark-closing">;</span></pre>
<aside class="notes">
<ul>
<li>So Where did Javascript come from?</li>
<li>Originally, it was developed as a server-side scripting language</li>
<li>Developed by Brendan Eich in 1995, while he was working for Netscape.</li>
<li>Supposedly he developed it in a week</li>
<li>Which adds to its cred and also it criticism</li>
<li>it was developed under the name Mocha, it shipped being called Livescript, and was later changed to JavaScript aka ECMAScript.</li>
<hr />
<li>They attached the name Java to confuse and hopefully attract developers that were using the hot new langauage Java.</li>
<li>Begining in 1996 standards were written, Netscape pushed it into the Browser and of course Microsoft refused to play along and developed JScript a port of javascript.</li>
<li>which contributed to what is known as the browser wars</li>
<li>this devide left javascript and jscript both neglected and it wasn't until</li>
<li>1996, Netscape announced that it had submitted JavaScript to Ecma International for consideration as an industry standard. Subsequent work resulted in the standardized version named ECMAScript.</li>
<li>Currently javascript is at ECMAScript 6 published in 2015</li>
</ul>
</aside>
</section>
<section data-transition="zoom-in fade-out">
<h2>This DOM?</h2>
<img class="clean" src="./img/DOM.jpg" alt="DD" />
<aside class="notes">
<p>So what this Dom we talking about? Its not this guy?</p>
</aside>
</section>
<section data-transition="fade-out">
<h2>Nah, This DOM!</h2>
<img class="clean" src="./img/DOM-js.png" alt="DOM JS" />
<aside class="notes">
<p>We are talking about The Document Object Model or the "DOM", This is a cross-platform and language independent convention for representing and interacting with objects in HTML</p>
<p>With the DOM, JavaScript can access and change all the elements in a HTML document</p>
<ul>
<li>The history of the Document Object Model is intertwined with these "browser wars"</li>
<li>eventually W3C began working on a standardized DOM
<ul>
<li>DOM Level 2 was published in late 2000. It introduced the "getElementById", which is still used today</li>
<li>the current release, DOM Level 3 came out in 2003</li>
<li>and DOM Level 4 is currently being developed</li>
</ul>
</li>
</ul>
</aside>
</section>
</section>
<section>
<h2 class="overlight">What was javascript intended for?</h2>
<aside class="notes">
<ul>
<li>Javascript was intended to be a language that would be appealing to nonprofessional programmers</li>
</ul>
</aside>
</section>
<section >
<img class="clean" src="./img/whatever.jpg" alt="DD" />
</section>
<section data-background-size="100%" data-background="./img/netscape.gif">
<aside class="notes">
<ul>
<li>it was designed to run in Netscape Navigator and it's success in the early broswers led to it becomeing the standard scripting language of the web</li>
<li>Which is why you can find it in every modern browser today.</li>
<li>Only within the last 10 years have people really started using it as a dynamic object-oriented "programming" language</li>
</ul>
</aside>
</section>
<section>
<section data-background-transition="slide" data-background="./img/browser-war-illustration.jpg">
<div class="overlight">
<h2>Problem 1:</h2>
<p> All the browsers are different</p>
</div>
<aside class="notes">
<ul>
<li>There has almost always been an agreed upon standard that the browsers must support.</li>
<li>But there have always been differences in what features got implemented.</li>
<li>And features above an beyond the spec have always had differences if they make it to more than one browser at all.</li>
<li>Today browsers are much better - but still not perfect</li>
</ul>
</aside>
</section>
<section>
<h2>Pain Points</h2>
<ul>
<li>Selector Searching</li>
<li>DOM traversal</li>
<li>DOM manipulation</li>
<li>XHR/AJAX</li>
</ul>
<aside class="notes">
<ul>
<li>It hurts the most with the features we want to use the most.</li>
<li>I wasn't a dev at the time but people talk about early XHR like a traumatic experience.</li>
</ul>
</aside>
</section>
</section>
<section>
<section>
<h2>Solution: Libraries that provide a common API</h2>
<ul>
<li>jQuery</li>
<li>Mootools</li>
<li>Prototype</li>
<li>Others</li>
</ul>
</section>
<section>
<img class="clean" style="width: 900px; background: #EEE;" src="./img/jquery-original.png">
</section>
</section>
<section>
<section data-background-transition="slide" data-background="./img/panda.gif" >
<div class="overlight">
<h2>Problem 2: Application Architecture</h2>
<p class="orange">How do we organize our applications?</p>
</ul>
</div>
<aside class="notes">
<ul>
<li>of course we can figure out how to organize an app</li>
<li>but why are we would we all be doing it independently</li>
<li>I love nerding out about design patterns but I don't want to tell my coworkers our project is going to be a month late because I'm really into designing a new unconventional framework</li>
<li>What happens when a new dev takes over?</li>
<li>How do we not rage quit like that panda when we take on old code.</li>
</ul>
</aside>
</section>
<section>
<img class="clean" style="width: 900px; background: #EEE;" src="./img/jquery-arch.png">
<aside class="notes">
<span>How do we handle?</span>
<ul>
<li>This doesn't look to bad but as we grow the project how do we handle...</li>
<li>separating concerns</li>
<li>maintaining multiple files</li>
<li>working with other developers on a project</li>
<li>sharing our solutions with the rest of the world (open source)</li>
</ul>
</aside>
</section>
</section>
<section>
<section >
<h2>Solution: Early frameworks</h2>
</section>
<section data-background-transition="slide" data-background="./img/karatekids.gif">
<ul class="overlight teal">
<li>ExtJS</li>
<li>YUI</li>
<li>Dojo</li>
<li>and many more</li>
</ul>
<aside class="notes">
<li>The solution to some of these problems came in these early framewords</li>
<li>Not totally different from the browser patching libraries like jquery</li>
<li>Many early libs covered mixes of browser support issues and arch concerns</li>
<li>They did</li>
<li>provide sets of idioms for developers to follow</li>
<li>this not only allows for ease of working together but allow people to contribute small reusable chunks of functionality</li>
</aside>
</section>
</section>
<section>
<h2>Complexity increases</h2>
<div class="">
<img class="clean" style="width: 50px" src="./img/ajax.gif"><br/><span class="orange">Loading Everything...</span><br/><br/>
</div>
<ul>
<li>Ajax everywhere </li>
<li>More complex interactions</li>
<li>Mobile devices create a new experience</li>
</ul>
<aside class="notes">
<ul>
<li>What's going on?</li>
<li>The work we've talked about so far is paying off</li>
<li>better sites are being built and the internet is growing in use as a result</li>
<li>Because it's popularizing people want to pay to put more things on the internet</li>
<li>Everyone starts getting phones that have browsers</li>
</ul>
</aside>
</section>
<section data-background-transition="slide">
<section data-background="./img/mobileweb.jpg">
<div class="overlight">
<h2>Problem 3: Mobile Web</h2>
<ul>
<li>Tiny screens</li>
<li>Spotty networks</li>
<li>Weak hardware</li>
</ul>
</div>
<aside class="notes">
<ul>
<li>Responsiveness is now a big concern</li>
<li>What does the application do if your network dies for a second?</li>
<li>How do we fix this without adding too much processing overhead</li>
</ul>
</aside>
</section>
</section>
<section>
<section>
<div class="overlight">
<h2>Solutions:</h2>
<ul class="teal">
<li>Responsiveness</li>
<li>Device detection</li>
<li>Single Page Application (SPA)</li>
</ul>
</div>
</section>
<section>
<h2>Single Page Applications</h2>
<img class="clean" style="width: 550px;" src="./img/spa.png">
<aside class="notes">
<ul>
<li>Instead of asking the server for a new page everytime something changes we get THE single page from the server once and change it as we need.</li>
<li>After initial load network traffic becomes much smaller</li>
<li>If data doesn't load, you still have the application running.</li>
</ul>
</aside>
</section>
</section>
<section data-background-transition="slide" data-background="./img/complex.jpg">
<div class="overlight">
<h2>Problem 4: How to deal with increased complexity</h2>
<ul>
<li>Single page applications</li>
<li>Tons of logic on the client</li>
<li>Routing</li>
<li>Templating</li>
<li>Need to focus on business logic</li>
</ul>
</div>
</section>
<section>
<section data-background-transition="slide" data-background-repeat="repeat" data-background-size="400px" data-background="./img/frameworks.png" data-background-color="#000">
<div class="overlight">
<h2>Solution: Next generation frameworks</h2>
<ul class="teal">
<li>Backbone</li>
<li>Angular</li>
<li>Ember</li>
<li>Knockout</li>
</ul>
</div>
<aside class="notes">
<ul>
<li>Angular first but not initial front-runner</li>
<li>Angular curiously absent from google applications</li>
<li>backbone first adopted framework</li>
<li>Range widely in scope of what they cover</li>
</ul>
</aside>
</section>
<section><h2>What did they add?</h2></section>
<section>
<ul>
<li>Client side routing</li>
<li>Data Binding</li>
<li>Module systems</li>
<li>Style Guides and Best Practices</li>
</ul>
</section>
<section>
<h2>Diffing algorithm</h2>
<img class="clean" style="width: 550px;" src="./img/diffing.png">
<aside class="notes">
<ul>
<li>Used to have to think about the business logic we wanted and then correlate that to which DOM elements we are going to add, move, and destroy and how to actually make that happen.</li>
<li>Now we can link a data point to an element or style and know that when one changes the other will</li>
<li>ALlows us to focus on business logic not DOM logic</li>
<li>DOM interaction optimization can happen behind the scenes in one place</li>
</ul>
</aside>
</section>
</section>
<section>
<h2>Problem 4: Performance and Scalability</h2>
<ul>
<li>Recent frameworks were built on server side paradigms</li>
<li>They still relied on the DOM</li>
</ul>
<aside class="notes">
<ul>
<li>Separating templates and logic doesn't always make things easier to understand.</li>
<li>Server side architecture can be overkill</li>
<li>DOM manipulations are some of the slows things we can do and we're still heavily using them.</li>
</ul>
</aside>
</section>
<section>
<section>
<h2>Solution: Another wave of framework evolution</h2>
<ul>
<li>Angular 2.0</li>
<li>React</li>
<li>Riot</li>
<li>JSBlocks</li>
</ul>
</section>
<section>
<h2>Virtual DOM</h2>
<img class="clean" style="width: 500px;" src="./img/react-diffing.png">
<aside class="notes">
<ul>
<li>We can use non DOM javascript performance to update how are view should look.</li>
<li>And selectively apply those DOM changes in the most performant way.</li>
</ul>
</aside>
</section>
<section>
<h2>Virtual DOM Possibilities</h2>
<img class="clean" style="width: 500px;" src="./img/virtual-dom-possibilities.png">
<aside class="notes">
<ul>
<li>Template your interface on any platform</li>
<li>Then render it on any platform</li>
<li>And go back and forth</li>
<li>Only a view layer, but gets us closer to write once run anywhere</li>
</ul>
</aside>
</section>
<section data-background-transition="slide" data-background="./img/javascript-guy.jpg">
<section></section>
<section>
<div class="half overlight">
<h2>Language enhancements</h2>
<ul>
<li>ECMA Script 6</li>
<li>TypeScript</li>
</ul>
</div>
</section>
</section>
<section>
<h2>Components</h2>
<ul>
<li>Encapsulate functionality</li>
<li>Build views like nesting dolls</li>
</ul>
</section>
<section>
<div class="form-group">
<label id="floatlabel">superhero name</label>
<input placeholder="superhero name" type="text" id="floatinput">
</div>
</section>
<section>
<img class="clean" src="./img/floatlabel.png"/>
</section>
<section>
<img class="clean" src="./img/floatlabelcomponent.png"/>
</section>
</section>
<section>
<section data-background-transition="slide" data-background="./img/monkey-gun.gif">
<h2 class="overlight">Problems we face today</h2>
</section>
<section>
Web and mobile technologies have a lot of crossover yet have very different platforms.
<aside class="notes">
<ul>
<li>We cover same territory</li>
<li>Android - built on Java</li>
<li>iOS - build with objective C - now swift</li>
<li>developing same things without benifit of sharing code</li>
</ul>
</aside>
</section>
<section>
Networks and small devices still suffer from bandwith and performance limitations.
<aside class="notes">
<ul>
<li>Not everyone has flagship devices</li>
</ul>
</aside>
</section>
<section>
Amidst NSA scandals, privacy has become a large public issue and the web has proven itself to not be consistently secure.
<aside class="notes">
<ul>
<li>We're putting more code in the client</li>
<li>People get tempted to put the wrong code there now that they're able to.</li>
</ul>
</aside>
</section>
<section>
Requirements for legacy support complicate our applications and limit the technologies that we can use.
<aside class="notes">
<li>Still seeing IE8 requirements for projects</li>
</aside>
</section>
<section data-background-transition="slide" data-background="./img/days_since.png">
<p class="overlight orange">The javascript community has an insane churn rate.</p>
<!-- <img class="clean" src="./img/days_since.png"> -->
</section>
</section>
<section><h2>Thanks</h2></section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
$('#floatlabel').hide();
$('#floatinput').on('input', function () {
var floatinputVal = $('#floatinput').val();
if (floatinputVal.length > 0) {
$('#floatlabel').show();
} else {
$('#floatlabel').hide();
}
});
</script>
</body>
</html>