Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the top 10 gotchas of Silverlight on Windows Phone 7?

I have been using Silverlight for quite a bit and am learning Windows Phone 7.

Of course, this is very similar.

However, what are the top issues to watch out for?

like image 556
user380719 Avatar asked Aug 23 '10 13:08

user380719


2 Answers

1) It is Beta/Pre-Release. Contents are likely to shift while in-transit. Be aware that the API, etc that you are developing against may go through some changes between now and release date. There will be more coming down the road; be realistic and patient with your expectations.

2) For Silverlight development, it is Silverlight 3++ and not Silverlight 4. Learn and know the boundaries and behaviors of Silverlight in general, then also focus on the differneces between SL3 and SL4.

3) Navigation is similar but different to "regular Silverlight's" - the idea that you "sometimes" may want to navigate in regular Silverlight has been consolidated and assumed that you do want to navigate between pages in the Phone. (See here)

4) As much as the Panorama and Pivot controls/experiences are part of the design recommendations, these controls are not yet available as part of the development tools (there are online how-to's, etc for making your own.) (More here...)

5) When you interact with an external service, your applicaiton is relinquishing control to a different app. There is no API for "get a list of contacts"... you launch the Contact Chooser, then when the contact is chosen, your application gets re-awakened and the value is returned. (More)

6) The emulator is limited (lacking?)...don't expect to be able to interact with any of the hardware services (GPS, accelerometer, etc.) from the emulator. If you want to do that, at least for now you'll need a real device.

7) The emulator is lacking...the software services are not available (yet) through the emulator. If your app needs to interact with some of the hubs or other software facilities, (for example to select a contact) they're not available (at least not without an "unlocked" emulator.)

8) Learn about tombstoning. Your app may be taken down halfway through its run (if the user hits the Start button, etc.) and while you do have the opportunity to save and restore state, you are responsible to save and restore state. (More)

9) Understand Push notifications. (More here)

10) It is 1.0. There will be more coming down the road; be realistic and patient with your expectations.

like image 158
John Garland Avatar answered Oct 20 '22 14:10

John Garland


I don't know about 10 gotchas but here are a few that got me:

1) Performance. This has biggest one for me so far. It depends on the app but it can really be hard to get right on some apps (especially data heavy applications). Things get worse where pivots and panorama's are involved. Data binding and XAML based templating all have a performance cost which is magnified on a small device. The biggest problem I see in this regard is people bringing "skills" over from the desktop. People new to mobile development often make the mistake of applying enterprise design patterns and frameworks to device programming. Be very weary of bloated frameworks and lofty design patterns, such things are designed to solve the problem of complexity in large applications and aren't necessarily helpful on small projects like these. You don't need a whole framework to do MVVM.

2) Device incompatibility. With only a few WP7 devices out there currently this isn't too big of a problem yet, but there is one place I have had problems - Samsung SuperAMOLED screens. These screens really show up the limitations of a 16-bit color depth display, much more than a standard screen. It can lead to really horrible looking color banding if you are not careful with your colors and gradients. I've blogged about it here (with an example).

3) Tombstoning. Depending on your app this can either be a breeze or a real hassle. Don't make the mistake of leaving it till the end of your development to test. Try and think about it upfront.

4) The Marketplace. Register early. Unfortunately, IMHO the Windows Marketplace is the weakest part of Microsoft's app story for developers currently. More than half of the developers I have been involved with have had problems getting registered (including myself). It is very convoluted and seems to go wrong very easily - especially if you live outside of the US. Start the registration process off as early as possible because you won't be able to unlock your device until the very end of the process - even though Microsoft take your money right at the beginning.

like image 5
1adam12 Avatar answered Oct 20 '22 15:10

1adam12