Windows 8: Programming

Note: This is one installment of multiple posts to come on Windows 8 and several Windows 8 devices.

I recently attended a two-hour Windows 8 DevCamp, put on by the Houston .NET User Group. The talk was given by Jared Bienz. They also plugged a website called Generation App which is a useful tool for Windows 8 users (share app ideas and use references to get started on building your first app).

The talk was largely a regurgitation of a Windows 8 conference that I attended in November 2012 (A New Era of Work). Below are some notes that I took during the DevCamp.

Notes

  • Windows 8 native applications can run using HTML/javascript and DirectX – DirectX is used to render all the Windows store applications (even if you code it with HTML/js).
  • Applications can expose certain events and other applications can pick them up through the OS
    • Example: A paint application can use the ‘Share’ functionality of the charms bar to share a painted picture with applications that accept a picture. A puzzle application could accept a painted picture from the other application and make a puzzle out of it.
  • Windows 8 is different than WinRT (Windows Run-Time) – primary difference is that with Windows 8 you still have a ‘desktop’ that can run legacy Windows applications
    • Windows 8 will feel a lot like Windows 7 with a different ‘Start Button’ experience
  • Application design should be more like using a web browser than a legacy windows application
    • No sense of windows or dialog popping
    • More of navigation and view switching
  • Metro apps are what you see on the start screen – they can be used in Windows 8 and WinRT
    • You can design views with XAML and code with C/C++/C#/VB (C++ can now use the XAML designer!)
    • You can also use HTML5, javascript, and CSS to design and code
  • You can write components in C++ that are used in a C# component
  • New keywords “await” and “async” take some of the pain out of multi-threaded coding
    • Anything that can take more the 30 ms has to be done async (so that applications do not block the UI)
    • await tells the current operation to run in the background
  • Windows 8 has changed the way that it stores data and allows applications to access data (app data vs. user data)
    • Applications do not have access to user data by default (but you can always show a file picker – the choice is up to the user to allow read/write)
    • Applications can read/write files and settings in their own space (isolated area – uninstall brings system completely back to where it was before install)
    • Applications are installed once per device (other users on same device will not have to reinstall – looks as if they have their own copy)
  • A file calle Package.appxmanifest will define the capabilities (Document’s Library, Microphone, Music Library, Webcam, etc.) allowed for an application to attempt to access that capability
    • The user has to approve this capability when the app first tries to access it (i.e. if your app tries to access the user’s document library, they will then be prompted to allow it)
    • User can change their mind later with ‘Permissions’ via the charms bar
  • Design of metro apps has been standardized so that users have an easier time adapting to Windows 8
    • Built-in page templates give you some help OOTB
    • Screen real-estate used completely (think grid layout)
    • C-silhouette: majority of store applications (muscle memory), but you don’t have to do it this way
  • Minimum resolution of 1024 x 768
    • Snap view lets two applications run at the same time
  • Blend is highly recommended for Windows 8 development (you almost have to use it)
    • Keeps track of the design of your UI per state (full screen, filled, portait, snapped)
    • Vector graphics are highly recommended because metro apps take advantage of all screen real-estate (can encounter high resolution monitors)
    • Can use a Viewbox at fixed aspect ratio and it will scale from there

Final Thoughts

I have yet to get my hands dirty with Windows 8. I recently purchased a Lenovo Yoga, so I’ll be jumping into it very shortly. One of the first things I will do is look into metro application development. In my opinion, Windows 8 is taking an innovative step towards merging the two ways that consumers use computing most frequently – on a laptop/desktop and a mobile device. I’d also like to see how easy it is to create metro apps using HTML/javascript/CSS. With the birth of cross-platform concerns, HTML5 has become an early front-runner to allow enterprises to have one code base. Microsoft has done themselves a huge favor if creating metro apps for Windows 8 is a breeze with HTML/javascript/CSS.

Posted in Professional Tagged with: , , , ,
One comment on “Windows 8: Programming
  1. I agree, of all the mobile platforms I think Windows is the only one which gives cross-platform applications a chance at being a “first class” development option. What I’ve read has indicated that the web stack will be able to do everything the native stack will be able to do (with maybe a few edge case exceptions due to security concerns). If this is true then it will be on the cross platform development tools (Appcelerator, Titanium, etc.) to take advantage of this capability.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Subscribe to my Insights via Email

Join 61 other subscribers

%d bloggers like this: