C++ WinRT API - Communication - Devices - Graphics Internet Explorer Trident Engine WIN32 API - Communication - Devices - Graphics - Control Objects MSHTML - Trident Layout Engine - HTML / CSS Parser - DOM - Active Document BrowseUI HTA Web .NET C C++ C# VB HTML DirectX DirectX / OpenGL WebGL
- Microsoft IE met JScript November 1996 – Netscape biedt JavaScript aan ECMA voor standaardis atie Juni 1997 – ECMA publiceert ECMAScrip t 1999 – Microsoft embed JScript in Windows Script Host 2000 – Exception Handling 2005 – Uitbreiding Arrays Huidig – JavaScript gestandaar diseerd ECMA-262 (5.1)
myFunction() { var x=""; var time=new Date().getHours(); if (time<20) x="Good day"; else x="Good evening"; return x; } switch (d) { case 0: x="Sunday"; break; case 1: x="Monday"; break; } alert("Hello! I am an alert box!"); try { ... } catch(err) { ... } for (i=0;i<5;i++) { ... } var Circle = function(radius) { this.radius = radius; } Circle.prototype.area = function() { return Math.PI*this.radius*this.radius; } var a = new Circle(3), b = new Circle(4); a.area().toFixed(2); //28.27 b.area().toFixed(2); //50.27
Notatie • Het wordt veel gebruikt om objecten van een back-end (WCF services, ASMX services, …) naar front-end (AJAX) te sturen. data.Naam data.Type data.isProgrammeertaal data.Jaar [ { "Naam": "JSON", "Type": "Gegevensuitwisselingsformaat", "isProgrammeertaal": false, }, { "Naam": "JavaScript", "Type": "Programmeertaal", "isProgrammeertaal": true, "Jaar": 1995 } ]
annotaties (strong typing) – ECMA 6 • Momenteel op versie 0.9.1 • Installatie: http://www.typescriptlang.org • In Visual Studio wordt een template geleverd voor een web app, maar is ook te gebruiken binnen Windows Store apps (tijdelijk met workarounds).
levert een set interacties, effecten en widgets voor UI - *Draggable en Droppable - Resizable - Dialog (=lightbox/overlay) - Accordion, datepicker, autocomplete, menu - Custom checkbox, radiobutton, textbox, …
verwordt een Service-Oriented Architecture • Apps bieden de interface om diensten te consumeren Identity Management – WS-federation stack Windows Azure Web apps + Windows 8 apps Directory Services?
graphics binnen de web browser zonder gebruik van plug-ins • Ontstond als experiment bij Mozilla in 2006 • Initialiseer het canvas HTML object als WebGL canvas en gebruik OpenGL ES 2.0 syntax binnen JavaScript • Internet Explorer 11 / Windows 8.1 ondersteunt WebGL
broncode te achterhalen – ook uit Windows Store apps • Clientside validatie is eenvoudig te omzeilen – Maak de juiste keuze wat clientside vs serverside te implementeren • Het is een geïnterpreteerde taal, en heeft daarmee performance implicaties