Data Structures using Windows 8 approach to UI: WinRT combined with JavaScript

In a blog that I wrote that can be found on, where I duplicate but upgrade an excellent video on channel 9, the video lacked the code component and used really early interfaces.  (For people wondering why I didn’t use one of the two “M” words that are used with UI, is that I don’t want to get distracted by outside blogs, who I respect but not related to the discussions about the classroom.)

WinRT and COM are similar, in fact WinRT is a subset of COM, the specifications can be found in the ECMA 334 specs and are a free download, if you are using this for your students then you should consider having them download it and do a quiz to make sure they look at the paragraph on COM.

So I wrote a class objective for our class objective:

At the conclusion of this class the student will be able to demonstrate User Interface design using C++ that can operate either connected or disconnected with cloud based computing.

In this class the professor would lead the students through structured learning to combine user interface design that incorporated C++ with cloud computation when required and client based computing when economical.  The software design will incorporate Modern UI design, with standard feedback for the user touch, device rotation, as well as onboard sensors and ports.  Further the software design would introduce the concept of cost of computing in the cloud versus on the client and then how to inform the user which types of computing is being accomplished. 

The class will use game design as the goals of the design, although students will be encouraged to follow their own design arc.


If we are going to do Data Structures, then we need to be able to access C++, but keep the students interested and feeling that the work they do has impact on their world.  For a few, mainly students who will become researcher or engine designer (games, database, etc.) then the pure C++ data structure makes sense.  Data Structures using Java is somewhat interesting, but like C#, there has to be a great deal of effort to make Java seem like a language that uses pointers, etc.  This was effective for Sun Microsystems, but now that Oracle controls the language, don’t we have the same issues that professors had with C#?  Except that Java has no specifications, which C# does.  Also, C and C++ knowledge is important for engineering students who will use older simulation systems or need to build compact systems.  Finally, maintenance of the systems created by the researchers and “engine” creators often requires in-depth knowledge of C and C++.

Use of WinRT with JavaScript can move the students to a place where they feel that the classroom isn’t something to just get through, but rather a place that they are learning material that can be put to use immediately.

Implementing C++ and even C code using WinRT is easy to do, and connecting it to JavaScript is seriously easy.  But will it work on all versions of Windows 8?  Bear in mind that the C++ and C code you write may not be supported on the ARM style of WinRT, but will work on the so called Intel version of WinRT.  Again out side of the scope of these articles.

So how do you use WinRT in your class?  With this blog I have given a link to instructions on how to implement a very Simple WinRT program and how to consume it in HTML5/JavaScript.  I am working today on an article that describes how to do arrays with WinRT and HTML5/JavaScript.  This will be my next post in this series.

The only problem is casting it so that is in a game and useable for a Windows 8 application.

Comments (0)

Skip to main content