Windows 8, the very beginning.
It was yesterday when I tweeted about my thought of beginning to write posts on Windows 8. Well, ah! Nobody favorited it, nobody retweeted it, even nobody replied to it. But the good thing is, I am going to do it it anyway. Windows 8, the platform of awesomeness. Released by Microsoft for common people around this past October. Yes you guessed it right, I don't come under the category of common people. I was working on Windows 8 even before it was released.
Instead of talking about me, which will never end, let's get our hand dirty in rather coding for Windows Store applications.
Making Windows 8 Store Applications
There are many ways to create a Windows Store application, in fact there are many different languages that can be used to code them too. Some of them are:
- The age old C++.
- The rather cool C#.
- The very awesome JavaScript.
We, as far as these articles are concerned, will prefer to use JavaScript, actually WinJS to be specific. WinJS incorporates the Windows library for JavaScript that provides a set of new controls designed for Windows Store applications, that enhances the power of rather powerful JavaScript in enormous ways. We will see this beauty, the elegance of JavaScript in the line of upcoming posts. For this article now, let us create a very simple Hello World application, and wrap it up.
To begin, you need to create a JavaScript project; choose Windows Store and choose the "Blank App" template.

Once you are done, let Visual Studio prepare the project quickly. Once it is done being prepared, you will be left with a file called "default.js" alone! Not to worry. Next, go right to the Solution Explorer and choose to open "default.html". And yes, this is a view of your application. You need to write HTML to create the UI of the application. If you hate HTML, then please do follow the future articles, I bet that in the end, you'll come out loving it more than ever.
Meanwhile your default.html must be opened. The content of which must resemble this below:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HelloWorld</title>
<!-- WinJS references -->
<link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" />
<!-- HelloWorld references -->
<link href="/css/default.css" rel="stylesheet" />
<script src="/js/default.js"></script>
</head>
<body>
<p>Content goes here</p>
</body>
</html>
In the paragraph tag <p> remove the inner text and give it an id like this:
<body>
<p id="UIText"></p>
</body>
We ain't doing it simply by placing "hello world!!!" in the <p> tag. That would serve our purpose, but we are going to use JavaScript to display it instead.
Next you need to go to the "default.js" file that is the associated JavaScript file with the "default.html" that will look like this:
// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232509
(function () {
"use strict";
WinJS.Binding.optimizeBindingReferences = true;
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;

Reinaldo SilvaPosted Jun 21, 2013, 8:14 PM
Thanks your work, verywell...
Neelesh VishwakarmaPosted May 22, 2013, 2:58 PM
Thanks
Dinesh BeniwalPosted May 22, 2013, 5:37 AM
Good Work Neelesh.