Sign in to queue

Description

In this lesson we explore WinJS to learn more about what it can do for our apps. We learn about creating namespaces, classes, simple binding to objects, observability, and more.

 

Introduction to creating Windows Store apps using HTML and JavaScript

Chris Anderson & Josh Williams at Build 2012

https://channel9.msdn.com/Events/Build/2012/3-115

 

Channel 9's JavaScript Fundamentals Series - Lesson 10: Understanding Function versus Global Scope

https://channel9.msdn.com/Series/Javascript-Fundamentals-Development-for-Absolute-Beginners/Understanding-Function-versus-Global-Scope-10

 

Organizing your code with WinJS.Namespace

https://msdn.microsoft.com/en-us/library/windows/apps/hh967793.aspx

 

WinJS.Class.define function

https://msdn.microsoft.com/en-us/library/windows/apps/br229813.aspx

Embed

Download

The Discussion

  • User profile image
    Minowar

    Hi Bob,

    I remember in a lesson in the JS for beginner series, you said we can solve the namespace issue by creating an object includes all our functions. Why don't we use that technique in here? What's the differentiation if using WinJS.Namespace?

    One more thing, in this line: data-win-bind="textContent: time"> Why does the "data-win-bind" know the exactly "time" they need? I think WinJS.Binding.as has something to do with it, but I do not quite understand this function, even thought I've read the documentary.

    Thank you.

  • User profile image
    BobTabor

    @Minowar: Absolutely nothing wrong with continuing to use that Namespace approach from before.  You'll get a few benefits from using Microsoft's beefed up Namespaces, however.  Check out this thread for a good conversation about this very topic:

    http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/53886eb2-314e-4543-8a1f-4e1f1f450fec/

Add Your 2 Cents