Writing maintainable JavaScript
for big web platforms is though.
Now do it for the multi device web,
k-thanks-bye!
Slide 5
Slide 5 text
no pixels lot’s of pixels
Slide 6
Slide 6 text
no pixels lot’s of pixels
Slide 7
Slide 7 text
touch
mouse pen
gesture
remote
voice
keyboard
virtual
gyro
no pixels lot’s of pixels
Slide 8
Slide 8 text
It’s all a bit overwhelming.
Slide 9
Slide 9 text
Let’s take a step back.
Slide 10
Slide 10 text
Can’t make decisions based on device type.
“Phone or tablet… fablet… god dammit.”
Slide 11
Slide 11 text
Features are way more interesting.
“User moves his mouse… and the viewport is pretty wide…”
Slide 12
Slide 12 text
HTML works everywhere.
Slide 13
Slide 13 text
Features are stable while context is volatile.
Slide 14
Slide 14 text
Screensize
“User resizes the window or rotates his device…”
Input type
“User interacts with touch then moves to his mouse…”
Cookie support
“User decides to not allow cookies…”
Slide 15
Slide 15 text
These changes give us valuable info
about the context the user is in.
Slide 16
Slide 16 text
“We want to measure the users’ context
and respond appropriately.”
Slide 17
Slide 17 text
touch
mouse pen
gesture
remote
voice
keyboard
virtual
gyro
CURRENT
TIME
LIGHT
LEVEL
SESSION
LENGTH
NAVIGATION
HISTORY
SCROLL
POSITION
proximity
LOCATION
VELOCITY
WEATHER
CONNECTION
STABILITY
HISTORICAL
BEHAVIOR
MOTION
Slide 18
Slide 18 text
demo
Slide 19
Slide 19 text
HOW DO I USE IT
Programming principles
https://www.flickr.com/photos/j_regan/6454408915/in/photostream/
Slide 20
Slide 20 text
game development
A quick side track
Slide 21
Slide 21 text
Game development turned out to be
more difficult than expected.
Slide 22
Slide 22 text
How to make these systems play nice together…
Particle engine
Achievement dispenser
Game loop
Render engine
Collision detection
Slide 23
Slide 23 text
How to make these systems play nice together…
I had no clue…
Slide 24
Slide 24 text
My developer skills were lacking, I
needed engineering skills.
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
No content
Slide 28
Slide 28 text
The most important take-away…
Slide 29
Slide 29 text
Single Responsibility Principle
Slide 30
Slide 30 text
Using this principle while examining the
responsive web I found why my code
spiralled out of control each time.
Slide 31
Slide 31 text
A typical piece of code was…
Feature testing
Waiting for
DOMContentLoaded
Monitoring events
Expecting other
code
Slide 32
Slide 32 text
So in the next project, I separated all
code using modules based on AMD.
Slide 33
Slide 33 text
I needed to build an entity that could
load those modules without taking too
much responsibility.
Slide 34
Slide 34 text
That entity is Conditioner.
And it’s build on the following
3 principles.
Slide 35
Slide 35 text
1. module isolation
A strict separation between modules