The Windows 8 Platform

Windows 8 is Microsoft's latest operating system. There is a Start Screen instead of a Start button. There is a virtual keyboard available. Rectangular icons called tiles are shown on the Start Screen. Tiles represent apps. Tiles that show changing info are live tiles.

There is a Charms Bar on the right hand of the screen. Apps open up to fill the whole screen. Apps can also be displayed side by side. Apps can use a touchscreen. Apps need a minimum of 1024 x 768 screen resolution. There is a new picture password for logging into Windows. The old school Windows desktop is an app.

Apps are sold in the Windows App Store. You need an account to upload apps to it. Looks like Windows 8 is the future. It may take a while for it to catch on.

Final Thoughts on Windows 8 App Dev


There are a bunch of image sizes associated with Windows 8 apps. Your logo is 150 x 150 pixels. The small logo is 30 x 30. The splash screen is 620 x 300. And the store logo is 50 x 50. You should also have some promotional images. At the very least you should provide one that is 414 x 180.

Your app has to pass tests from the Windows App Certification Kit (ACK). This tool laucnhes your app. This must be the release version of your app. I use version 2.2 of the ACK to do my business. Don't worry too much. Visual Studio will guide you through running it before uploading to the Windows Store.

You must register as a Windows Developer to upload your apps to the Windows Store. Normally this costs $49 for an individual account. A corporate account will oost you $99. I think these are the yearly fees. I hear you can get a free account if you are a student and you can prove it. At least you used to be able to get a free student account.

Watch out. A human reviews your app for inclusion in the Windows 8 Store. You app has to "provide real value" or it could get rejected. At least one of mine got rejected. I gave up on that app. Other more worthwhile apps that initially got rejected eventually got through. Some I am still working on.

Windows App Basics


There is a new keyword called partial. It tells you a class definition is in multiple files. Next there is XAML for the UI. It stands for eXtensible Applicaiton Programming Language. It is based on XML. While we are talking about buzzwords, let's defined WPF. Previously this was called WinFX. It is part of the .NET framwork 3.0. It stands for the Windows Presentation Foundation. Whew.

Now let's talk about a Grid. This is a panel. In fact it is derrived from the Panel class. The thing acts as a container. You can like this to an HTML table. You build your apps with Visual Studio. That deploys them to Windows 8. Then you can launch them from the Start Screen.

You place elements on your UI. These are things like text blocks or images. They are not controls per se. You use the elements to build controls. XAML creates the controls for you. Or you could opt to do it just with code. Function MainPage() creates the controls. The XML gets parsed during compile time. That generates a source file.

Charles Petzold, in his book, recommends you use XAML. But you don't have to. You can create a new app. You must handle the OnLaunched event. You can just use the context yourself to handle everything. I never did though.

Wrting Windows 8 Apps


Initially I had some problems finding information about writing Windows 8 Apps. Well I had problems finding good information. Then I discovered "Writing Windows 8 Apps With C# and XAML" by Charles Petzold. I wished it was written with C++ in mind. However it was written by the master and I was happy about that.

I have mentioned before that you need a Windows 8 developer account to upload apps to the Windows 8 Store. Windows 8 apps run in a full screen normally. You can only get the apps from the Windows Store. You deploy the apps to the store using Visual Studio itself.

Windows RT runs the Windows Store apps. This is the Windows Runtime. It is a new object oriented API. Inside it is based on the Component Object Model (COM). Hey. Old goodies do not die. They just get repackaged. WinRT is kind of like SilverLight I hear. I could not say as I am not familiar with SilverLight. Apps are not managed code. The namespaces begin with Windows.UI.Xaml.

To recap your options, you can build a Windows 8 app with C++ and XAML, C# and XAML, VB and XAML, or JavaScript and HTML5. The C++ is C++/CX, which stands for C++ with Component Extensions. It is a special type of C++. On the JavaScript side, you use Win JS which stands for the Windows Library for JavaScript. Yep. Intuitive.

Writing Apps With C++


I consulted some MSDN pages to help learn how to write Windows 8 apps using C++. You need Visual Studio Express for Windows 8. This is also known as Visual Studio 11. It has Blend in it. This product is licensed to you. Be reminded that you cannot perform file input/output operations directly in your apps.

Windows Store apps are not managed. The user interface is defined using XAML. You will notice some files with a *.g extension on them. They are generated files and will get overwritten. Do not edit them.

There is a manifest file for your app that specifies the app capabilities. This file is an XML file. You can edit it with an XML Editor. Normally you use the Application Manifest Design part of Visual Studio. The user has to grant the resources that you request via the manifest. This is a security feature.

Windows App Limitations


To use JavaScript to write a Windows 8 app, you should choose the JavaScript template in Visual Studio. Make sure you choose the one destined for the Windows Store. You need to consider that there are different states that you app can be in. I personally use Visual Studio to develop apps. You could also use a product called Blend. I hear it is good for layout.

You must delcare what capabilities your app needs to access. This info goes into your manifest. Be warned that the default manifest for Visual Studio app projects has Internet Access checked. Your app will get failed if you leave this checked and do not provide a privacy policy for your app. If you app does not require Internet Access, disable this capability!

Active X control are not allowed in your apps. Plug-ins are also not aupported. File access is blocked. Windows alerts do not work. You also need some tricks to access innerHTML as well. The Windows prompt is unavailable.

Windows 8 Apps Using JavaScript


Although I decided in the end to write my Windows 8 Apps in C++, you can write them in JavaScript. There is a Windows Library for JavaScript. It is called WinJS. It gives you a bunch of controls and a toolkit of sorts. There is an app host, which is an executable like a browser. It is really Internet Explorer 10 behind the scenes.

You launched your apps using a URI. You cannot use interprocess communication with other apps. That is blocked. The app splash screeen is the fisr thing that is displayed. There are a few view states that an app can be in such as full screen or snapped. The minimum screen resolution for using apps is 1024 x 768.

There is no close command in an app. Your app has to save its state when it is being suspended. The state will later be reloaded. The app settings can be done per user. You need a development account to create apps. To get into the Windows 8 Store, the app needs to pass some tests. Those tests will be conducted with the Windows App Certification Kit. It checks for things like malware and such.

The Windows 8 Store


You can write a Windows RT project in either the C++, C#, Visual BASIC, or JavaScript programming languages. Yeah. There are a lot of options. Initially I leaned toward JavaScript since I learned it recently. However I fell back onto C++ when I actually wrote my apps.

Windows 8 Apps are sold in the Windows 8 Store. You use Visual Studio to upload your app package to the store. The package file has an appx extension. It needs a manifest. The appx file is really just a zip (compressed) file.

When you start out, you should reserve your app name in the Windows Store. The app will then get licensed to the user when they purchase it through the Windows 8 Store. Kind of reminds you of the Apple store for apps, right? Microsoft is coming a bit late to the game. Let's hope they can catch up.

Windows RT


Been through some Windows 8 App Store development this summer. Did not do too much blogging about it because I was super busy. Now I got six apps in the Windows 8 Store. Still need to do some marketing for them. But the initial development for them is done. Time to reflect back on what I learned in a bunch of blog posts.

I first read a book that taught you how to write Windows 8 apps using HTML/CSS/JavaScript. Sounded good as I have been learning these technologies for the last few years. Just recently finished up an advanced Javascript course. Windows RT is a new API. It stands for the Windows Runtime API. This supports this like touch screens running on tablets and phones.

You need a couple things to start writing Windows 8 apps. Need a tool like Visual Studio 2012 express for Windows. Or you could use something called Blend. I recommend VS 2012. The express version is free. You also have to be actually running the Window 8 operating system to develop for Windows 8.

Windows 8


I am a little late to the party. But I got a copy of Windows 8 installed on my laptop. Why? I wanted to develop apps for Windows 8. And guess what? You need to have Windows 8 to develop on Windows 8. Fair enough. I had an extra laptop laying around. The install was not too hard. Getting used to the new version of Windows was harder.

The main user interface that comes up by default with Windows 8 is a screen that itself launches apps. You can spin up a normal looking Windows desktop. But there is no start menu (at least until Windows 8). I guess I need to create a lot of icons on the desktop.

Many common Windows activities are changed in Windows. For example, I had a hard time figuring out how to shut down the computer. It has been a while developing a bunch of apps. I still do not feel comfortable with the Windows 8 interface. I prefer Windows 7. I plan to give it some time.

Windows Start Button

A developer I work with was worried about the state of affairs in the Windows 8 operating system. Things seemed to be drastically changing. He worried that the new tablet style interface would be accepted by Microsoft, and mark the demise of desktop application development. Well another big change with Windows 8 was supposed to be the removal of the Windows start button.

Yeah the start button has been around since what, Windows 95? Microsoft likes shaking things up. You have seen the craziness in the Microsoft Office 2007 menus. Now they are getting rid of the start button? Turns out that was too bold a move. Guess there was an outcry from the people. Because I just read in BBC News that Microsoft is back pedaling this decisions. The start button is back. About time.

Code Digger


Microsoft has announced the release of Code Digger. It is an extension to Visual Studio 2012. Code Digger analyzes your code and determines an interesting set of inputs which stimulates the paths in your code. The set of inputs is presented in a table that also shows the outputs from your code.

You need to have at least the Professional version of the Visual Studio. You can find the tool in the Visual Studio Gallery. It relies on the PEX engine to do its work. That's because it was created by the PEX team, which is essentially two dudes from Microsoft Research.

There are some other limitations. Your code must be .NET. And it only works on portable class libraries. When you set up your Visual Studio project, choose portable class library as the type. That will enable you to use Code Digger.

Office 365

The most interesting thing I have heard out of Redmond is the new licensing model for Microsoft Office. The latest version is called Office 365. This is a yearly subscription model. Looks like you download the software over the Internet. You get charged a yearly fee to get access to the latest version of the Office suite.

The real kicker is the pricing, especially when compared to the old style product. The cost structure almost forces you to go the subscription way. The retail shrink wrapped one-time product purchase is becoming a bad value compared to the subscription costs. Ouch.

I might just sit this one out. My current version of Office is good enough. However the low cost subscription offer is a hard one to pass up. I think this is the Microsoft plan.