certification
For companies and individuals
with ambitions to be a
Gold partner
6
Certified technicians
60+
exams
https://www.microsoft.com/en-gb/learning/exam-list.aspx
A) Credentials with potential clients
B) Free software licences
C) An accolade for your CV
Implement and manipulate document structures and objects (24%)
Use CSS3 in applications (25%)
https://www.microsoft.com/en-gb/learning/exam-70-480.aspx
Basic JS
Call - accepts this and a series of individual args
Apply - accepts a list of args as an array
This - meaning in different contexts
Callbacks - how to implement
Parsing JSON
Parsing Strings
Regex
// open close regex statement
\escape character
[] for range of characters e.g. 1-3 or a-f
[^] for range of characters you don’t want to match
{} for range of items to act on - can accept two digits: min and max values
. for any character (except newlines)
\d for digit
\w for word character
\s whitespace
\b
i for case insensitivity
? optional character
() for subgroup
Regex cont.
test() - returns boolean for match
match() - returns an object with the match or null
replace() - returns the new string. A function can be passed in as second argument
exec() - similar to match but can return multiple groups
Web Workers
Two types: Dedicated and shared
Created with the new keyword e.g. new Worker(‘my-woker.js’);
postMessage - send data to the worker, which accepts string or JSON
Transferable objects (File, Blob, ArrayBuffer and JSON) also uses postMessage but second argument is ArrayBuffer that lists all objects
this, self - the global scope for the worker
NB messages between main thread and worker are copied not shared
worker.terminate or
self.close to stop a worker
Web Workers
available methods are:
Application cache
Cache manifest file must be mime type text/cache-manifest via web server or .htaccess like so AddType text/cache-manifest .appcache
Include relevant attribute in html tag e.g. manifest="example.appcache"
The file itself begins with CACHE MANIFEST
and then lists all the files to cache with no punctuation
file can be from another domain
It is very sensitive - failure to download a resource causes a fail and is deleted entirely if it returns a 404 or 410
CACHE - list all files to be cached
NETWORK - list of files that can come from the network i.e. NOT cached
FALLBACK - files to load if resource is unavailable
Reach it via window.applicationCache object which has a status property
Important - your site will use the cache even if you’re online. So no updates work unless you update the manifest :[
jQuery
Extensions
The colon selector can be used to select all items of a type e.g.
$(‘:button’) will select both <button> and <input type=“button”>
$(‘:header’) will get all the headings
AJAX
data: the data you’re sending e.g. {city: ‘boston’}
dataType : data format, you are expecting from the server
contentType : data format, you are sending to the server
jQuery Selectors
Attribute Ends With Selector [name$=”value”]
Attribute Starts With Selector [name^=”value”]
Notice how the two above use the same symbols as Regex
Attribute Contains Prefix Selector [name|=”value”] - i.e. proceeded by a hyphen
Attribute Contains Word Selector [name~=”value”]
JS Classes
To inherit a class assign to the prototype property of another
e.g.
function User() {}
function Admin() {}
Admin.prototype = new User();
Storing Data
Cookies are sent to the server,
only store 4kb and persist after browser restart
LocalStorage stores up to 10Mb, does not send to the server and persists
Session does not persist nor send to the server
HTML5 Audio/Video
Setting the source
playback control: play, pause, stop etc.
Canvas
strokeStyle
fillStyle
fill() - after a shape has been drawn e.g. rect(); fill()
fillRect
fillText
context.rotate(angle)
GeoLocation
getCurrentPosition - callback that provides a position object with latitude and longitude properties
The object’s variable name is defined inside the success callback
navigator.geolocation.getCurrentPosition(success[, error[, options]])
watchPosition - callback for updates
clearWatch
Connection
if (navigator.onLine) {
console.log('online');
} else {
console.log('offline');
}
APIs
SOAP uses POST
REST uses either but often GET
Form input and attr types
WebSockets
Events:
url is any regular url string that links to the sockets server e.g. ‘www.mysite.com/mysocketsserver’
URIs
In encodeURIComponent these separators are encoded also because they are regarded as text and not special characters.
Error handling
try, catch, finally and throw
e.g.
try {
something();
throw new Error(‘oops’);
}
catch(e) {
console.erros(e.message);
}
finally {
}
Data lists
The HTML <datalist> element contains a set of <option> elements that represent the values available for other controls.
<label>Choose a browser from this list: <input list="browsers" name="myBrowser" /></label> <datalist id="browsers"> <option value="Chrome"> <option value="Firefox"> <option value="Internet Explorer"> <option value="Opera"> <option value="Safari"> <option value="Microsoft Edge"> </datalist>
Not supported in Safari not IE9 and below
CSS
columns - shorthand for column-count, column-gap etc.
column-width - set the width (units) for all the children
-ms-grid-columns: auto | unit e.g. 200px 1fr 2fr | none
-ms-grid-rows: auto | min-content | max-content
display: flex
flex-wrap: wrap, nowrap, wrap-reverse
flex-basis - the size, for the children in units or keywords: fill, max-content, fit-content
XML
handling xml
methods of doc
xmlDoc.selectSingleNode(‘news/channel/item/title’)
xmlNode.textContent
xmlNode.text
XHR with older Microsoft browsers uses:
new ActiveXObject(‘microsoft.XMLHTTP’);
Checking for success:
readyState === 4
status === 200
Event bubbling and capturing
var target = event.target || event.srcElement
event.target is for standards compliant browsers
event.srcElement is for Windows browsers
addEventListener with last argument true is only the way to catch the event at capturing e.g. button.addEventListner(‘click’, myFn, true);
Cancelling
For W3C-compliant browsers use
event.stopPropagation()
For IE<9 use
event.cancelBubble = true
SVG Microsoft use the currentScale attribute which accepts a number
The test may include deprecated (Microsoft only) properties such as:
$(‘form’).serialize() - uses the name attributes of the inputs (not the ID)
creates a (serial) string
CSS exclusions, which are only supported in Microsoft browsers
ms-wrap-flow: auto | both | start | end | maximum | clear
Drag and drop
microsoft flex: flex-align, flex-pack etc.
Style sheet order
Microsoft software
Visual Studio Professional 2012
Visual Studio Premium 2012
Visual Studio Ultimate 2012
Visual Studio Express 2012 for Web
Microsoft Blend - a design app