10. Doctypes
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
11. <!DOCTYPE html PUBLIC quot;-//W3C//DTD XHTML 1.0 Strict//ENquot;
quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdquot;>
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
19. Caption
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
20. Thead
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
21. tfoot
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
22. tbody
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
23. tr
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
24. td
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
25. th
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
26. colspan
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
27. colgroup
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
28. rowspan
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
29. rowgroup
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
30. HTML
Itʼs more than divʼs and spanʼs
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
31. div
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
32. span
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
33. p
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
34. h1 > h6
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
35. em
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
36. strong
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
37. abbr
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
38. Block & inline
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
39. Generally, block-level elements begin
on new lines, inline elements do not
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
40. id
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
41. class
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
43. HTML
Itʼs about structure, NOT presentation.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
44. <div class=quot;spacer-wquot;><!-- this empty spacer
is used to make a space between vertical
holding blocks --></div>
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
45. Do more with less
focus on the information, not the presentation.
that is what css is for.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
82. E:empty
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
83. E~F
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
84. CSS 3 ?
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
85. dojo
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
86. jQuery
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
87. Tools
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
88. Firebug
https://addons.mozilla.org/en-US/firefox/addon/1843
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
89. Yslow
http://developer.yahoo.com/yslow/
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
90. Web developer 1.1.6
https://addons.mozilla.org/en-US/firefox/addon/60
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
92. Start big
set font stuff on the body (and the td for ie)
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
93. End small
formulate exceptions on id’s, classes or on specific dom
elements.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
94. Write as little as possible
It’s easy to get confused.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
95. Know of the cascade
And embrace it.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
96. Inline styles are evil
don’t use them.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
97. Exercise
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
98. Style this.
Exercise
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
100. break
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
101. JavaScript
part 1
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
102. JavaScript === evil
Do not rely on it.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
103. Donʼt rely on it
HTML is a rely accessible platform. Use JavaScript to
enhance it.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
104. Global variables === evil
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
105. x = global;
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
106. function isitglobal() {
x = global;
}
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
107. var is your friend
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
108. function isitglobal() {
var x = notglobal;
}
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
109. Progressive Enhancement
!==
Graceful degradation.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
110. HIJAX vs AJAX
Plan ajax from the beginning and build it in the end.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
111. ns.nl
with javascript
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
112. ns.nl
without javascript.
aka not so graceful
degradation...
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
113. JavaScript !== java
Really not.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
114. JavaScript
Is not a toy language.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
115. The old way
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
116. <a
href=”#”
onclick=”javascript:function(){
window.open(‘http://wnas.nl’,’wnas’,’width=300,height=400’);
}”>
go there!
</a>
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
117. Bad.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
118. <a
href=”#”
onclick=”javascript:function(){
window.open(‘http://wnas.nl’,’wnas’,’width=300,height=400’);
}”>
go there!
</a>
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
119. <a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
<a href=”#” onclick=”javascript:function(){// do stuff );}”>go there!</a>
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
120. <a
href=”http://wnas.nl”
class=”popup”>
go there!
</a>
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
121. $(‘.popup’).click( function () {
window.open( this.href,’wnas’,’width=300,height=400’);
});
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
122. The World's Most Misunderstood
Programming Language
‘Douglas Crockford’
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
123. Closures
one of javascript most devious concepts
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
124. where a function
remembers what
happens around it
‘Stuart Langridge’
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
127. If all you have is a
everything looks like a nail
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
128. Read a lot
this day is too short for patterns...
http://delicious.com/wnas
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
129. namespace
var ing = function () {
// do stuff
}();
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
130. Revealing module pattern
var ing = function () {
var foo = function () {
// do stuff
}
return {
foo : foo
}
}();
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
131. private variables
var ing = function () {
var config = { // object literal
name : ‘value’
};
var foo = function () {
alert ( config.name );
};
return {
foo : foo
};
}();
ing.foo();
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
132. Group your stuff
namespacing keeps it safe and structurally sound.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
133. XML vs JSON
Use the best possible solution
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
134. Not the available one
JSON vs XML
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
135. Memory
And the garbage collector
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
136. So what changed ?
Ajax and Rich Internet Applications.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
138. The solution
think of history
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
139. Ajax
origins
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
140. Clean up
That is what Ajax stood for anyway...
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
141. Pick up after yourself
Leave a clean dom after you... ( use dojo for that )
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
143. Totaal voetbal
Let the individual elements of your
program work for you.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
144. Java
To handle the logic.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
145. JSP / XHTML
To display the structure of your programs.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
146. CSS
To present it in a proper manner.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
147. JavaScript
To enhance the user experience.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
148. Exercise
enhance the page you made...
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
149. Extra time
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
151. Just in time initialization
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
152. Lazy loading
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
153. Code as prose.
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
154. Douglas
The good parts
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
155. JavaScript
The Definitive Guide (5th)
Wilfred Nas - Client Side Development
wnas.nl | twitter.com/wnas | wilfred@wnas.nl
Notas do Editor
I have been working on the web for the past 14 years. I started out as a designer bugging developers. In the past years I have come full circle, becoming the developer that is bugging designers.
giving workshops is not my main job, just something I do on the side. mostly when people give me beer and get me talking :)
the only url you have to write down
There are three sides to a website... mvc...
we will start with the basics, HTML. boring isn’t it. after all html is easy...
There are a lot of things to think about, like;
html is for structure, a way to show the content...
Which doctype do you use?
Strict is the way to go, if you can
sketch the difference between ie and w3c
and still this is the way most websites were build...
especially if your building data intensive applications...
make sure you specify this one BEFORE the tbody
most people, turning away from tables, will use div’s in the same way...
to identify, must be unique
not just for css. to classify
most developers get a fo and a graphic design. they will use the design to build and the fo to tweak. they should do the reverse
bad
don’t add extra div’s to create that border the design calls for. You allready have enough elements to play with...
should be around 10.30
start 11.00
selectors are not limited to id’s and can be chained...
multiple classes can be used. and such...
supported in most browsers
support is not as wide spread
Match any E elements, whose att atribute value begins with ‘val’
Matches any E element that has no children (including text nodes)
matches any F element that is preceded by an E element...
general sibling selector
style the page you just made with proper html...
start 12.00
should be 11.45
around 12.30
start 13.00
=== is exactly equal to (value and type)
== is equal to
build a good app and make it better.
don’t build a good app and let it slip away...
build as if you have no javascript en HIJACK the form actions with javascript
please don’t try to make it into it...
Really it is not.
power, confusion
ie is the problem
further than that, I will not go. as stuart talk opens my eyes but not enough. there is more in this than I know...
Don’t put all of your trust in patterns...
transactie module by the dutch police to process your tickets is suffering...
used to be no problem, as we left the page after a while
We don’t leave the page anymore, instead we keep producing more and more dom objects...
he forgot css and left out json or html as a data layer...
Where does the name ajax stood for in the beginning...
sorry for that, a mistake...
The cleaner was a household name for so long, that we should use it...
look into the architecture document for a good example, me I make the mistake sometimes, that’s where my hair is going...
including main characters and a compelling story line...
JavaScript as a language is great, but has many bad parts. You want to avoid them...
A must have reference guide of a gaziljon pages. Any decent JavaScript developer has a copy handy...