Comparing Windows Phone with .NET Compact Framework 3.5
In the comments of my previous post Windows Phone 7 Series Programming Model and elsewhere (e.g. twitter, WP7 forum) there seems to be a lot of confusion around how NETCF 3.5 compares against the new WP7 programming model powered by NETCF 3.7. People are asking why some API got removed from 3.5, or is 3.7 a subset of NETCF 3.5 as they are not seeing some familiar 3.5 APIs.
First I’d urge you to go visit the Windows Phone 7 Series Programming Model to see what it offers.
Essentially NETCF 3.5 can be broken down to
- NETCF 3.5 runtime (the Execution Engine)
- NETCF 3.5 BCL
- NETCF 3.5 UI programming model (WinForm based)
Now each of this has been updated (in order) as follows
- NETCF 3.7 runtime (hugely updated Execution Engine)
- NETCF 3.7 BCL (essentially offering the Silverlight 3 BCL Apis with a small delta)
- The UI model has been replaced and offers two options
- Silverlight 3 UI + Windows Phone device specific features (e.g. accelerometer , location service)
- XNA features with Windows Phone device specific features (e.g. accelerometer , location service)
So the runtime is hugely updated (and hopefully you’d feel the improvements, especially in performance).
For #2 and #3 the level of difference is same in magnitude as you compare WinForm with Silverlight on desktop. They are simply two different programming models.
In case you hit a 3.5 API that’s missing then it’s either because it’s (a) WinForm based API that got totally replaced, or (b) a BCL API that the Silverlight profile doesn’t support. The workaround is to search for how to do the same thing in Silverlight (e.g. use XDocument instead of XmlDocument). In some cases you’d get into situations where there is no direct alternative. E.g. there is no P/Invoke and if your code say P/Invoked to get data from a bar-code scanner you cannot do so now.
Also keep in mind that the bits available right now is just early preview bits and subject to a lot of change. The whole purpose of having CTPs is to hear our customers and ensure we use the remaining time before release in fixing issues that helps our customers the most. Hopefully some of the gaps will get closed before the final release.
Comments
Anonymous
March 17, 2010
"there is no P/Invoke and if your code say P/Invoked to get data from a bar-code scanner you cannot do so now" How long will it take until you have barcode enabled devices with WP7s? :) (just kidding, of course)Anonymous
March 17, 2010
Hey there, Thanks for this and your other interesting posts. What local data store is expected to be used on WP7? Not SQL Server CE seemingly? What is the roadmap in terms of OS on other mobile devices, i.e. PDAs without phone features? Thanks, -Pat RamadassAnonymous
March 17, 2010
Is there going to big a merging between the Compact Framework and Silverlight framework?Anonymous
March 17, 2010
Venketash there is no firm plan that I can share on both of the items. However, as you might guess folks in MS are aware of these two gaps and will try to address them. James, there is no merging. On Windows Phone 7 you code against the Silverlight (powered by the NETCF runtime) and on WM 6.5 you can code against .NETCF 3.5 or use native code (or mix them).Anonymous
March 17, 2010
Try leveraging the camera to scan barcodes? I'm not sure how good it will be, but if you have control over the printing of the codes, you can move to a more camera friendly format like QR Codes. Otherwise you're stuck with WM6.5Anonymous
March 18, 2010
Rod that was just an example. There are already camera/image based bar code implementations.Anonymous
March 21, 2010
Hello, I have just discovered into the mscorlib DLL in the emulator BIN file a new namespace System.Reflection.Emit. Astounding !!! So my questions:
- how does this library will be used in the WP7 platform? Will it be a kind of DLR, for example?
- I can't manage to run a sample application using this namespace (to use the DynamicMethod class). Is this library locked? Thanks a lot in avance for your answer.
Anonymous
March 21, 2010
There is no plan to support DLR in the current release. Neither is any plans to release Emit in WP7.Anonymous
March 21, 2010
OK, but the mscorlib with version 3.7.10056.00 has a System.Reflection.Emit namespace, isn't it?Anonymous
April 16, 2010
Karya specializes in enterprise mobile applications with increased ROIAnonymous
August 02, 2010
So the big question... If I have to learn a new model, what's keeping me from going to driod?Anonymous
August 02, 2010
Jason the platform better should and will win. You and every other application developer will go to the platform that is easy to target and the one that has the most number of customers for the app. The learning is just the first 3 weeks. If suddently Blackberry gets as many customers as iPhone I am sure you'll learn and develop for them :)Anonymous
October 21, 2010
I wonder what will happen to development for Windows CE 6.0 and future releases. The need for COM-Interop for device specific functions cannot be broken. I think there must be NETCF 4.0 for these devices - I don not mean "toy devices" like WP7 - but industry devices like mobile computers with barcode scanners.Anonymous
October 22, 2010
Sven you are absolutely correct. What works for a consumer phone doesn't work for a idustrial robot. Once the CE story gets hashed out we would be able to share more information.Anonymous
December 07, 2010
PDA's != phones. Development for disconnected or infrequently connected devices, local data stores (not XML) are still needed. It sounds like Microsoft is abandoning the Windows Mobile installed base. We have a large (for us anyway) collection of Windows Mobile 2003/ SE devices that still see regular use. Many people have Windows Mobile 6.5 devices. If Microsoft isn't going to be supporting business devices long term, why bother with future Microsoft devices? Currently the latest development platform for .Net CF 3.5 is Visual Studio Pro+. It's getting harder and harder to get. If Microsoft is going to abandon .Net CF then the least they can do is continue to make the development environment available...