Addev
Addev

Reputation: 32253

Windows Silverlight or RT. What are the implications for windows phone development

I'm starting a project for Windows Phone, I never developed for windows phone nor .Net before.

When I create a new project in Visual Studio Community 2013 it offers me to create it for Windows Runtime or Silverlight.

I would like to follow TDD with some kind of mocking framework, but I'm reading that WinRT have problems with that.

What importance does this decision have? What are the implications of each one? Is possible to have a mocking mechanism in WinRT?

Thanks

Upvotes: 0

Views: 84

Answers (2)

Jimmy Alexander
Jimmy Alexander

Reputation: 425

I agree with Spencer's answer in regards to WinRT is where the future of Windows development is heading.

Basically you should go Windows Store (WinRT based) unless the following concerns becomes a blocker or high concern for your app:

  1. There are some features that only Silverlight supports as noted in the "The few exceptions to the rule" section https://msdn.microsoft.com/en-us/library/windows/apps/hh452743.aspx. I would imagine that future WinRT SDK releases will address at least some of these missing features but until Microsoft announces it nothing is definitive.

  2. Regarding mocking, the toolset is more limited that without non WinRT but there are solutions. What is the mocking framework of choice in Unit Test Library for Windows Store Applications? explains the limitations.

    I personally am using http://www.nuget.org/packages/WP-Fx.EasyMoq/1.1.1 (Doc: http://wp7fx.codeplex.com/wikipage?title=WP-Fx.EasyMoq&referringTitle=Documentation) and it meets my team's needs.

    https://stackoverflow.com/a/12556114/3998132 explain another approach by refactoring your testable code to be non WinRT specific.

    Overall there are mocking solutions but the solutions are not as great and doesn't seem as active with development than the non WinRT world. I hope this will change in the near future.

Upvotes: 0

user4325545
user4325545

Reputation:

The short answer is stick with universal app and winrt. That is the future of windows development. You will get much better code reuse and the framework is designed from the groundup to be completely asynchronous. Silverlight is more of the legacy way of doing things and i suspect it will be used less and less over time. TDD is not a problem for either.

What importance does this decision have? At this time i don't think much of any but universal apps are the future and i really don't see them supporting silverlight indefinitely. One of the big benefits of WinRT is it is designed to be mostly async friendly. This is a big deal for mobile development and keeping the UI responsive.

What are the implications of each one? Silverlight is the legacy and is does not have as many async based components built in. WinRT is designed for async and is a framework build right on top of Win32.

Is possible to have a mocking mechanism in WinRT? Absolutely, however i'd focus on learning the general framework of development before adding on testing. As you become more comfortable in the language step back and see how to make things testable.

Hope that helps.

Upvotes: 2

Related Questions