100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Volledige samenvatting Webapplicaties II

Rating
3.8
(9)
Sold
28
Pages
105
Uploaded on
28-05-2017
Written in
2016/2017

Deze samenvatting omvat alle hoofdstukken uit Webapplicaties II (Toegepaste Informatica Hogent, eerste jaar, tweede semester).

Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Study
Course

Document information

Summarized whole book?
Unknown
Uploaded on
May 28, 2017
Number of pages
105
Written in
2016/2017
Type
Summary

Subjects

Content preview

WEBAPPLICATIES II
Academiejaar 2016 - 2017




Jakob Lierman
HoGent

,Jakob Lierman Webapplicaties II


Inhoud
JAVASCRIPT I .................................................................................................................................................. 7
DE BOUWSTENEN..................................................................................................................................................... 7
Variabelen ...................................................................................................................................................... 7
Constanten ..................................................................................................................................................... 7
Datatypes ....................................................................................................................................................... 7
Undefined ....................................................................................................................................................... 8
Null ................................................................................................................................................................. 8
Number ........................................................................................................................................................... 8
Boolean ......................................................................................................................................................... 10
String ............................................................................................................................................................ 11
Date .............................................................................................................................................................. 12
TOEVOEGEN AAN HTML-PAGINA EN UITVOEREN ......................................................................................................... 12
DEBUGGEN ........................................................................................................................................................... 13
INSTRUCTIES ......................................................................................................................................................... 13
Blocks ............................................................................................................................................................ 13
If.................................................................................................................................................................... 13
Switch ........................................................................................................................................................... 14
While/do-while ............................................................................................................................................. 14
For................................................................................................................................................................. 14
Break/continue ............................................................................................................................................. 14
OPERATOREN ........................................................................................................................................................ 15
FUNCTIES SIMPEL UITGELEGD.................................................................................................................................... 15
Scope ~ context van de variabelen ............................................................................................................... 15
Gebruik van bestaande functies ................................................................................................................... 16
ARRAYS................................................................................................................................................................ 16
Plaatsen van waarden in een array .............................................................................................................. 17
Aanmaken van een array via array literal .................................................................................................... 17
Opvragen van een element aan de hand van de index ................................................................................. 17
Verwijderen van een element in de array ..................................................................................................... 17
Overlopen van een array .............................................................................................................................. 18
Pop, push, shift en unshift ............................................................................................................................ 18
Zoeken of een waarde voorkomt in een array .............................................................................................. 19
Array methods .............................................................................................................................................. 19
Meerdimensionele arrays ............................................................................................................................. 20
JAVASCRIPT II ............................................................................................................................................... 21
OBJECTEN ............................................................................................................................................................ 21
Waarde van property van een object uitlezen .............................................................................................. 21
Een property toevoegen aan een object ....................................................................................................... 21
Object aanmaken op verschillende manieren............................................................................................... 22
De waarde van een property van een object wijzigen .................................................................................. 22
Een property van een object verwijderen ..................................................................................................... 22
For..in..: overlopen van alle properties ......................................................................................................... 22
FUNCTIES ............................................................................................................................................................. 23
Hoisting......................................................................................................................................................... 23
Function scope .............................................................................................................................................. 24
Scope chaining .............................................................................................................................................. 24
Functie definiëren ......................................................................................................................................... 25
Klein verschil door hoisting ......................................................................................................................................... 25
Opmerking in verband met function declaration ....................................................................................................... 25
Function overloading .................................................................................................................................... 26

2

,Jakob Lierman Webapplicaties II


OBJECTEN EN FUNCTIES (METHODES) ......................................................................................................................... 26
this keyword ................................................................................................................................................. 26
Patroon: code groeperen in object literals.................................................................................................... 27
EVENTS EN EVENT HANDLERS .................................................................................................................................... 27
Functies koppelen aan events ....................................................................................................................... 28
Democratie = scheiding der machten ........................................................................................................... 28
This keyword................................................................................................................................................. 29
De methode addEventListener ..................................................................................................................... 30
REVEALING MODULE PATTERN ................................................................................................................................. 30
Problemen met voorgaande code................................................................................................................. 30
Patroon: Revealing Module pattern ............................................................................................................. 30
Structuur module .......................................................................................................................................... 30
CLOSURES ............................................................................................................................................................ 32
EXCEPTIONS .......................................................................................................................................................... 33
FUNCTIES IN DEPTH ................................................................................................................................................ 33
Parameters en argumenten .......................................................................................................................... 33
Parameters: arguments object ................................................................................................................................... 34
Een mini jQuery............................................................................................................................................. 35
JAVASCRIPT III .............................................................................................................................................. 36
OBJECTEN ............................................................................................................................................................ 36
Prototype chaining ....................................................................................................................................... 38
OO PROGRAMMING .............................................................................................................................................. 39
DE CONSTRUCTOR FUNCTIE ...................................................................................................................................... 39
De constructor functie zelf ............................................................................................................................ 39
Creatie van objecten ................................................................................................................................................... 39
Verschillen met een ‘gewone functie’ ........................................................................................................................ 40
Het nieuwe object? ..................................................................................................................................................... 40
PROTOTYPE .......................................................................................................................................................... 40
Overerving .................................................................................................................................................... 40
Overerving .................................................................................................................................................... 41
The prototype chaining rule: how the engine finds a property of an object when you access one? ............ 41
De hidden link naar het prototype object __proto__ ................................................................................... 42
Via een prototype kan je default-waarden creëren ...................................................................................... 42
9 native object constructors gedefinieerd in JavaScript ............................................................................................. 43
Native object type uitbreiden ....................................................................................................................... 43
Samenvatting ............................................................................................................................................... 43
ZOEKFUNCTIE ........................................................................................................................................................ 44
RANDOM WEERGEVEN ............................................................................................................................................ 44
SORTEREN OP DATUM ............................................................................................................................................. 45
ENCAPSULATION .................................................................................................................................................... 46
OVERERVING......................................................................................................................................................... 46
CHAINABLE METHODS ............................................................................................................................................. 47
CANVAS........................................................................................................................................................ 48
FALLBACK ............................................................................................................................................................. 48
CANVAS DRAWING ................................................................................................................................................. 48
Verschillende mogelijkheden om te tekenen ................................................................................................ 49
Canvas toevoegen aan de pagina ............................................................................................................................... 49
Verschillende properties declareren .......................................................................................................................... 49
Tekenen van een module (tweetModule) .................................................................................................................. 49
Preview ....................................................................................................................................................................... 50
Klikken op canvas en cirkels tekenen ......................................................................................................................... 53
Image .......................................................................................................................................................................... 54


3

, Jakob Lierman Webapplicaties II


Advanced drawing ........................................................................................................................................ 54
Transformaties ............................................................................................................................................................ 54
Composities ................................................................................................................................................................ 55
Afbeeldingsdata & URL’s ............................................................................................................................................ 58
Animatie ..................................................................................................................................................................... 60
Grafieken .................................................................................................................................................................... 62
Canvas 3D drawing ....................................................................................................................................... 62
WEB STORAGE .............................................................................................................................................. 63
VROEGER ............................................................................................................................................................. 63
Cookies.......................................................................................................................................................... 63
Problemen met het gebruik van cookies .................................................................................................................... 63
WEB STORAGE STANDAARD ..................................................................................................................................... 63
WS API ATTRIBUTEN EN FUNCTIES ............................................................................................................................ 64
VOORBEELD STICKY NOTES ....................................................................................................................................... 64
noteToSelfV1.js ............................................................................................................................................. 64
stickyModule ................................................................................................................................................ 64
sessionStorage versus localStorage .............................................................................................................. 65
JSON OBJECT STORAGE .......................................................................................................................................... 65
Voorbeeld ..................................................................................................................................................... 66
Objecten en arrays opslaan in webstorage .................................................................................................. 66
Voorbeeld ................................................................................................................................................................... 66
WEB STORAGE API EVENT ...................................................................................................................................... 68
Voorbeeld ..................................................................................................................................................... 68
DOCUMENT OBJECT MODEL ......................................................................................................................... 69
WAT IS DOM ....................................................................................................................................................... 69
Voorbeelden ................................................................................................................................................. 70
EIGENSCHAPPEN VAN EEN NODE ............................................................................................................................... 70
nodeType ...................................................................................................................................................... 70
childNodes .................................................................................................................................................... 71
parentNode, firstChild, lastChild, previousSibling, nextSibling ..................................................................... 71
DYNAMISCHE HTML-CODE GENEREREN ..................................................................................................................... 71
Voorbeeld ..................................................................................................................................................... 71
REPOSITORY.......................................................................................................................................................... 72
productenRepository .................................................................................................................................... 72
voegProductToe.......................................................................................................................................................... 73
getProduct .................................................................................................................................................................. 74
getRubrieken .............................................................................................................................................................. 74
getProductUitRubriek ................................................................................................................................................. 74
WIJZIGINGEN AANBRENGEN IN EEN DOCUMENT ........................................................................................................... 75
innerHTML .................................................................................................................................................... 75
Wijzigen van documentstructuur.................................................................................................................. 75
WERKEN MET ATTRIBUTEN....................................................................................................................................... 75
Manier 1 ....................................................................................................................................................... 75
Manier 2 ....................................................................................................................................................... 77
Manier 3 ....................................................................................................................................................... 77
EÉN OF MEERDERE NODES SELECTEREN ....................................................................................................................... 77
JQUERY ........................................................................................................................................................ 78
TOEVOEGEN AAN PROJECT ....................................................................................................................................... 78
SELECTORS ........................................................................................................................................................... 78
Basic selectors .............................................................................................................................................. 79
Basic filter selectors ...................................................................................................................................... 79


4
$5.43
Get access to the full document:
Purchased by 28 students

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Reviews from verified buyers

Showing 7 of 9 reviews
6 year ago

6 year ago

7 year ago

7 year ago

7 year ago

7 year ago

7 year ago

3.8

9 reviews

5
1
4
5
3
3
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
jakoblierman Hogeschool Gent
Follow You need to be logged in order to follow users or courses
Sold
256
Member since
8 year
Number of followers
136
Documents
42
Last sold
8 months ago
Samenvattingen Toegepaste Informatica HoGent

Bevat samenvattingen voor alle vakken (waarvoor een samenvatting nuttig is) uit de richting Toegepaste Informatica.

3.8

49 reviews

5
9
4
22
3
16
2
1
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions