-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
832 lines (730 loc) · 27.8 KB
/
index.htm
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
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=1024" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>welcome to web development ...again (a talk by Brian Wigfield)</title>
<link href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/starburst.css" rel="stylesheet" type="text/css" />
</head>
<body onload="prettyPrint()">
<div id="impress">
<div id="sponsors" class="step slide" data-x="-2000" data-y="-1500">
<img src="images/SponsorSlide.png"></img>
</div>
<div id="bored" class="step slide" data-x="-1000" data-y="-1500">
<h1 style="text-align:center;">welcome to web development</h1><h4 style="text-align:center;">...again</h4>
<h4>Brian Wigfield [AdventureTech]</h4>
</div>
<div id="warning" class="step slide" data-x="0" data-y="-1500">
<p>If you've had your head down the last few years...
<b id="slippedBy">new web development techniques</b>
<br/>
might have slipped right by you.
</p>
</div>
<div id="topics" class="step" data-x="850" data-y="3000" data-rotate="90" data-scale="5">
<h4>Topics</h4>
<ul>
<li>transcompilers</li>
<li>core frameworks</li>
<li>CSS/UI frameworks</li>
<li>client templating</li>
<li>MV* client frameworks</li>
<li>testing/dev tools</li>
<li>mobile specific</li>
<li>misc</li>
</ul>
</div>
<div id="transcompilers" class="step" data-x="2500" data-y="-500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>transcompilers</h2>
</div>
<div id="coffescript" class="step" data-x="1500" data-y="-500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>CoffeeScript</h4>
<pre class="prettyprint"><code>begin = (session) -> session.started = true;
sessions = [{name: 'one', started: true}, { name: 'two', started: false}]
begin session for session in sessions when session.started is false</code></pre>
</div>
<div id="sass" class="step" data-x="1500" data-y="-1500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>SASS</h4>
<pre class="prettyprint"><code><div id="conference"><h2>Sessions</h2><ul></ul></div></code></pre>
<pre class="prettyprint lang-css"><code>$baseColor: blue;
@mixin plain-list ($margin: 20px) {
li {
margin-right: $margin;
list-style-type: none; }}
.otherThingsWithBorder {
border: 1px solid $baseColor;}
#conference {
@extend .otherThingsWithBorder;
ul {
@include plain-list(10px);
color: lighten($baseColor, 10%);}}
<!--output -->
.otherThingsWithBorder, #conference {
border: 1px solid blue; }
#conference ul {
color: #3333ff; }
#conference ul li {
margin-right: 10px;
list-style-type: none; }
</code></pre>
</div>
<div id="less" class="step" data-x="1500" data-y="-2500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>LESS</h4>
</div>
<div id="core-frameworks" class="step" data-x="2500" data-y="-1500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>core frameworks</h2>
</div>
<div id="jquery" class="step" data-x="1500" data-y="-1500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>jQuery</h4>
<pre class="prettyprint"><code><div id="app">
<label>Where are we?</label>
<span style="display:none;"></span>
</div>
<script>
$('#app').find('label').hover(
function() {$(this).siblings('span').fadeIn()},
function() {$(this).siblings('span').fadeOut()}
).siblings('span').html('KCDC 2012');
</script></code></pre>
</div>
<div id="jquery-cs" class="step" data-x="1500" data-y="-1500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>jQuery - CS</h4>
<pre class="prettyprint"><code><div id="app">
<label>Where are we?</label>
<span style="display:none;"></span>
</div>
<script>
$('#app').find('label').hover(
-> $(@).siblings('span').fadeIn(),
-> $(@).siblings('span').fadeOut()
).siblings('span').html('KCDC 2012')
</script></code></pre>
</div>
<div id="mootools" class="step" data-x="1500" data-y="-2500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>MooTools</h4>
<pre class="prettyprint"><code><div id="app">
<label>Where are we?</label>
<span style="display:none;"></span>
</div>
<script>
var label = $$('#app label');
label.getNext('span').set('html', 'KCDC 2012');
label.addEvents({
mouseover: function() {
//custom code
//label.getNext('span').reveal();
},
mouseout: function() {
//custom code
//label.getNext('span').dissolve();
}
});
</script>
</code></pre>
</div>
<div id="mootools-cs" class="step" data-x="1500" data-y="-2500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>MooTools - CS</h4>
<pre class="prettyprint"><code><div id="app">
<label>Where are we?</label>
<span style="display:none;"></span>
</div>
<script>
label = $$('#app label')
label.getNext('span').set 'html', 'KCDC 2012'
label.addEvents
mouseover: ->
#custom code
#label.getNext('span').reveal()
mouseout: ->
#custom code
#label.getNext('span').dissolve()
</script>
</code></pre>
</div>
<div id="mootools2" class="step" data-x="1500" data-y="-3500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>MooTools (continued)</h4>
<pre class="prettyprint"><code><script>
var Person = new Class({
initialize: function(name) {
this.name = name;
}
});
var Speaker = new Class({
Implements: Person,
Intro: function(talk) {
return "My name is " + this.name + " and I will be speaking on " + talk;
}
})
var brian = new Speaker('Brian Wigfield');
console.log(brian.Intro('web development'));
</script></code></pre>
</div>
<div id="mootools2-cs" class="step" data-x="1500" data-y="-3500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>MooTools (continued) - CS</h4>
<pre class="prettyprint"><code><script>
Person = new Class
initialize: (name) ->
this.name = name
Speaker = new Class
Implements: Person
Intro: (talk) ->
return "My name is #{this.name} and I will be speaking on #{talk}"
brian = new Speaker 'Brian Wigfield'
console.log(brian.Intro('web development'))
</script></code></pre>
</div>
<div id="zepto" class="step" data-x="1500" data-y="-4500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Zepto.js</h4>
</div>
<div id="sizzle" class="step" data-x="1500" data-y="-5500" data-z="-9000" data-rotate="270" data-scale="1">
<h4>Sizzle</h4>
</div>
<div id="underscore" class="step" data-x="1500" data-y="-6500" data-z="-10000" data-rotate="270" data-scale="1">
<h4>Underscore.js</h4>
<pre class="prettyprint"><code>
_.each(["session 1", "session2", "session 3"], function(session) {
beginSession(session);
});
var taxed = _.map([10,15,20], function(amount) {
return amount * 1.08;
});
var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) {
return num % 2 == 0;
});
var anyBrian = _.any(["brian","joe","bob"], function(who) {
return who === "brian";
});
var speakers = _.groupBy([{name: 'brian', speaker: true}, {name: 'bob', speaker: false}], 'speaker');
var person = {name: 'brian'};
person = _.defaults(person, {speaker: false});
var speaker = _.extend(person, {speaker: true});
</code></pre>
</div>
<div id="underscore-cs" class="step" data-x="1500" data-y="-6500" data-z="-10000" data-rotate="270" data-scale="1">
<h4>Underscore.js - CS</h4>
<pre class="prettyprint"><code>
_.each ["session 1", "session2", "session 3"], (session) ->
beginSession session
taxed = _.map [10,15,20], (amount) ->
amount * 1.08
evens = _.filter [1, 2, 3, 4, 5, 6], (num) ->
num % 2 == 0
anyBrian = _.any ["brian", "joe", "bob"], (who) ->
who == "brian"
speakers = _.groupBy [{name: 'brian', speaker: true}, {name: 'bob', speaker: false}], 'speaker'
person = name: 'brian'
person = _.defaults person, speaker: false
speaker = _.extend person, speaker: true
</code></pre>
</div>
<div id="css-ui" class="step" data-x="2500" data-y="-2500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>CSS/UI Frameworks</h2>
</div>
<div id="cssreset" class="step" data-x="1500" data-y="-2500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>CSS Rests/Normalizer</h4>
<ol>
<li><a href="http://www.cssreset.com/">http://www.cssreset.com/</a></li>
<li><a href="http://necolas.github.com/normalize.css/">http://necolas.github.com/normalize.css/</a></li>
</ol>
</div>
<div id="compass" class="step" data-x="1500" data-y="-3500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>Compass</h4>
<pre class="prettyprint lang-css"><code>@import "compass/reset";
@import "compass/css3/border-radius";
@import "compass/css3/opacity";
#body {
div {
@include border-radius(4px);
@include opacity(.5);
}
}
<!--output -->
#body div {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
opacity: 0.5;
}</code></pre>
</div>
<div id="blueprint" class="step" data-x="1500" data-y="-4500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>BlueprintCSS</h4>
<img src="images/blueprint.png" style="height: 500px;"></img>
</div>
<div id="grid960" class="step" data-x="1500" data-y="-5500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Grid960</h4>
<pre class="prettyprint"><code><div class="container_12">
<h2>
12 Column Grid
</h2>
<div class="grid_12">
<p>
940
</p>
</div>
<!-- end .grid_12 -->
<div class="clear"></div>
<div class="grid_1">
<p>
60
</p>
</div>
<!-- end .grid_1 -->
<div class="grid_11">
<p>
860
</p>
</div>
</div></code></pre>
</div>
<div id="bootstrap" class="step" data-x="1500" data-y="-6500" data-z="-9000" data-rotate="270" data-scale="1">
<h4>Twitter Bootstrap</h4>
</div>
<div id="jqueryui" class="step" data-x="1500" data-y="-7500" data-z="-10000" data-rotate="270" data-scale="1">
<h4>jQueryUI</h4>
</div>
<div id="client-templating" class="step" data-x="2500" data-y="-3500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>Client templating</h2>
</div>
<div id="mustache" class="step" data-x="1500" data-y="-3500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>Mustache.js/Hogan.js</h4>
<pre class="prettyprint"><code><script id="template" type="text/tempalte">
<h2>Sessions</h2>
<ul>
{{#sessions}}
<li>{{name}}</li>
{{/sessions}}
</ul>
</script>
<script>
var template = Hogan.compile($('#template').text());
$('#app').html(
template.render({sessions : [
{name : 'one'},
{name : 'two'}
]})
);
</script></code></pre>
</div>
<div id="handlebars" class="step" data-x="1500" data-y="-4500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>Handlebars.js</h4>
<pre class="prettyprint"><code><script id="template" type="text/template">
<ul>
{{#webOnly sessions}}
{{> session}}
{{/webOnly}}
</ul>
</script>
<script>
Handlebars.registerHelper('webOnly', function(sessions, options) {
var ret = ''
_.forEach(filtered, function(session) {
if (session.category === 'web')
ret = ret + options.fn(session)});
return ret;
});
var template = Handlebars.compile($('#template').text());
$('#app').html(
template({sessions : [
{name : 'one', category: 'web'},
{name : 'two', category: 'desktop'}
]})
);
</script></code></pre>
</div>
<div id="underscore-templates" class="step" data-x="1500" data-y="-5500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>Underscore.js</h4>
<pre class="prettyprint"><code>var compiled = _.template("Speaker Name: <%= speaker %>");
compiled({speaker : 'brian'});</code></pre>
</div>
<div id="mv*" class="step" data-x="2500" data-y="-4500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>MV* client frameworks</h2>
</div>
<div id="knockout" class="step" data-x="1500" data-y="-4500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>Knockout.js</h4>
<pre class="prettyprint"><code><div id="app">
<div data-bind="foreach: speakers">
<input data-bind="value: name, attr: {tooltip: name}" />
</div>
</div>
<script>
var viewModel = {
speakers: ko.observableArray([
{name: 'brian'},
{name: 'joe'}
])
};
ko.applyBindings(viewModel);
viewModel.speakers.push({name: 'bill'});
</script></code></pre>
</div>
<div id="knockout-cs" class="step" data-x="1500" data-y="-4500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>Knockout.js - CS</h4>
<pre class="prettyprint"><code><div id="app">
<div data-bind="foreach: speakers">
<input data-bind="value: name, attr: {tooltip: name}" />
</div>
</div>
<script>
viewModel =
speakers: ko.observableArray [
{name: 'brian'},
{name: 'joe'}
]
ko.applyBindings viewModel
viewModel.speakers.push name: 'bill'
</script></code></pre>
</div>
<div id="backbone" class="step" data-x="1500" data-y="-5500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>Backbone.js</h4>
<pre class="prettyprint"><code>var Session = Backbone.Model.extend({
defaults: {category: 'n/a'}
});
var Sessions = Backbone.Collection.extend({
model: Session
});
var SessionList = Backbone.View.extend({
el: '#app',
initialize: function () {
this.tmpl = _.template('<% _.each(sessions,function(session) { %><div><input value="<%=session.get("name")%>"/></div><%});%>');
},
render: function() {
$(this.el).html(
this.tmpl({sessions: this.collection}));
}
});
new SessionList({collection: new Sessions([
{name: 'one', category: 'web'},
{name: 'two'}])}).render();</code></pre>
</div>
<div id="backbone-cs" class="step" data-x="1500" data-y="-5500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>Backbone.js - CS</h4>
<pre class="prettyprint"><code>Session = Backbone.Model.extend
defaults: {category: 'n/a'}
Sessions = Backbone.Collection.extend
model: Session
SessionList = Backbone.View.extend
el: '#app'
initialize: ->
@.tmpl = _.template '<% _.each(sessions,function(session) { %><div><input value="<%=session.get("name")%>"/></div><%});%>'
render: ->
$(@el).html(this.tmpl({sessions: this.collection}))
new SessionList({collection: new Sessions([
{name: 'one', category: 'web'},
{name: 'two'}])}).render()</code></pre>
</div>
<div id="sammy" class="step" data-x="1500" data-y="-6500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>Sammy.js</h4>
<pre class="prettyprint"><code><div id="app"></div>
<script type="text/template" id="speakersTmpl">
<ul>
<% for(var i = 0; i < speakers.length; i++) { %>
<li class="speakerName"><%= speakers[i] %></li>
<% } %>
</ul>
</script>
<script>
var kcdc = Sammy('#app', function() {
this.use('Template');
this.get('#/init', function() {
this.app.swap('<a href="#/list">Show</a>');
});
this.get('#/speakers', function() {
this.app.swap(
this.template(
$('#speakersTmpl').html(),
{speakers: ["brian", "joe"]}
)
);
});
})
kcdc.run('#/init');
</script></code></pre>
</div>
<div id="sammy-cs" class="step" data-x="1500" data-y="-6500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>Sammy.js - CS</h4>
<pre class="prettyprint"><code><div id="app"></div>
<script type="text/template" id="speakersTmpl">
<ul>
<% for(var i = 0; i < speakers.length; i++) { %>
<li class="speakerName"><%= speakers[i] %></li>
<% } %>
</ul>
</script>
<script>
kcdc = Sammy '#app', ->
@.use 'Template'
@.get '#/init', ->
@.app.swap '<a href="#/speakers">Get Speakers</a>'
@.get '#/speakers', ->
@.app.swap(
this.template(
$('#speakersTmpl').html(),
{speakers: ["brian", "joe"]}
)
kcdc.run '#/init'
</script></code></pre>
</div>
<div id="ember" class="step" data-x="1500" data-y="-7500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Ember.js</h4>
<pre class="prettyprint"><code><script type="text/x-handlebars" data-template-name="appTmpl">
{{KCDC}}
<ul>
{{#each speakers}}
<li>{{name}}</li>
{{/each}}
</ul>
</script>
<script>
var App = Ember.Application.create({rootElement: '#app'});
App.Conference = Ember.Object.create({name: 'KCDC'});
App.SpeakerView = Ember.View.extend({
templateName: 'appTmpl',
speakerBinding: 'App.Speaker.name',
speakers: [
{ name: 'brian' },
{ name: 'joe' } ]
});
App.SpeakerView.create().appendTo('body');
</script></code></pre>
</div>
<div id="ember-cs" class="step" data-x="1500" data-y="-7500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Ember.js - CS</h4>
<pre class="prettyprint"><code><script type="text/x-handlebars" data-template-name="appTmpl">
{{KCDC}}
<ul>
{{#each speakers}}
<li>{{name}}</li>
{{/each}}
</ul>
</script>
<script>
App = Ember.Application.create rootElement: '#app'
App.Conference = Ember.Object.create name: 'KCDC'
App.SpeakerView = Ember.View.extend
templateName: 'appTmpl'
speakerBinding: 'App.Speaker.name'
speakers: [
{ name: 'brian' },
{ name: 'joe' } ]
App.SpeakerView.create().appendTo 'body'
</script></code></pre>
</div>
<div id="testing-dev" class="step" data-x="2500" data-y="-5500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>testing/dev tools</h2>
</div>
<div id="jsfiddle" class="step" data-x="1500" data-y="-5500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>jsFiddle.net/jsBin.com</h4>
<img src="images/jsfiddle.png" height="500px"></img>
</div>
<div id="jasmine" class="step" data-x="1500" data-y="-6500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>Jasmine</h4>
<pre class="prettyprint"><code><script>
var calculator = {
add : function(p1, p2) {return p1 + p2;}
sub : function(p1, p2) {return p1 - p2;}
};
describe("A calculator", function() {
it("should be able to add numbers correctly", function() {
expect(calculator.add(2,2)).toEqual(4);
});
it("should be able to subtract numbers correctly", function() {
expect(calculator.sub(2,1)).toEqual(1);
});
});
</script></code></pre>
</div>
<div id="jasmine-cs" class="step" data-x="1500" data-y="-6500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>Jasmine - CS</h4>
<pre class="prettyprint"><code><script>
calculator =
add : (p1, p2) -> p1 + p2
sub : (p1, p2) -> p1 - p2
describe "A calculator", ->
it "should be able to add numbers correctly", ->
expect(calculator.add(2,2)).toEqual 4
it "should be able to subtract numbers correctly", ->
expect(calculator.sub(2,1)).toEqual 1
</script></code></pre>
</div>
<div id="qunit" class="step" data-x="1500" data-y="-7500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>QUnit</h4>
<pre class="prettyprint"><code><script>
var calculator = {
add : function(p1, p2) {return p1 + p2;}
sub : function(p1, p2) {return p1 - p2;}
};
module("Calculator");
test("addition", function() {
equal(calculator.add(2,2), 4);
});
test("subtraction", function() {
equal(calculator.subtract(2,1), 1);
});
</script></code></pre>
</div>
<div id="qunit-cs" class="step" data-x="1500" data-y="-7500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>QUnit - CS</h4>
<pre class="prettyprint"><code><script>
calculator =
add : (p1, p2) -> p1 + p2
sub : (p1, p2) -> p1 - p2
module "Calculator"
test "addition", ->
equal calculator.add(2,2), 4
test "subtraction", ->
equal calculator.subtract(2,1), 1
</script></code></pre>
</div>
<div id="mocha" class="step" data-x="1500" data-y="-8500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Mocha</h4>
</div>
<div id="sinon" class="step" data-x="1500" data-y="-9500" data-z="-9000" data-rotate="270" data-scale="1">
<h4>Sinon.js</h4>
<pre class="prettyprint"><code><script>
var calculator = { add: function(p1, p2) {}};
sinon.stub(calculator, 'add', function() {return 4;});
calculator.add.restore();
var mock = sinon.mock(calculator);
mock.expects('add').once();
mock.verify();
</script></code></pre>
</div>
<div id="sinon-cs" class="step" data-x="1500" data-y="-9500" data-z="-9000" data-rotate="270" data-scale="1">
<h4>Sinon.js - CS</h4>
<pre class="prettyprint"><code><script>
calculator = add: (p1, p2) -> {}
sinon.stub calculator, 'add', -> 4
calculator.add.restore()
mock = sinon.mock calculator
mock.expects('add').once()
mock.verify()
</script></code></pre>
</div>
<div id="mobile-specific" class="step" data-x="2500" data-y="-6500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>Mobile specific</h2>
</div>
<div id="mediaqueries" class="step" data-x="1500" data-y="-6500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>CSS Media Queries/Respond.js</h4>
<pre class="prettyprint"><code>
<link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="small-device.css" />
@media only screen and (max-device-width: 480px) {
styles...
}
</div>
<div id="touchevents" class="step" data-x="1500" data-y="-7500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>jQueryUI Touch Punch/hammer.js</h4>
<pre class="prettyprint"><code><script>
var hammer = new Hammer(document.getElementById('app'));
hammer.ondoubletap = function(e) {alert('double tap!')};
$('#app').hammer().bind('doubletap', function(e) {
alert('double tap!');
});
</script></code></pre>
</div>
<div id="jquery-mobile" class="step" data-x="1500" data-y="-8500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>jQuery Mobile</h4>
<img src="images/jquery-mobile.png"></img>
</div>
<div id="dojo-mobile" class="step" data-x="1500" data-y="-9500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Dojo Mobile</h4>
</div>
<div id="misc" class="step" data-x="2500" data-y="-7500" data-z="-5000" data-rotate="270" data-scale="1">
<h2>misc</h2>
</div>
<div id="modernizr" class="step" data-x="1500" data-y="-7500" data-z="-5000" data-rotate="270" data-scale="1">
<h4>Modernizr/YepNope</h4>
<pre class="prettyprint"><code><script>
Modernizr.load([
test: Modernizer.websockets,
nope: 'websocket-pollyfill.js',
yep: 'adapter.js',
both: 'app.js',
complete: function () {
app.init();
}
]);
</script></code></pre>
</div>
<div id="labjs" class="step" data-x="1500" data-y="-8500" data-z="-6000" data-rotate="270" data-scale="1">
<h4>LABjs</h4>
<pre class="prettyprint"><code><script src="scripts/jquery.js"></script>
<script src="local/myapp_that_needs_jquery.js"></script>
<script>
$(function() {
myapp.init();
})
</script>
<script src="scripts/LAB.js"></script>
<script>
$LAB
.script('/scripts/jquery.js').wait()
.script('/scripts/myapp_that_needs_jquery.js').wait(function() {
myapp.init();
});
</script>
</code></pre>
</div>
<div id="require" class="step" data-x="1500" data-y="-9500" data-z="-7000" data-rotate="270" data-scale="1">
<h4>Require.js</h4>
<pre class="prettyprint"><code><script src="scripts/require.js" type="text/javascript"></script>
<script>
require(["scripts/jquery-1.7.1.min", "scripts/mootools"], function() {
//do your thing
});
</script>
<script>
define("app",["scripts/speakers", "scripts/sessions"], function(speakers, sessions) {
var speakerList = speakers.getSpeakers();
var sessionList = sessions.getSessions();
});
</script>
!--scripts/session.js
define(function() {
return { getSessions: function() {return ['one', 'two'];}};
});
!--scripts/speakers.js
define(function() {
return { getSpeakers: function() {return ['brian', 'joe'];}};
});</code></pre>
</div>
<div id="raphael" class="step" data-x="1500" data-y="-10500" data-z="-8000" data-rotate="270" data-scale="1">
<h4>Raphael.js</h4>
<iframe src="http://raphaeljs.com/polar-clock.html" style="height:550;width:500px; border:none;"></iframe>
</div>
<div id="charts" class="step" data-x="1500" data-y="-12500" data-z="-9000" data-rotate="270" data-scale="1">
<h4>Google charts/d3.js/gRaphael</h4>
<img src="images/charts.png" style="height:500px;"></img>
</div>
<div id="google-fonts" class="step" data-x="1500" data-y="-13500" data-z="-10000" data-rotate="270" data-scale="1">
<h4>Google Fonts</h4>
</div>
<div id="docco" class="step" data-x="1500" data-y="-14500" data-z="-11000" data-rotate="270" data-scale="1">
<h4>DocumentJS/Docco</h4>
<img src="images/docco.png" style="height:500px;"></img>
</div>
<div id="impress" class="step" data-x="1500" data-y="-15500" data-z="-12000" data-rotate="270" data-scale="1">
<h4>Impress.js</h4>
</div>
<div id="heatmap" class="step" data-x="1500" data-y="-16500" data-z="-13000" data-rotate="270" data-scale="1">
<h4>Heatmap.js</h4>
<img src="images/heatmap.png" style="height:500px;"></img>
</div>
<div id="thanks" class="step" data-x="2500" data-y="-17500" data-z="2000" data-scale="1">
<h2>thanks for not walking out</h2>
<h4>Brian Wigfield [AdventureTech]</h4>
<h4>@hermit4hire</h4>
<h4>http://www.gingerrant.com</h4>
</div>
</div>
<script src="scripts/impress.js"></script>
<script>impress().init();</script>
<script src="scripts/prettify.js"></script>
<script src="scripts/lang-css.js"></script>
</body>
</html>