-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html
executable file
·281 lines (260 loc) · 7.74 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
<!DOCTYPE html>
<html>
<head>
<title>AngularJS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="syntaxhighlighter/shThemeDefault.css" type="text/css">
<script src="js/jquery-1.7.min.js"></script>
<script src="js/angular-1.0.0rc8.min.js"></script>
<script src="js/presentation.js"></script>
<script src="syntaxhighlighter/shCore.js"></script>
<script src="syntaxhighlighter/shBrushJScript.js"></script>
<script src="syntaxhighlighter/shBrushXml.js"></script>
<script>SyntaxHighlighter.all();</script>
</head>
<body ng-app="PresentationModule" ng-controller="PresentationController">
<div id="intro">
<h1>AngularJS</h1>
<h2>
Elliott Sprehn
</h2>
<h3 ng-show="isAfter()">@ElliottZ / esprehn (at) gmail.com</h3>
</div>
<p id="counter" ng-show="isInsideDeck()">
<a href="#/slides/1">«</a>
{{activeSlide + 1}} / {{totalSlides}}
<a href="#/slides/{{totalSlides}}">»</a>
</p>
<deck current="activeSlide" total="totalSlides">
<!--
* JavaScript was mostly fancy forms.
-->
<slide>
<h2>Remember Web 1.0 ?</h2>
<ol>
<li>Create a template
<li>Write a little JavaScript
<li>Style it
</ol>
</slide>
<!--
* JSON, XHR, Google Maps, GMail, etc.
-->
<slide>
<h2>Remember Web 2.0 ?</h2>
<ol>
<li>Create a template
<li>Create web services
<li>Write a bunch of JavaScript
<li>Style it
</ol>
</slide>
<!--
* Advanced forms, network, location services
* Tons of power, but tons of complexity
-->
<slide>
<h2>Now HTML5</h2>
<p>
<img src="images/HTML5_Logo_512.png" height="400">
</p>
</slide>
<!--
* Amount of complexity in a typical app has grown substantially.
* Need a way to manage that complexity
-->
<slide class="interlude">
<h2>and that means...</h2>
<h3>
<strong>tons</strong> of JavaScript!
</h3>
<p>
and the need to think differently.
</p>
</slide>
<!--
* Integrates with jQuery directly, plays well with most others.
-->
<slide>
<h2>AngularJS</h2>
<ul>
<li>Framework for building web apps
<li>Friends with jQuery (and others)
<li>Open Source on Github
<li>Google funded
</ul>
</slide>
<!--
* Encapsulated controllers without DOM manipulation.
* Reusable services that abstract away logic (better for tests).
-->
<slide>
<h2>Model-View-Controller</h2>
<ul>
<li>Controllers
<li>Services
</ul>
<script type="syntaxhighlighter" slide-code>
<div ng-controller="CommentController">
<textarea
ng-model="message"
name="message"></textarea>
<button ng-click="post()">Post</button>
</div>
</script>
</slide>
<!--
* Bring the power of MXML (Flex) to HTML
-->
<slide>
<h2>Declarative markup</h2>
<ul>
<li>Custom attributes
<li>Custom elements
<li>Flexible compiler
</ul>
<script type="syntaxhighlighter" slide-code>
<app-toolbar>
<input ng-model="message" name="message">
<button ng-click="send(message)">
Send message to {{username}}
</button>
</app-toolbar>
</script>
</slide>
<!--
* Modern apps much simpler with data binding
* We know better now...
* More Flex goodness
-->
<slide>
<h2>Two-way data binding</h2>
<script type="syntaxhighlighter" slide-code>
<input ng-model="start" type="date">
<input ng-model="end" type="date">
<select
ng-model="meal"
ng-options="food.name for food in foods">
</select>
<p>
Dinner is
from {{start | date:'short'}}
to {{end | date:'short'}}
and will be {{meal.name}}.
</p>
</script>
</slide>
<slide>
<h2>Easy repetition</h2>
<ul>
<li>Fast
<li>Live updating
</ul>
<script type="syntaxhighlighter" slide-code>
<div ng-repeat="comment in comments">
<h2>Posted by {{comment.username}}</h2>
<p>{{comment.text}}</p>
</div>
</script>
</slide>
<!--
* Automatic discovery of injection points
* All things in the framework get injection
-->
<slide>
<h2>RESTful resources</h2>
<script type="syntaxhighlighter" slide-code>
<script>
function PostController($scope, $resource) {
var Posts = $resource('/posts/:id');
$scope.post = Posts.get({id: 123});
// also save(), remove()...
}
</script>
<h1>{{post.title}}</h1>
<p>{{post.content}}</p>
</script>
</slide>
<!--
* Automatic discovery of injection points
* All things in the framework get injection
-->
<slide>
<h2>Dependency Management</h2>
<script type="syntaxhighlighter" slide-code>
<script>
// Automatic injection
function PostsController($scope, postStorage) {
$scope.posts = postStorage.list();
// ...
}
angular.module('app', []).
factory('postStorage', function() {
return ...;
});
</script>
</script>
</slide>
<!--
* Complex apps need real tests
-->
<slide>
<h2>Testability</h2>
<ul>
<li>No DOM manipulation in controllers
<li>Mocks provided for XHR
<li>Easily mock out services
<li>JsTD and Jasmine integration
</ul>
</slide>
<!--
* E2E tests are needed too
-->
<slide>
<h2>End-to-End runner</h2>
<script type="syntaxhighlighter" slide-code="js">
describe('ProfileController', function() {
it('should save profiles', function() {
browser().navigateTo('/profiles/mine');
expect(element('h2').text()).
toEqual('Hello, Elliott.');
input('firstname').
enter('Ethan');
element('#save').click();
browser().reload();
expect(element('h2').text()).
toEqual('Hello, Ethan.');
});
});
</script>
</slide>
<!--
* Have your tests evolve with your app
-->
<slide>
<h2>End-to-End DSL</h2>
<script type="syntaxhighlighter" slide-code="js">
describe('ProfileController', function() {
it('should save profiles', function() {
browser().navigateTo('/profiles/mine');
expect(profilePage().greeting()).
toEqual('Hello, Elliott.');
profilePage().firstName().enter('Ethan');
profilePage().save();
browser().reload();
expect(profilePage().greeting()).
toEqual('Hello, Ethan.');
});
});
</script>
</slide>
<slide class="interlude">
<h2></h2>
<h3>
Okay, lets see some demos!
</h3>
</slide>
</deck>
</body>
</html>