Wednesday, May 12, 2004

I've been following a heated discussions on XML parsing methods that exist in .NET right now: DOM and XmlReader, whereas the first one is the slowest and the second is fast but a more complicated to code against. A must read on this topic is the DonXML's post Waking Up From a DOM Induced Coma who underlines the existing problems with XML parsing and mentions a few other alternatives. All of the problems about XML parsing are relevant to .NetCF as well, therefore they are multiplied due to processing power and memory constraints of the WinCE devices. Don't forget a complete lack of XPath implementation in the current version of CF.

As lucky as we are, Dare Obasanjo and Co., a PM from Microsoft, have just posted another library: XPathReader. And as you can guess, I've immediately pulled the code from the article and tried to compile it against .NetCF... The result of the test was that it runs with a few minor changes to the original code!!! And it is more exiting since we get a some XPath functionlity as well. Here you can see a snapshot of the test program running in the PPC emulator:

Don't you love when something useful comes with the source?

You can download the test and a XPathReaderCF projects from here.

The next step will be to test a comparison performance of this library vs XmlDocument in CF.

5/12/2004 5:30:34 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Tuesday, May 11, 2004

One of the FAQ on the CF newsgroup has been a question on how to send email from WinCE device with attachments or without it. We know that on Pocket PC's emailing functionality is a part of POOM API's as well as exposed in some form of MAPI implementation. All of these options are not easy to implement from .NetCF.  Plus POOM is not available on non PPC devices... But how about just using a SMTP protocol over TCP/IP connection? A quick search on the internet returned quite a few .NET implementations. Due to its simplicity I decided to go with Peter Bromberg's excellent article as a starting point. The code in the article references missing from .NetCF MailMessage and MailAttachment classes which shouldn't be a big problem to implement... Here is the screenshot of the testing program:

A quick test showed that I can successfully send attachments as well.

Download the code here.

5/11/2004 3:22:31 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Monday, May 10, 2004

A question has recently popped up on the CF newsgroups on how to sort ListView columns and show an arrow that would point up or down accordingly to the sorting order. My suggestion to the person who asked this question was to create the owner-drawn header instead of existing one and use the sorting code from QuickStart tutorials. And so... a two train rides (home and back to work) later I had created a HeaderControl that's doing exactly that: sorts the ListView columns and shows the arrow. And since it's an owner-drawn, we can change the Fore/Back color to anything we like:

 

How do we use it? Very easy - create an instance of the HeaderControl and call its Attach method:

// Create instance of the new header

header = new HeaderControl();

// Attach it to the listview

header.Attach(listView1);

// Add control to the form’s controls collection

this.Controls.Add(header);

Download the source code here.

5/10/2004 1:57:08 PM (GMT Daylight Time, UTC+01:00)  #     | 

It's really good to be back after uncontrollable blackout we had with the DNS mishap (“thanks” to our registrar).  Anyway, we are back on line and have a wonderful news for anybody who needs to get their WinCE/Compact Framework projects done. As you have already probably seen, Chris and Neil had mentioned about creation of OpenNETCF Consulting, LLC. So hurry up, since we have a “dream team” of the most knowledgeable professionals in the field here.

5/10/2004 1:34:30 AM (GMT Daylight Time, UTC+01:00)  #     | 
 Friday, April 30, 2004

The Google's IPO is taking a lot of headlines these days. The document they filed to the Sec is remarkable indeed and as it stated in this article Google “...come close to giving Wall Street the middle finger...”. Just take a look at the IPO offerring amount - $2,718,281,828, which one could recognize a natural E or Euler's number. 

4/30/2004 8:00:40 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Wednesday, April 28, 2004

There're a few really cool things have recently poped-up on the blogs I read:

1. Awesome tip from PaulaT on how to send SMS yourself in the emulator. Hey guys how many more you have hidden in your sleeves? Bring it on!

2. Brad mentions this interesting article on the API usablilty testing. May be we should do something like that at OpenNETCF.org. Anybody wants to donate a usability lab?

3. Hey, how about a BadCodingPracticeException from OpenNETCF? 

4/28/2004 2:15:24 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Tuesday, April 20, 2004

As Neil and Peter had already mentioned, we are working on v1.1 of the SDF. One of the new controls that will be available in the new release is the SmartList. It is an owner-drawn list control that provides a much required functionality for creating applications for Smartphone platform. SmartList is derived from OwnerDrawnList and aside from all functionality that is already provided by ListBoxEx, implements a quick filtering functionality similar to the built-in Contacts application, auto numbering for creating a menus that you see on the start menu and overall drawing speed improvement.

4/20/2004 3:26:39 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Thursday, April 08, 2004

Alright, I am back from the MVP Summit and oh boy, it was FUN! Meeting the whole OpenNETCF.org gig and CF MVP's (some of them I've met in person for the first time - Peter, Casey, Dan Fergus, Tim Wilson etc...) was a real blast for me and probably the most valuable experience during this Summit.

4/8/2004 3:32:02 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Thursday, April 01, 2004

Due to lack of feedback and constant complaints from the developers we at OpenNETCF.org decided to close all source code we created and make it commercial offering with the price of $5000.00.

The source code will be removed from the web site at 6:00 PM EST.

4/1/2004 8:55:58 PM (GMT Daylight Time, UTC+01:00)  #     |