Jan 152013

This a post that I’ve postponed for over one month now and the main reason is that I have mixed feelings about it and it’s hard to settle on something.

Just to give some context, I am a long-term .NET developer. I’ve been working with technologies such as Silverlight and WPF for the past years on a day-to-day basis so my first natural instinct has been to go for the XAML development for WinRT. I also have relative well knowledge of Javascript, but that is not a platform that I really enjoy working on at a professional level.

The Good

The good part about XAML development on WinRT is that if you come from Silverlight or WPF, you are already in touch with the technology, the framework around it and the whole development ecosystem. With no WinRT knowledge, I was able after a few hours of studying the templates that come with Visual Studio to jump directly into the problem and work my way in there.

Another good thing is that Visual Studio 2012 now comes together with Blend and this allows you to switch easily between the two and to handle both development and design-related tasks with ease.

I have to give a big plus to the fact that VS2012 comes with a set of pre-defined project templates that get you started quickly and also gives you a straight up contact with the new user experience that Windows 8 tries to push to the market.

The framework is designed in such a way that you can make your application fit with relative ease to all the differences between resolutions, sizes and orientation of the devices. Also it is very easy to access hardware functionality from the code.

Another plus is the decision of providing standard contracts for standard operations. Search, share, settings and other functionality is regulated using standard contracts so that all applications have a common look & feel that makes it natural for end users to jump into them.

I also like the fact that the applications make good use of the horizontal scrolling, which I think is a better use of the screen real estate.

Things like asynchronous API design, integrated licensing & windows store API as well as many others are really welcome features that show a more modern approach to modern application development.

There are more things to say here, but overall I thin the good things are the ones you don’t notice so much, but instead they just blend in into your day-to-day work.

The Bad

On the bad side, I have a lot of things to comment. First of which is the fact that I was really disappointed with the maturity of the framework. My initial impression was that this is a beta or a preview of the framework.

Silverlight has matured at an incredible pace and has become a mature full-featured environment. I cannot say the same for WinRT XAML.

First of all, the list of available controls is really a joke. There are standard controls which are available in the main SL/WPF toolset and you can’t find them in WinRT XAML library. I am not talking about fancy things, but basic ones such as a Date/Time picker control (or calendar for that matter), auto complete boxes.

A design decision which really makes me unhappy (and not just me) is the removal of the grid concept from the UI. While this might make sense for twitter clients or other social or multimedia oriented applications, business apps make heavy use of this usage pattern. This is because in real life there are a lot of things that need to be displayed in tables. In my case I had to work on an invoicing application. Try to design an invoice, which is by nature a list of tabular data, without using tables. I really feel that Microsoft should come back to this decision and add support for such data, otherwise they have lost by default a lot of their customer and developer base.

Another remarkably frustrating design decision is the lack of support for binding validation. While this was one of the great things about Silverlight and WPF, in WinRT XAML you have to handle validation and feedback completely manually (this is actually the reason why I wrote the previous article regarding WinRT validation).

There are a lot of small details which are missing and cause a lot of frustration. In the Silverlight world, developers have asked several years Microsoft to include an event which gets triggered when the DataContext changes. Finally they got it. Well guess what? There is no such event in WinRT XAML. While there are workarounds, this is very frustrating.

The context menu system is also implemented in a very non-developer-friendly way. The context menu is shown asynchronously, which is ok, but you don’t really have control over its positioning and size.

Finally, one of the biggest things that the framework is missing is database support. There is a library for working with SQLite, but it has the main drawback that it makes your application platform-dependent. There are also some other options such as a database engine that uses serialization for storage. This one has been a life-saver for me, although it suffers a lot of issues caused by async file system access.

In ending, the other thing that is annoying is the lack of consistency in the XAML API. While it is maybe a bit more clear than the Silverilght/WPF api, you will find a different format for specifying assembly and namespace references, as well as the format used for specifying resource paths.

Overall, I would say that the lack of controls is the most annoying one. Of course you can create your own. Of course that there are open source projects out there that provide various control libraries (I will cover a few of them in the next posts), but for someone that just wants to start doing something, this can be a big road block.

In the next post I will provide a list of links to various tools and libraries that hopefully will make your life easier when developing WinRT XAML apps.

Nov 262012

This is the second part post related to my experience with Windows 8 and will cover the hardware part.

First of all, I do not really own a Windows 8 tablet. I have Win8 on my development as well as on my home PC and I had the opportunity of playing around with a Samsung tablet running Windows 8.

The desktop

Until now, there was 100% support for Windows 8 on both my desktops. The performance is better than Windows 7  – startup time is minimal, overall performance is good. I didn’t have any issues with drivers so far so for this I am really happy.

The tablet

I only had the tablet for a few days, during which I could play around with it. The first impression is that it’s heavy. I would have expected it to be a bit lighter, since it’s a ultra portable device. On the other hand, it has a powerful i5 CPU,  which requires active cooling. Screen was 16:9, which feels a bit strange on a tablet since it’s very long but not so wide. Anyway, 16:9 is a standard today, so I cannot complain.

The overall experience of using Windows 8 on a tablet is far better than the one on the desktop. The swipe gestures feel completely natural and the interface is very very responsive. The only thing which I don’t like so much is that the keyboard takes up too much screen estate when open.

Some gestures are only supported on the tablet. For example, if you open up a photo using the Windows 8 WinRT photo viewer, on the tablet you can swipe left/right to navigate between photos. On the desktop you can’t do that.

The part that looked strange from the desktop point of view is the opening up of the top app bar vs closing an application. Actually the gestures are clear on the tablet. Slow swipe opens up the app bar, quick (throw away-like) swipe will close the app.

Overall I can say I like the feeling of the apps on the tablet. I am waiting for the prices to drop a bit to be able to exchange also my Galaxy S2 for a Windows 8 phone. I expect there to have the same natural and flowing interaction as on the tablets (maybe even more on the phone).

The ecosystem

One thing that I feel lacking is the support for other devices. Currently you can buy Windows 8 for Intel-class processors (Intel/AMD) but the support for ARM is only for hardware companies. This means that you won’t be able to install Windows 8 RT on an ARM device that doesn’t come with it out of the box.

The part where this feels necessary is hardware used for various non-entertainment appliances (think of info kiosks, embedded devices such as car navigation systems etc.). Of course Apple also lacks this, but on the other hand Android is very widespread. You can even buy a custom, USB-stick sized computer that is able to run Android. I would really like to see the same for Windows. Enabling developers to create such systems would increase the reach of the new OS to the public.

I am aware that there is Windows CE or Windows Embedded for small devices, but I also think there is a lot of potential for Windows 8 – based systems that run on cheap ARM hardware. Think of (already mentioned) info kiosks, electronic ticket counters etc. and also think about cheap hardware for universities, libraries and internet cafés, where the main activity is internet browsing, or using dedicated, simple apps.

Nov 092012

This is the first post from several in which I am going to detail some of my experiences with the new WinRT platform for Windows 8 (ex. Metro) applications. Disclaimer: this series of posts reflect my personal experiences and needs, so it might be different for other developers or users out there.

The UI

First of all the operating system. I am sure that everyone has seen (or at least heard) about the new OS from Microsoft and what it can do. First of all, as you know there are two flavors of user experience – the old “Desktop”-like experience and the new tablet/touch-friendly WinRT experience.

Starting with the first day of using Windows 8, I can honestly say that I have mixed feelings about the UI. While I like the concept behind the WinRT style (and had the opportunity of playing with it on a tablet), for a professional user like me, the constant switching from desktop to WinRT mode and back is sometimes annoying. I find it especially annoying that I have to click more than in the past to achieve the same results.

Nevertheless, I like the integrated approach that the OS has taken – search from one single place, share from one single place etc. The downside of this, especially for non-touch systems is that a lot of the options are hidden and you need to dig around to find them. For me it’s not a problem, but for less experienced users it becomes frustrating very quickly.

Anyway, I won’t go into more details about this, since you can find an entire encyclopedia of reviews and opinions on the internet regarding this. In the end I guess everything comes down to experience, taste and automations that we as users have developed over time.

Compatibility and breaking changes

This is another big part of switching to a new OS. While for the typical home user which 99% of the time does some browsing, emailing, Facebook, games this might not be of such importance, for a professional developer that wants to use this OS, it’s a very important thing.

So far I could get most of my applications to run on Windows 8 without too much hassle. Low level utilities such as hard drive optimizers etc. can sometimes cause issues, but so far I could live without them. Applications that have issues can be fixed most of the time by explicitly setting the compatibility level.

On the development side, I have quickly encountered some issues. Some are minor, some are annoying and some are causing real problems.

The User Access Control system

This is the first thing you encounter and the most annoying one. In the past versions of Windows, this was the first thing I was disabling (after removing the obnoxious windows sounds). The reasons why I am disabling this are simple:

  • I am able to manage security and applications by myself
  • I need to work most of the time in applications which require elevated permissions (aka. Visual Studio). Having UAC on is always breaking my workflow.

In Windows 8 even if you set the UAC feedback to the lowest value, it does not get completely disabled. This means that you still need to explicitly run applications with elevated permissions. This has several side effects:

  • Trying to start non-elevated processes from within an elevated process does not work out of the box. A typical example is trying to open the web help from within an elevated Visual Studio. If you are an application developer and need to go around this scenario, I have posted already a solution for handling this in code: http://byteflux.me/opening-an-url-in-the-default-browser-on-windows-8/
  • If you start applications directly from the WinRT desktop, you need always to right click them and run them as Administrator… This would be ok, if this would be remembered somehow.
  • If you pin your application to the taskbar, then there are two behaviors. If you configure your shortcut to always run as administrator, it works fine when clicking it directly. When you try to open up something using the jump lists (for example a recent Visual Studio solution), then the application will run without elevated permissions. This is always very annoying because you can either do it without thinking and then bang your head against the wall until figuring why things don’t work, or, otherwise, you have to always do things in two steps – open up the application, load the project/file/whatever.

Task manager

This is one of the best improvements in the new Windows. The new task manager is much cleaner, easier to use and works better. Thumbs up for this.


Windows 8 feels more secure. I have encountered some security issues related to DCOM/COM+ but nothing that cannot be solved. In the end if security rules get tighter it can be a better thing, since you have to be more aware of the exposed attack surface. The security changes have caused minimal interference so far, so I don’t have too much to say about them.

Other things

Of course covering all the changes in the new OS would lead to an entire book, so I won’t do that. Overall I can say that most things are better. Windows Explorer has better and cleaner UI and most of the things that come out of the box work at least as good as in Windows 7.

Stability is very good – I did not have any bad experiences with it. Startup performance is amazingly quick. One thing that is annoying is how hidden the power options are. I understand that it gets targeted more and more towards mobile devices where you put the system to sleep and start it quickly but for desktop systems, it’s too hidden.


Overall I think it’s a good direction, I would just liked more attention to desktop/professional users. At the moment the feeling is that you always have to switch between worlds.

In the next posts I will dive deeper into development tasks related to the new platform, the problems and solutions I have encountered so far.

Oct 162012

UPDATE: due to many requests, I have compiled the code below into a project that you can download from here: Validation.zip

To my big surprise the Microsoft team behind the WinRT XAML framework has decided not to include the built-in support for validation that exists in the WPF and Silverlight frameworks. Anyway, for anyone that needs an alternative, I have created a set of helper classes to make things easier.

Shout it

Continue reading »

Sep 222012

With the changes to the UAC system in Windows 8, it seems that whenever you try to launch an non-elevated application from an elevated application, you get an error similar to: “Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)”.

The reason is that under Windows 8, even if you set UAC to the lowest setting, you don’t disable it completely.

In my case, I was trying to start an URL using the default browser from an elevated application. After a lot of digging around on stackoverflow.com and other blogs and websites, I’ve managed to build a solution that seems to be working.

Continue reading »