views:

278

answers:

4

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?

A: 

No sockets is one thing that comes to my mind. No local storage is another one.

Upd: I stand corrected: no database storage, only isolated storage present.

joekoyote
How do you store stuff then?
It was supposed that the phones are web-based, i.e. you store the data on the server. In the initial release, at least.
joekoyote
Wow, that is surprising, Thanks for sharing
Just to clarify this point a bit. There is local storage, in the form of Isolated Storage. There is no local database at the moment, which is what I think you meant.
keyboardP
Are you referring to Windows Phone 7? As I read, there was no storage initially. Did they add it at a later point? I stand corrected then.
joekoyote
@joekoyote Suggest you fix your answer, isolated storage definitely works for local storage. :)
Simon Steele
@joekoyote Yup, WP7 definitely has local storage (Isolated Storage for third party apps) :) - Not sure I've ever heard of a lack of support for local storage.
keyboardP
+20  A: 

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.

avidgator
Excellent answer.
Simon Steele
No sooner do I post this than a new Blog entry shows up on the Windows Phone Developer Blog. Among other nuggets:* The final Tools are scheudled to ship September 16* There will be some "minor breaking changes" and include "several highly requested Silverlight controls."* read more at http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/08/23/a-developer-s-roadmap-to-windows-phone-7-launch-timing.aspx
avidgator
@No 6 - I ran into this issue and there are workarounds...http://stackoverflow.com/questions/3258306/how-to-test-the-accelerometer-for-windows-phone-7
Jace Rhea
/plug warning - for No 6, I've written about a way of simulating GPS coordinates with Bing Maps. http://phone7.wordpress.com/2010/08/02/no-device-no-gps-no-matter-with-code/
keyboardP
Great Answer, Thanks!
gyurisc
for point 10: It is 1.0 ? I thought it is 7.0 ?
afriza
+3  A: 

When running through the emulator be aware that the emulator will be running at the CPU speed of your development machine and NOT at the speed of a physical phone which could be much slower. You're going to have to test your code on a real device at some point to make sure it doesn't run too slowly.

Dr Herbie
Very good point.
keyboardP
A: 

My list (so far):

  1. Silverlight makes it easy to build beautiful apps. It also makes it easy to build really ugly apps. Spend time understanding applications that look & feel like the rest of the phone (ala "Metro").
  2. If you don't yet have a real device, find someone who does and test your app on it. Ask @wp7dev on Twitter to provide you with the name of a MS field person who has devices in your area. They are all running programs to enable developers to test apps.
  3. Read the WP7 performance whitepaper:
  4. If you want to use a ProgressBar read this article.
cek