Thursday, August 05, 2004

Back in business

After some days with no posting, I'm back in business.

The PDA project is almost (90%) finished, it's already working on the
client and there are only some finishing touches pending. It's been
hard. My schedule report this month is going to be funny, to
say the very least: last Monday I worked for thirteen and a half
, and on Tuesday the whole enchilada, 24 hours.
In real time too, no ellipses; just like
in the TV.

Of course, and as a compensation, I didn't work yesterday:
after all I believe I wouldn't be of much use snoring loudly over my
keyboard, or walking aimlessly like a zombie.

Anyway, I can now face this project with a much more easy pace: the client
has already some soft (and hard, we also provide them with the
combat PDAs); and
they can begin testing and working with that. By the way, I've ended
up feeling a certain love for the damned things. They're rugged, they
have a big screen and their external keys can be very useful. But
above all that, I feel really grateful for their OS: Windows CE
.NET, which means they have the Compact Framework already incorporated
on the OS, which means installations XCopy are allowed: you
simply copy the executable file (along any non-CF DLL needed) on a
destination folder on the PDA file system and done.

I do keep a thorn on my side, though: the login feature. After
two whole frustrating weeks dedicated to it, without visible results;
in the end the client comes telling us it's a not-so-vital
feature because, after all, every user is going to have his very own
personal PDA, which means everone of them could store its personal
information on the registry, along with login information and
everything else. If I'd known this, I could have had more time for the
rest of the features and it would have been a much more complete
application. Apart from the failed login code, the more remarkable
features of the applications are the P/Invoke routines for changing
the screen orientation of the PDA, the code for loading application
parameters from a XML file, and the buttons loaded: I had to create
a custom button for this, because CF's current version don't allows
color, font or any change to a button control in run-time. href="">Mr. Paul Yao has told me that CF's
next version will bring many upgraded features, among them a total
control face-lift and an upgrading of the P/Invoke procedures.

And it was really necessary, this last one. P/Invoke, or Platform
, is the name given to the techniques used for handling
not managed code; or in other words calling the APIs. The same
thing we've been doing a lot in Visual Basic 6, but more complicated.

Generally, when you code a Windows desktop application (now called a
WinForms application), you'll only use APIs for really strange and
esoteric functions. In the other hand, with Compact Framework
applications we'll soon discover that API invoking is needed to make
almost everything. For example, if we need that our application to run
others or processes: API. If we want our application to execute
always-on-top, that is always the first one in the z-order and
not to be overlapped by any other application: API. If we want to
destroy or end another application: API. And a long and painful list
of much more examples.

It has some logic, if you stop to think about it. There are a lot of
features from the normal Framework that are not included on the
Compact Framework for a very simple reason: space. You cannot install
the full-blown Framework on the tiny memory space a normal PDA has.
Thus, programming features that are really easy to code with the
Framework turns out to be a very complicated task with the Compact
Framework, just because those Framework functions are not included.

So it seems logical to think that .NET CF programmers are going to make a
lot of API calling.

So it seems logical to think that .NET CF programmers will be using
P/Invoke much more that normal .NET programmers.

So it seems logical to port the whole P/Invoke classes from .NET
Framework to the CF, or even upgrading them for the CF. After all,
they're much more needed.

No way.

They are also diminished: they lack methods, structures and type
conversions. And I frankly can't understand it: I don't believe they
were going to eat up that much space that its presence would
make the final Compact Framework would be intolerable for PDAs. Its
another of those difficult to understand design decisions from
Microsoft. But anyway, I've been told by Paul Yao (and he's in the
backstage of all this) that P/Invoking capabilities are going
to be complete (or, at least, much more improved) on the next version
of Visual Studio .NET, 2005.

We'll see what the boys and girls at Microsoft understand for much


Post a Comment

<< Home