forked from kevinharvey/intro-to-meteor
/
index.html
1057 lines (891 loc) · 28.1 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
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Introduction to Meteor.js</title>
<link rel="icon" href="https://meteor.com/favicon.png" type="image/png">
<meta name="description" content="An Introduction to Meteor.js, a puter-Javascript web application framework">
<meta name="author" content="Kevin Harvey">
<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">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/default.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'css/print/pdf.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 id="intro">
<h1>An Introduction to Meteor.js</h1>
<p>
<a href="http://kevinharvey.net">Kevin Harvey</a> |
<a href="http://twitter.com/kevinharvey">@kevinharvey</a>
</p>
</section>
<section id="agenda">
<h2>Agenda</h2>
<ol>
<li>Introductions</li>
<li>Conceptual Overview</li>
<li>Demo</li>
</ol>
</section>
<section id="who-is-this-guy">
<h2>Who is this guy?</h2>
<ul>
<li>Senior Systems Engineer at <a href="http://smilecareclub.com/">SmileCareClub</a></li>
<li>Building the web since 2004</li>
</ul>
</section>
<section id="who-are-you-guys">
<h2>Who are you guys?</h2>
<aside class="notes">
1. Front end vs. back end
2. Used Meteor previously
3. Used Meteor in production
</aside>
</section>
<section id="what-is-meteor">
<h1>What is Meteor?</h1>
<aside class="notes">
1. Instead of jumping right into the demo...
2. Significant departure from typcial frameworks
</aside>
</section>
<section id="full-stack-web-framework">
<h2>Full-stack web framework</h2>
<ul>
<li>Pure-Javascript</li>
<li>Same API on the front and back ends</li>
</ul>
</section>
<section id="what-is-it-like">
<h2>What is it like?</h2>
<aside class="notes">
1. Often compared to Angular...
2. Got a back end
</aside>
</section>
<section id="how-is-it-different">
<h2>How is it different?</h2>
<p class="fragment roll-in">Requests vs. Subscription</p>
<aside class="notes">
1. Traditional web applications rely on the request/response loop...
2. This is the key differentiator
</aside>
</section>
<section id="single-page-apps">
<h2>Single-Page Apps</h2>
<p>
<small>
... unless you install a router package
</small>
</p>
<aside class="notes">
The reason it's compared to Angular most often is it's great at single-page apps
</asidec>
</section>
<section id="database-everywhere">
<h2>Database Everywhere</h2>
<ul>
<li>MongoDB on the server</li>
<li>MiniMongo in the browser</li>
<li>Meteor keeps it all in sync</li>
</ul>
</section>
<section id="reactivity">
<h2>Reactivity</h2>
<p>
<small>This is some serious hocus pocus</small>
</p>
<ol>
<li class="fragment roll-in">Client UI and database are updated first</li>
<li class="fragment roll-in">Changes sent to server</li>
<li class="fragment roll-in">Issues are resolved after the fact</li>
</ol>
</section>
<section id="latency-compensation">
<h2>Latency Compensation</h2>
<p>
<small>Continuing the wizadry theme</small>
</p>
<ol>
<li class="fragment roll-in">Changes from the server are updated automatically</li>
<li class="fragment roll-in">Models are simulated locally</li>
</ol>
</section>
<section id="framework-plus-package-manager">
<h2>Framework + Package Manager</h2>
<pre style="width:100%;"><code data-trim>
$ meteor create myapp
$ meteor add accounts-ui accounts-password
$ meteor
</code></pre>
<aside class="notes">
Not only is does meteor create and run you app for development, it's also it's own package manager
</aside>
</section>
<section id="development-happens-fast">
<h2>Development Happens Fast</h2>
<ol>
<li class="fragment roll-in">Hardly any boilerplate</li>
<li class="fragment roll-in">Tons of stuff for free</li>
<li class="fragment roll-in">Context switching reduced</li>
</ol>
</section>
<section id="demo">
<h1>Demo</h1>
<h3 class="fragment roll-in">
<a href="http://questionator.meteor.com">questionator.meteor.com</a>
</h3>
</section>
<section id="installing-meteor">
<h2>Installing Meteor</h2>
<pre style="width:100%;"><code data-trim>
$ curl https://install.meteor.com | /bin/sh
</code></pre>
</section>
<section id="creating-and-running-a-project">
<div style="float:left">
<h2>Starting a Project</h2>
<pre style="width:100%;"><code data-trim>
$ meteor create the-questionator
$ cd the-questionator
$ meteor
[[[[[ ~/dev/the-questionator ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
0e8d8bc41bb780659af222d55ae39941886464db<br />
meteor
</aside>
</section>
<section id="initial-project-structure">
<h2>Initial Project Structure</h2>
<pre style="width:100%;"><code data-trim>
$ ls
.meteor
the-questionator.css
the-questionator.html
the-questionator.js
</code></pre>
</section>
<section id="initial-html-file">
<h2>the-questionator.html</h2>
<pre style="width:100%;"><code data-trim>
<head>
<title>the-questionator</title>
</head>
<body>
<h1>Welcome to Meteor!</h1>
{{> hello}}
</body>
<template name="hello">
<button>Click Me</button>
<p>You've pressed the button {{counter}} times.</p>
</template>
</code></pre>
<aside class="notes">
The default templating language is called "Spacebars"
</aside>
</section>
<section id="initial-html-file">
<h2>the-questionator.js</h2>
<pre style="width:100%;"><code data-trim>
if (Meteor.isClient) {
// counter starts at 0
Session.setDefault("counter", 0);
Template.hello.helpers({
counter: function () {
return Session.get("counter");
}
});
Template.hello.events({
'click button': function () {
// increment the counter when button is clicked
Session.set("counter", Session.get("counter") + 1);
}
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
</code></pre>
</section>
<section id="installing-bootstrap">
<div style="float:left">
<h2>Installing Bootstrap</h2>
<pre style="width:100%;"><code data-trim>
$ meteor add mizzao:bootstrap-3
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
6cb5e166cfb5d341a7c48d0518208e56c3f64581
</aside>
</section>
<section id="moar-prettier">
<div style="float:left">
<h2>Make Moar Prettier</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.html
...
<body>
<div class="container-fluid"
style="padding-top:60px;">
<nav role="navigation"
class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">
The Questionator
</a>
</div>
</div>
</nav>
{{> hello}}
</div>
</body>
...
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
97284406042a434e45fb9fdb8961946b07c51507
</aside>
</section>
<section id="even-moar-prettier">
<div style="float:left">
<h2>Even Moar Prettier!</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.html
...
<form role="form">
<div class="form-group">
<textarea id="question"
class="form-control" rows="2">
</textarea>
</div>
<div class="form-group">
<input class="btn btn-default"
type="submit" value="Ask away" />
</div>
</form>
{{> hello}}
</div>
</body>
...
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
a2b8364122a437d9128f933cee08054997e61cce
</aside>
</section>
<section id="template-inclusion">
<h2>Template Inclusion</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.html
...
{{> hello}}
...
<template name="hello">
<button>Click Me</button>
<p>You've pressed the button {{counter}} times.</p>
</template>
</code></pre>
</section>
<section id="extending-the-template">
<div style="float:left">
<h3>Extending the Template</h3>
<pre style="width:100%;"><code data-trim>
$ the-questionator.html
...
{{> questionsList}}
</div>
</body>
<template name="questionsList">
<div id="questions">
{{#each questions}}
<hr />
<h6>{{text}} <small>Votes: {{votes}}</small></h6>
<a class="btn btn-default btn-xs vote-up">up</a>
<a class="btn btn-default btn-xs vote-down">down</a>
{{/each}}
</div>
<hr />
</template>
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
Notice the {{> questionsList}}, {{#each}}, and {{variable}} syntax.<br />
Handlebars-like<br />
'name=' gives us acess to the template in JS<br />
Code update on next slide.
</aside>
</section>
<section id="hardcoded-data">
<div style="float:left">
<h2>Hardcoded Data</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.js
if (Meteor.isClient){
var questionsData = [
{
text: 'Why does the sun shine?',
votes: 0
},
{
text: 'If you were a hot dog, and you'
+ 'were starving to death, would you eat yourself?',
votes: 0
},
{
text: 'What is the airspeed velocity'
+ ' of an unladen swallow?',
votes: 0
}
];
Template.questionsList.helpers({
questions: questionsData
});
}
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
98926d42151e43666c53349a2c8e124607e6883a
</aside>
</section>
<section id="creating-a-collection">
<h2>Creating a Collection</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.js
Questions = new Mongo.Collection('questions');
...
</code></pre>
<aside class="notes">
c48d697579cb52f7f065a4f00928f013878100ac
</aside>
</section>
<section id="available-in-client-and-server">
<h2>Available in Client and Server</h2>
<h4>Terminal</h4>
<pre style="width:100%;"><code data-trim>
$ meteor mongo
MongoDB shell version: 2.4.9
connecting to: 127.0.0.1:3001/meteor
Welcome to the MongoDB shell.
meteor:PRIMARY> db.questions.find()
</code></pre>
<h4>Browser Console</h4>
<pre style="width:100%;"><code data-trim>
> Questions.find()
> LocalCollection.Cursor {collection: LocalCollection, sorter: null, _selectorId: undefined...}
</code></pre>
<aside class="notes">
'meteor' command starts MongoDB on port 3001 on your local machine
</aside>
</section>
<section id="update-the-helper">
<div style="float:left">
<h2>Update the Helper</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.js
Questions = new Mongo.Collection('questions');
if (Meteor.isClient){
Template.questionsList.helpers({
questions: Questions.find(),
});
}
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
65798515ae94176ce4b42d3a1d9a5567dca6ba6e
</aside>
</section>
<section id="preload-data">
<div style="float:left">
<h2>Preload Data</h2>
<pre style="width:100%;"><code data-trim>
$ the-questionator.js
if (Meteor.isServer) {
if (Questions.find().count() === 0) {
Questions.insert({
text: 'Why does the sun shine?',
votes: 0
});
Questions.insert({
text: 'If you were a hot dog, and you were...',
votes: 0
});
Questions.insert({
text: 'What is the airspeed velocity of...',
votes: 0
});
}
}
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
2c4870635460a0ef7eac5c4b20cd8176b01a83ce
</aside>
</section>
<section id="manipulating-data">
<div style="float:left">
<h2>Manipulating Data</h2>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
Try editing the data in a different browser window.
</aside>
</section>
<section id="remove-autopublish">
<div style="float:left">
<h2>Remove Autopublish</h2>
<pre style="width:100%;"><code data-trim>
$ meteor remove autopublish
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
ee57256c6fcb62446499cd6aa3002593299c8ea0<br />
autopublish makes it easier to start prototyping quickly<br />
NOT FOR PRODUCTION<br />
</aside>
</section>
<section id="publishing">
<div style="float:left">
<h2>Publishing Data</h2>
<pre style="width:100%;"><code data-trim>
if (Meteor.isClient) {
Meteor.subscribe('questions');
...
}
if (Meteor.isServer) {
...
Meteor.publish('questions', function() {
return Questions.find();
});
}
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
864c77cad1cbb1d6e76713d6f3e6bed9be23e3d4<br />
<br />
In reality, this allows for fine-grained control of what is sent to the client.
</aside>
</section>
<section id="sorting-results">
<div style="float:left;">
<h2>Sorting Results</h2>
<pre style="width:100%;"><code data-trim>
Template.questionsList.helpers({
questions: Questions.find({}, {sort: {votes: -1}}),
});
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
f5c5a93bd00cee143138cbe6a04e98006f72626e
</aside>
</section>
<section id="event-handling">
<div style="float:left;">
<h2>Event Handling</h2>
<pre style="width:100%;"><code data-trim>
if (Meteor.isClient) {
...
Template.questionsList.events({
'click .vote-up': function(e) {
e.preventDefault();
Meteor.call('upvote', this._id);
},
'click .vote-down': function(e) {
e.preventDefault();
Meteor.call('downvote', this._id);
}
});
}
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
Commit hash in 'methods' slide
</aside>
</section>
<section id="methods">
<div style="float:left;">
<h2>Methods</h2>
<pre style="width:100%;"><code data-trim>
Meteor.methods({
upvote: function(questionId) {
var question = Questions.findOne(questionId);
Questions.update(
questionId,
{ $set: { votes: question.votes + 1 }}
);
},
downvote: function(questionId) {
var question = Questions.findOne(questionId);
Questions.update(
questionId,
{ $set: { votes: question.votes - 1 }}
);
}
});
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
8529986895d27bf106efd4d48e7d83bb733689e0
</aside>
</section>
<section id="template-refactor">
<div style="float:left;">
<h2>Template Refactor</h2>
<pre style="width:100%;"><code data-trim>
{{> questionForm}}
...
<template name="questionForm">
<form role="form">
<div class="form-group">
<textarea id="question"
class="form-control" rows="2"></textarea>
</div>
<div class="form-group">
<input class="btn btn-primary"
type="submit" value="Ask away" />
</div>
</form>
</template>
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
Git hash in 'rinse-and-repeat' slide
</aside>
</section>
<section id="rinse-and-repeat">
<div style="float:left;">
<h2>Rinse and Repeat</h2>
<pre style="width:100%;"><code data-trim>
if (Meteor.isClient) {
...
Template.questionForm.events({
'submit form': function(e) {
Questions.insert({
'text': $(e.target).find('#question').val(),
'votes': 0
});
}
});
}
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
15a233ac6829932ae518a5a2b758010c2f8b7804
</aside>
</section>
<section id="accounts">
<h2>Accounts</h2>
<pre><code data-trim>
$ meteor add accounts-twitter
$ meteor add ian:accounts-ui-bootstrap-3
</code></pre>
<pre><code data-trim>
{{> loginButtons}}
</code></pre>
</section>
<section id="adding-loginButtons">
<h2>Adding {{> loginButtons}}</h2>
<pre><code data-trim>
<div class="navbar-header">
<a class="navbar-brand" href="#">The Questionator</a>
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target="#navigation">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navigation">
<ul class="nav navbar-nav navbar-right">
{{> loginButtons}}
</ul>
</div>
</code></pre>
</section>
<section id="configuring-twitter-login">
<h2>Configure Twitter Login</h2>
<iframe
style="width:100%;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
4802b03561e151b8bacaefd1d69a0b5f89b7aab1<br />
API Key: OaAtzi0jcKhHJ5Pse8K2KH46U<br />
API Secret: hfNvcGLIsZA63lqo5Olhr48BdyfHeSQSJbNQ9X24PDJdXa1aZu
</aside>
</section>
<section id="restricting-access">
<div style="float:left;">
<h2>Restricting Access</h2>
<pre style="width:100%;"><code data-trim>
Questions.allow({
insert: function(userId, doc) {
return !! userId;
}
});
// .. and the methods we added earlier
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
274a59fb580985126775a3892c05955a7c240f68
</aside>
</section>
<section id="removing-insecure">
<div style="float:left;">
<h2>Removing "Insecure"</h2>
<pre style="width:100%;"><code data-trim>
$ meteor remove insecure
</code></pre>
</div>
<iframe
style="background-color:white;float:right;width:320px;height:480px"
src="http://localhost:3000">
</iframe>
<aside class="notes">
62406bc2f2f5277f86a9a4a4ec3957411c4d38d7
</aside>
</section>
<section>
<h1>End of Demo</h1>
<iframe
style="width:100%;height:480px"
src="http://localhost:3000">
</iframe>
</section>
<section id="deployment">
<h1>Deployment</h1>
<aside class="notes">
This is a little beyond the scope of this talk, but just to give you a few ideas...
</aside>
</section>
<section id="deploy-to-meteor-dot-com">
<h2>Deploy to meteor.com</h2>
<pre><code data-trim>
$ meteor deploy questionator.meteor.com
Deploying to http://questionator.meteor.com
</code></pre>
<aside class="notes">
That's how I deployed the sample app for this talk.<br />
Will ask you for an email address, and then just work.
</aside>
</section>
<section id="modulus">
<h2>Modulus</h2>
<pre><code data-trim>
$ npm install -g modulus
$ modulus login
$ modulus project create
</code></pre>
<aside class="notes">
PaaS privder specializing in Node.js apps.<br />
Open sourced 'demeteorizer' for turning metoer apps into straight up Node.js
</aside>
</section>
<section id="meteor-up">
<h2>Meteor Up</h2>
<pre><code data-trim>
$ npm install -g mup
$ mkdir ~/deploy-the-questionator
$ cd ~/deploy-the-questionator
$ mup init
</code></pre>
<aside class="notes">
Install to your own AWS, Digital Ocean, etc.
</aside>
</section>
<section id="behind-the-curtain">
<h1>Behind the curtain...</h1>
<aside class="notes">
A few random topics to help take some of the magic out all this
</aside>
</section>
<section id="web-sockets">
<h2>Web Sockets</h2>
<p>A departure from the request/response loop</p>
<a href="https://developer.mozilla.org/en-US/docs/WebSockets">
https://developer.mozilla.org/en-US/docs/WebSockets
</a>
<aside class="notes">
Opens a socket between a server and the client browser.
</aside>
</section>
<section id="ddp">
<h2>Distributed Data Protocol (DDP)</h2>
<p>Publication & Subscription</p>
<a href="http://2012.realtimeconf.com/video/matt-debergalis">
http://2012.realtimeconf.com/video/matt-debergalis
</a>
<aside class="notes">
Meteor-specific protocol for managing publications and subscriptions over a web socket
</aside>
</section>
<section id="oplog-tailing">
<h2>Oplog Tailing</h2>
<p>Getting realtime updates from MongoDB</p>
<a href="https://github.com/meteor/meteor/wiki/Oplog-Observe-Driver">
https://github.com/meteor/meteor/wiki/Oplog-Observe-Driver
</a>
<aside class="notes">
How Meteor gets realtime updates from MongoDB
</aside>
</section>
<section id="tracker">
<h2>Tracker</h2>
<p>Hot code pushes, reactions to database changes, etc. </p>
<a href="https://github.com/meteor/meteor/tree/devel/packages/tracker">
https://github.com/meteor/meteor/tree/devel/packages/tracker
</a>
<aside class="notes">
Keeps track of dependent computations<br />
Previously known as 'Deps'
</aside>
</section>
<section id="resources">
<h2>Resources</h2>
<ul>
<li><a href="https://www.discovermeteor.com/">discovermeteor.com</a></li>
<li><a href="https://docs.meteor.com/">docs.meteor.com</a></li>
<li><a href="http://www.meetup.com/Meteor-Nashville/">Meteor Nashville Meetup</a></li>
<li><a href="https://trello.com/b/hjBDflxp/meteor-roadmap">Meteor Roadmap on Trello</a></li>
</ul>
</section>
<section id="fin">
<h1>Fin</h1>