I feel that the one thing that has been lacking here at Build is information about the fact that “old” windows application technologies are still there in Windows 8, and are just as much first class citizens as the new Metro style apps. They even have a lot on offer that the new apps don’t.
Microsoft promises that any application that runs on Windows 7 will also run on Windows 8. They are also saying, repeatedly but not loud enough, that the “old” technologies are still a very viable option for developing apps. You should not necessarily default to building a Metro style app when creating a new application. To be honest, in my world at least, I am very likely to lean towards another technology when starting a new project.
I love the idea behind the Metro style apps, but they do have a certain place. As they are quite heavily sandboxed, they are also quite limited. There is nothing wrong with the sandboxing idea as such as it generally makes the end-user experience better, or at least more uniform. But having that said, a sandbox is still a limitation in a lot of situations.
So the reason behind this post was to highlight what kind of application to use when. At least according to me. There are obviously cases when a guide like this doesn’t work, but it is still a foundation to start out the discussion from. So here it is….
Winforms
Winforms are still around and kicking. They work very well, and have full access to the full .NET framework without any limitations. The only downside is that they look like crap, and are very hard to make visually appealing. So all in all, I would probably skip this if I was starting a new project unless I had specific reasons not to.
WPF
Windows Presentation Framework is kind of Winforms evolved. It is the next generation of Windows applications. It uses the full .NET framework just like Winforms, but instead of the crappy UI experience in Winforms, it uses the flexibility of XAML. It also has good support for 3D, which is missing in Winforms for example.
Silverlight
Silverlight is pretty much a lighter version of WPF. And no, Silverlight is not dead. It has however been repurposed a bit, and is not the cross-platform, cross-browser browser plug-in it used to be. It is now much more of a intranet application platform. The more it evolves and matures, the more the sandbox is loosened and the feature set expanded. It does still however live in a sandbox, so it has some restrictions compared to its bigger cousin WPF. The main advantage though is the deployment scenario, which is really simple. It is deployed through the browser and can also be installed through the browser to become an out-of-browser application, which relaxes the sandbox a bit more. It also supports auto update.
Metro style apps
Metro style applications are a whole new breed of applications. They are built using XAML and C/C++/C#/VB.NET or HTML/CSS & JavaScript, and are packaged up for installation. They will only run in Windows 8, and will run in a sandbox with a bunch of restrictions. They are also the only kind of application that integrates with the new Windows 8 UI experience, and as such they are focused on making it “easy” to make the usage the applications feel natural and fit into the rest of the system. They will for example always run in fullscreen, be targeted for touch interaction etc. Deployment is either handled through a marketplace handled by Microsoft, or manually in for example an enterprise application scenario.
So those are the options available. Or at least the most common options available. Other than these, there are other technologies as well as mashups of above technologies that can be useful in some scenarios…
So, when do we select what? Well, as I said before, it completely depends on the scenario. If you are looking at building for a Win 8 tablet, then the Metro apps are definitely the way to go. If you however are looking at a Win 8 machine, but using mouse and keyboard, then a Metro app might not be the way to go. Or if the Metro sandbox is a little too cramped… In that case, you should be looking at WPF or Silverlight as Winforms is rarely the right way… And the choice between WPF or Silverlight pretty much comes down to if you can do your stuff inside the Silverlight sandbox. If you can, Silverlight offers a simpler install as well as autoupdate out of the box. If not, WPF is the winner.
At least that is they way I would look at the available options. The sad part is that they all have serious pros, but also cons. It would have been nice to be able to pick the best parts and get all the goodies in one place, which I had hoped that Metro apps would do. Unfortunately due to their focus, they come with some inherent limitations that makes them less usable in a LOB scenario. Having that said, I expect productivity with the WinRT to be very high… Hmm… It is really hard to choose, so take you time and really go through the options and limitations in the available technologies as well as in the solution you are about to build.
Cheers!