Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Make frontend development radical with Angular
Search
Ian Duncan
May 31, 2013
Programming
220
4
Share
Make frontend development radical with Angular
Ian Duncan
May 31, 2013
More Decks by Ian Duncan
See All by Ian Duncan
OAuth at Logos
iand675
3
150
Other Decks in Programming
See All in Programming
10 Tips of AWS ~Gen AI on AWS~
licux
5
450
t *testing.T は どこからやってくるの?
otakakot
1
710
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
1k
PHPer、Cloudflare に引っ越す
suguruooki
1
100
第3木曜LT会 #28
tinykitten
PRO
0
110
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
640
事業会社でのセキュリティ長期インターンについて
masachikaura
0
260
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
400
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
290
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
140
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
800
Don't Prompt Harder, Structure Better
kitasuke
0
780
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Paper Plane
katiecoart
PRO
1
49k
Code Review Best Practice
trishagee
74
20k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Transcript
ANGULAR MAKE FRONTEND DEVELOPMENT RADICAL WITH
I’M IAN
I’M IAN I BUILD FAITHLIFE
I’M IAN I BUILD FAITHLIFE I LIKE STUFF RADICAL
THINGS THAT ARE RADICAL: Fewer Bugs Less Code Fast Development
WHAT ANGULAR OFFERS: Routing Data Binding Controllers Dependency Injection Form
Validation Reusable HTML Components
WHAT ANGULAR OFFERS: Some other stuff too.
OK, that’s a lot to cover in one talk.
IN A NUTSHELL It’s a frontend JavaScript framework for building
testable, manageable code.
The good thing about Javascript: it’s really flexible. The bad
thing about Javascript: it’s really flexible.
None
Manually manipulating the DOM is like assembly programming
None
We’ve solved this problem before.
Why not MVC? Model View Controller
Model (Plain old Javascript object) View (HTML) Controller (JavaScript)
Controller
Controller
$scope exposes data/ functions to views
View
Surprise! It’s just HTML5.
Models really are just plain old JavaScript objects.
Where’s the magic?
Dependency injection + Two-way data binding
Dependency injection Specify dependency sources, Angular wires them up for
you.
Dependency injection Angular inspects function argument names to look for
the value to inject.
Dependency injection
Two-way data binding Values in $scope are exposed to both
the controller and the view.
Two-way data binding Modifications from one propagate to the other.
Two-way data binding Scopes are inherited
Two-way data binding Scopes trigger updates when observed values change
Two-way data binding
Directives
Directives Add behavior to HTML with classes, new elements, &
new attributes.
Directives Inspired by W3C’s Web Components working drafts.
Directives One of Angular’s killer features.
“Gee, I wish HTML could...” Support dropdown menus Have syntax-highlighted
text editing Have relative timestamps
Now it does! <sharks-with-lasers />
Directives The only place you should ever need to write
a line of code that manipulates the DOM
Testing Dependency injection makes that a lot easier. Separation of
concerns is the key!
Testing Run unit tests and integration tests across multiple browsers.
Angular has a ridiculously fast test runner, Karma.
Testing Built in mocks for common test scenarios: AJAX requests
Dates Logging
Testing Built in end-to-end testing support
Not covered in this talk: Internationalization & localization Filters Partial
templates CSS3 animation & transitions
QUESTIONS?