Monday, June 14, 2010

Windows Phone 7 - The Haves and the Have-Nots

While Windows Phone 7 (WP7) sounds intriguing as a platform for iPhone-type applications, TechEd 2010 was very illuminating on the many things that this new platform does not include and why you will unlikely be able to migrate your existing Windows Mobile applications forward. Let me go through the laundry list of the have-nots:

  • No native code support. Silverlight 3.0 and XNA are the only ways to develop applications for WP7. If you are not developing games, then Silverlight is probably the path you will be forced to take.
  • No Database support. SQL Server Compact is not part of WP7. Nor will SQLite or any other 3rd party database engine run either. One TechEd session had the gall to suggest that we should all use collections of objects and Linq as a replacement for SQL Server Compact. Access to data is only available through Web Services and what the application can store in Silverlight’s Isolated Storage. No one would confirm or deny that database support would ever be added to WP7.
  • No Side Loading Applications. Except for development mode, applications can only be loaded to WP7 devices through the Microsoft Marketplace. It doesn’t matter if the app if for internal use in your organization or not. Also, it is not free to use the Microsoft Marketplace.
  • Application approval is required. Microsoft claims that it will not be a blackbox like Apple where you stick an app in and hope it comes out; however, they also said they there is a list of applications types that will not be allowed. VOIP was they only example provided.

  • No access to data on SD cards. Since Silverlight applications can only use isolated storage, there is no way for an application to access information on an SD card. While some devices may support an SD card, the additional memory will apparently be made available for isolated storage, but you can’t preload the content.
  • No File System support. Again only Isolated Storage is available to a Silverlight app.

  • No RAPI support. There will no interacting with a WP7 device via the desktop. Obviously there will be some synchronization with Outlook, but nothing the developer will have control of.

  • Applications must be Silverlight 3. Silverlight 4 will not be available for WP7.

  • Out of Browser Silverlight support only. Silverlight is not going to be supported in browser on the phone.

  • Default Browser must be Internet Explorer. While Microsoft claimed that other browsers will be allowed on the phone, they can’t be the default. This is probably okay as long as the new Internet Explorer is better than the Windows Mobile version; however, is it possible to write a viable browser in Silverlight or XNA?

  • No Bluetooth API. While there is going to be Bluetooth support on the phone, there is no Bluetooth API.

  • No inter-process communications (IPC) and no Socket support.

  • No Video Capture Support. Phones will have a camera but not video capture support, and also no video brush.

  • No Outside TrueType Fonts - Microsoft experts claimed that you will not be able to use TrueType fonts other than the ones delivered with the device. This limitation makes since, how would you get them on the device. While there is supposed to be support for embedding TrueType fonts in your xap file in Silverlight 4, this will not be the version used on the device.
  • The TechEd demos of WP7 applications had a common theme; they crashed, hung up, or gave peculiar error messages. For a platform that is going to be delivered in the October timeframe (3 months away), it is hard to have much short-term faith in the new platform.

On the positive side, the list is not quite as long:
  • The Silverlight apps running on the phones looked good even if they were only Silverlight 3.
  • Lots of different soft input panels (SIPs) provided like numeric, URL, email, etc.
  • Built-in support and APIs for multi-touch, accelerometers, vibrator, microphone, and camera.

  • Phones are not going to be feature locked like Windows Mobiles. They should be upgradable like the iPhone.
  • Applications on the phones do not have the strange isolated storage limits that desktop Silverlight applications have.

Microsoft continually offered up that they were so rushed to get this phone to market that they had to leave a lot of things out. Since the phones are not feature locked (so they claim), maybe there will be a quick release cycle of new versions to fill in the missing components. If you are not planning on developing iPhone type applications (casual games or casual apps usually requiring a connection to a backend), you may be stuck waiting for a new release will new features (or jumping ship to Android or the iPhone). The WP7 platform as it is depicted today will not be able to support the sophisticated applications that are currently running on Windows Mobile, so it cannot be thought of as a successor to the Window Mobile platform. There are many new and great things you can do on WP7, but this constitutes a different kind of platform (one to compete with the iPhone). Will it grow to be a successor to Windows Mobile? How long will this take? What if it flops against the iPhone and never takes hold? Too many questions around the platform to invest a significant amount of development into it if you are not focused on creating iPhone type apps.

***** Since I posted this blog entry, I went to another TechEd and wrote another more updated post.

Wednesday, June 2, 2010

Preventing Tabs from being Selected

I tried several solutions I found on the internet to prevent tabs from being selected with a TabControl, but the link below shows the only solution that worked well. My task was very simple, I didn't want the user to select other tabs until the first tab contained valid information. The trick was to use the Deselecting event on the TabControl. In the event, see which tab you are on (SelectedIndex) and perform your validation specific to the tab. If the validation fails, set the event's e.Cancel to True and the tab won't change.

Tuesday, June 1, 2010

XPath Query Syntax

The following link give a good review of the XPath Query syntax: