Coding For a Living

rss

A place to share and comment about coding for a living.


Windows 8.1 Hub Control Mike McIntyre

New in Window 8.1 is the JavaScript UI Hub control that provides a hierarchical system of navigation based on the hub pattern.

imageWith the Hub control you can create a hub page.

This pattern is best for apps with large content collections or many distinct sections of content for a user to explore.

The essence of hub design is the separation of content into different sections and different levels of detail. Hub pages are the user's entry point to the app. Here content is displayed in a horizontally or vertically panning view that enables users to get a glimpse of what's new and available. The hub consists of different categories of content, each of which maps to the app's section pages. Each section should bubble up content or functionality. The hub should offer a lot of visual variety, engage users, and draw them in to different parts of the app.


BrowserSwarm Testing Tool Mike McIntyre

Developed in collaboration with AppendTo and Sauce Labs, BrowserSwarm is powered through the cloud, allowing developers to save time setting up multiple browser or device testing environments and precious server resources, Microsoft said.

Read More


Become and Expert: JavaScript Mike McIntyre

This post provides some resources that will help you become a JavaScript expert.

Do you know when

    and when not - to use the JavaScript var statement?

    it’s safe to use non-strict comparison operators?

    to cache your JavaScript objects?

    to use feature detection?

    you should use inline event handlers?

If you had difficulty with ANY of the questions you will benefit from the following JavaScript resources:

 

JavaScript is formalized in the ECMAScript language standard.

Reading the standard is a good way to become a JavaScript expert.

Click here to download a PDF containing the ECMAScript languge standards:

Standard ECMA-262

Mozilla offers an excellent JavaScript Guide for newbies and a complete JavaScript Reference for all:

JavaScript MDN

JavaScript Reference - JavaScript MDN

W3Schools provides an online tutorial:

JavaScript Tutorial

The W3 has developed many of Web APIs available to JavaScript developers:

JavaScript Web APIs - W3C

   

Visual Studio 2012– JavaScript Strict Mode Mike McIntyre

Visual Studio 2012’s JavaScript Strict Mode provides better error checking.

Strict Mode

Strict mode is a way to introduce better error-checking into your code. When you use strict mode, you cannot, for example, use implicitly declared variables, or assign a value to a read-only property, or add a property to an object that is not extensible.

For example, in the following example all the code is in strict mode, and the variable declaration outside the function causes the syntax error "Variable undefined in strict mode."

"use strict"; function testFunction(){ var testvar = 4; return testvar; } testvar = 5;
"use strict"; function testFunction(){ var testvar = 4; return testvar; } testvar = 5;