Category Archives: windows

Microsoft to support PHP in Expression Web 2.0

The closing session of UK Mix07 was a “Sneak peeks” in which we were shown a variety of snippets of varying degrees of interest. One was a brief glimpse of Expression Web 2.0, Microsoft’s web design tool, showing “PHP script” on the File – New menu.

The extent of this support was not discussed. The minimum would be some level of syntax highlighting, which would be trivial to implement, so this may not amount to much. Still, it is interesting as a sign of the times. When I spoke to some folk from Zend a couple of months ago, they emphasised their IIS support and good relationship with Microsoft, so it looks as if both sides want to play nicely together.

Microsoft Silverlight vs Adobe Flex

I am at Mix07 in London. Having looked in some detail as Adobe Flex and AIR in recent weeks, it is interesting to compare and contrast. I am looking primarily at the developer aspect, rather than video or multimedia.

Silverlight is not a direct competitor to Adobe AIR, in that it does not run outside the browser (though I guess you could do something funky with an embedded browser control). It is a closer competitor to Flex, though there is no exact equivalent to Adobe LiveCycle, which is not needed for Silverlight. However, the two technologies do have a number of parallel features, including the following:

  • Cross-platform runtime – Windows, Mac and Linux (the last a recent Microsoft announcement)
  • XML language to define the GUI
  • Embedded video capability
  • Timeline for animations etc.
  • Strongly-typed, object-oriented language with just-in-time compilation
  • Easy access to XML web services
  • Dedicated design tools (Expression Blend for Silverlight, Flash IDE for Flex and AIR)
  • Dedicated developer tools (Visual Studio for Silverlight, FlexBuilder for Flex and AIR

So what are the differentiating factors? There are some obvious differences. For example, Flash 9.0, and therefore Flex, runs on Windows 98; Silverlight 1.1 will not. On the Silverlight side, there is the advantage of language choices: Silverlight allows Visual Basic, C#, Python or Ruby. Flex has only Actionscript 3.0.

The real difference

These technical differences are dwarfed by cultural factors. Microsoft’s advantage is the comfort factor of Silverlight for developers already familiar with Visual Studio and C#, and perhaps beginning to look at WPF. Microsoft does strong tools, and FlexBuilder does not currently come close. This will help establish Silverlight for enterprise development. With increasing numbers of Macs popping up incoveniently in Windows networks, Silverlight could soon find a role. Similarly, for ASP.NET developers who want to give users a richer client, Silverlight is a compelling option.

Adobe’s strength is that it already has a strong hold on the designer community. While the Expression products are being well received, they would have to be extraordinary to win substantial numbers of switchers from Flash, Dreamweaver, Photoshop and so on. Adobe also wins on deployment. Flash is well established, whereas Silverlight is new; it will be especially hard for Microsoft to place it on non-Windows mobile devices.

I don’t see either of these technologies failing. I suspect Microsoft is introducing Silverlight in time to stem a bleed of .NET developers to cross-platform development with Flex and perhaps AIR, but I would be surprised to see large numbers of defections from Adobe’s camp.

Interesting questions

A few questions to which I do not yet know the answer:

  • How does the performance of Microsoft’s IL + JIT compiler compare with Adobe’s Actionscript 3.0 + JIT compiler? On Windows and on other platforms?
  • Adobe’s AMF protocol is more efficient than XML for data delivered via web services. Is this a significant performance benefit?
  • MXML vs XAML. My impression is that WPF is more expressive, but I have not researched it sufficiently to back this up. I would be interested in comments.

As ever, your thoughts are welcome.

Windows Live: why doesn’t SkyDrive integrate with Office?

Dare Obasanjo blogs about Windows Live, and refers us to get.live.com where you can sign up for a number of free services.

I think Spaces is great, except that performance seems sluggish (though it’s getting better), and Live Writer is my blogging tool of choice. So there’s stuff here I like, but what is of most interest to me is Sky Drive. I’m a big fan of web storage, because it means you can work from several machines and everything stays up-to-date. It is also an effective off-site backup. Currently I use a subversion repository on my own site for this. I also use Amazon S3. Both are excellent, but saving and loading documents is not quite a seamless process. To see what I mean, consider the steps you would have to explain to a non-expert user. Then compare this to what most of us do every day: open a document, work on it, then hit save.

The puzzle is why Microsoft has not built this feature into Office. This is meant to be an advantage of the Microsoft platform: a single vendor stack in which everything plays nicely together (Apple does this better, of course).

One of the first things I did with SkyDrive was to copy an Excel file into it. That works fine, either through browser upload, or by drag-and-drop if you install the upload ActiveX control. Just for fun, I then went back to SkyDrive and “opened” the Excel document from it. What this really does is to download the file to a temporary location, and opens it from there. Everything seems fine until you hit save. Then you get:

Your changes could not be saved to ‘somesheet[1].xls’ because of a sharing violation. Try saving to a different file.

Click OK, and then I get a weird message about a file with a meaningless name having the wrong extension – because apparently Excel automatically saved to another temporary file without an extension. Bizarre behaviour.

Ok, I admit, I knew this would not work. But isn’t this how it ought to work? I think this would be a killer feature for Office and Windows Live: foolproof open and save from/to web storage.

I also think Office should cope better with what is, from the user’s perspective, a rather obvious sequence of steps.

Zoho has a plug-in that nearly works right, though it has two major flaws. One, it did not work properly for me at all, but just threw errors on saving. Two, it converts Office into Zoho’s online format. I understand why this is the correct thing for a Zoho plug-in to do, but I’d rather keep documents in their native format and forego true online editing.

Silverlight is released for Windows, promised for Linux

Microsoft’s Silverlight is now fully released. Scott Guthrie’s blog has all the details, including what to me is the biggest news: an official partnership with Novell and Mono to support Moonlight, an implementation of Silverlight for Linux. Microsoft will supply the media codecs, while Novell/Mono will do the rest.

This is a major step forward for Microsoft. I have been blogging for years about how Microsoft would benefit by giving official support to Mono, and therefore promoting the .NET platform. Of course it is a two-edged sword. Mono is a competitor, and helps companies switch from Windows to Linux. On the other hand, Silverlight has no chance of broad adoption unless it is taken seriously as a cross-platform runtime, and supporting Linux will help a great deal with that.

Silverlight 1.0 does video, multimedia and vector graphics, but does not include the .NET runtime. This is to follow in Silverlight 1.1, which will therefore be of more interest to developers.

I see quite a bit of misunderstanding of how Silverlight relates to the full version of .NET. As I understand it, even Silverlight 1.1 makes no use whatsoever of the full .NET runtime or WPF (Windows Presentation Foundation). It is entirely self-sufficient, so you can run Silverlight 1.0  or 1.1 on a Windows box which does not have .NET installed.

Technorati tags: , , ,

MFC not dead – “massive update” planned

Herb Sutter refers to a comment by Bill Dunlap, a product manager for Visual C++, on the future of MFC:

MFC – we are working on a huge update to MFC that should knock your socks off.  I can’t tell you too much right now, but this is closer than you might thing <g>.

Intriguing, since with ATL and then the whole .NET thing, including managed C++ and C++/CLI, I’d assumed that MFC was all-but deprecated.

I can see the value of this for maintaining existing projects, but for new ones? I like this comment by Dan Shappir:

The only reason I can see for doing significant UI development in C++ is for cross-platform support, and in that case I would probably choose Qt.

Actually I can think of a few other reasons, such as performance and compatibility with older versions of Windows, but then again why not use Delphi?

Talking of Delphi, it’s interesting that according to Shappir’s post referenced above, Microsoft’s Visual C++ team had similar feedback to Borland/Codegear:

Damien Watkins, a Program Manager on the Visual C++ team, stated quite frankly that the feedback they have received from C++ developers is that they prefer to use C# for developing managed code for .NET. So what is the new positioning for C++? Apparently it’s:

  • A strong emphasis on developing unmanaged, native applications
  • Tool for achieving interop between existing native code and new managed code

I guess this ties in with renewed investment in MFC.

Technorati tags: , , , , ,

Tip of the day: Robocopy is in Vista

What’s Robocopy? It’s a command-line utility that is part of the resource kit for earlier versions of Windows (so non-Vista users are not left out). It should be called “Sane copy”, because by and large it does the obvious thing, whereas most copy utilities do the non-obvious thing. For example, let’s say you have a directory full of files on your desktop PC, and you want to back them up to another drive. So far, nothing special. A few days later, you want to do the same thing again. Most copy utilities will start asking questions about whether you want to merge folders, overwrite files, and so on. Going through this file by file is impossibly tedious, so you’ll probably ask for the whole lot to be overwritten. Now your very smart computer churns away (if there is a lot to copy) replacing perfectly good existing files with new copies, for the sake of just a few files that have actually changed. What you really want is to copy only those files that have been changed or added.

Enter Robocopy. Open a command prompt and type:

robocopy c:\mysourcedir d:\mytargetdir /e

The /e switch asks for all subdirectories to be copied, even if they are empty. Robocopy will only copy the changed files, and gives you a report showing how many files were copied and how many were skipped.

There is one possible flaw in this arrangement. If you deleted a file from the source folder, then copy it over an existing backup, the target folder will still contain the old file. This might not be what you want, especially if you are a developer and this is source code. Old files hanging around are a bad idea. Robocopy has an answer for this too:

robocopy c:\mysourcedir d:\mytargetdir /mir

This switch asks for targetdir to be a mirror of sourcedir, which means files in the target which no longer exist in the source will be deleted. No fuss. Obviously this presumes that you want them deleted. Disclaimer: don’t blame me if this is not the case.

If you can’t hack the command line, there’s a Robocopy GUI you can download. Follow the link and download the UtilitySpotlight2006 exe at the top of the page. This is a geeky GUI but has some neat time-saving features.

For those with a lot of files to back up – like, say, a 300GB media library – Robocopy or an equivalent is a huge time-saver. It’s actually got a host of additional features that I haven’t mentioned here – why not type:

robocopy /?

and take a look.

Technorati tags: , , ,

The Samsung i600 and Windows Mobile

I’ve been looking for a new Smartphone for a while, and decided to try the Samsung i600, a Windows Mobile device with strong connectivity (GPRS,Bluetooth,UMTS,HSDPA,wi-fi) and a tiny QWERTY keyboard. It is not a touch screen, which to me is a good thing in a mobile phone. I’ve not tried the finger-driven iPhone yet, but I did use a Palm Treo for a while and found the stylus a nuisance. For me, email and web access are just as important as voice, and I’ve already found the keyboard useful. You can find the specs of the i600 elsewhere; but here are my observations so far.

Pros

I like the feel of the device. The central button and joystick is a pleasure to use, and the backlit keyboard is pretty good considering its size. The 320 x 240 screen is excellent (dust aside, see below), and browsing the web is a realistic proposition provided that you are not paying something ludicrous like £4.00 per MB (yes, that’s what some operators charge in the UK). I’ve not tried all the features yet, but I’ve had success with IMAP email, wi-fi, Bluetooth, and playing MP3 music.

The i600 has a neat “card wheel” UI on its home screen, which provides quick access to most of the features. Using the joystick or scroll wheel, you first find the card you want, and then scroll within the card to find what you want. For example, the Profile card lets you select a profile such as Normal, Silent, or Vibrate. The Now Playing card is particularly good, letting you pause, play and skip songs without leaving the home screen.

The camera is decent for a mobile, but still nowhere near good enough to replace a separate camera even for my limited use. You can also capture a jerky little video. There are actually two cameras, one on the back for taking pictures, and one on the front for video calls.

Others have found battery life a problem, but Samsung has solved it by bundling an extended battery and external charger in the box. Fitting the extended battery makes the phone a little thicker, but not excessively so. You also get a standard battery, which you can use as an emergency backup. I’ve found this more than sufficient. Apparently not all bundles include the extra battery, so it’s worth checking this point if you are considering the phone.

This is also a good device for developers, provided you are happy with Visual Studio. I was up and running quickly once I’d worked out the security issue (separate post coming soon). I did purchase an unlocked device, as I hate the whole contract circus. A Micro SD storage card is also essential.

Cons

Windows Mobile is still not as easy as it should be. I really think Microsoft should have ActiveSync sorted by now, but apparently not. When I first connected to my Vista desktop PC, Windows Installer started up, thrashed around for a bit, then declared it was quitting because a newer version was installed. After that, nothing. I connected the device with USB, there was no error, but the Mobile Device Center could not see the phone. I fixed this by downloading Mobile Device Center 6.1. That mostly works, but I still have strange problems syncing with Exchange. This works through wi-fi provided I set the connection to “work” rather than “internet”, but not through USB. Perhaps I’ll work out why, but this sort of thing is frustrating and difficult, and online help is a masterpiece of polite unhelpfulness. Try a search for “cannot connect with current connection” (with the quotes) if you really want to know more.

More generally, I find navigation with Windows Mobile unpredictable at times. Example: I click Start, then Organizer, then Calendar. This fires up the Calendar, which defaults to the monthly view. I select a day, and click OK to view an appointment. Then I click the Back button. I should be back at the monthly view, but I’m not: I’ve exited Calendar and I’m back on the Organizer group in the Start menu.

I find the email client similarly confusing. No matter how hard I try, I seem to end up switching out of the app completely when I don’t mean to.

A crazy omission in Windows Mobile for Smartphone is cut, copy and paste. I couldn’t believe this at first, on a device with a keyboard, but it is true. I believe there are third-party solutions. I’ve also installed the trial of Documents To Go, which does support the clipboard, though this won’t fix Mobile Outlook.

No Flash support in Pocket IE.

I have a few complaints about the i600 itself. No socket for a standard headphone jack, so you have to use the supplied ear buds. Dangly plastic covers for the data cable and Micro SD ports, which are bound to break off in time. No support for Micro SDHC, which means a 2GB limit on the storage card. I’ve also applied the official Windows Mobile 6.0 upgrade (pretending to be from the Netherlands) and was disappointed to find no Mobile Office – having said which, Documents To Go is probably better in any case.

Most seriously, I can already see dust behind the screen. It’s not yet a big problem, but how much worse will it get in prolonged use? There appears to be no fix other than returning the unit for service or replacement. 

Overall

Despite the cons, this is easily the best mobile I’ve used.

Technorati tags: , , , ,

Microsoft’s Vista update – SP1 by another name?

I’ve installed Microsoft’s two new Vista patches – one for reliability, and the other for performance. No ill-effects so far and in fact the OS does feel a bit snappier. The updates claim to fix some long-standing gripes, including this one:

  • When you copy or move a large file, the “estimated time remaining” takes a long time to be calculated and displayed.

It also fixes some nasty-sounding bugs that I haven’t encountered, like this one:

  • When you synchronize an offline file to a server, the offline file is corrupted.

and includes some vague but important-sounding issues like this:

  • Poor memory management performance occurs.

Another key fix is related to one that has received a lot of attention on this blog (over 160 comments):

  • The computer stops responding, and you receive a “Display driver stopped responding and has recovered” error message. You can restart the computer only by pressing the computer’s power button.

I fixed this with a driver update, but possibly the driver update was a workaround for a bug in Vista. That seems plausible since it occurs with drivers from different vendors – though note that I did not usually experience a complete hang when I encountered this problem. Here’s another goodie:

  • The computer stops responding or restarts unexpectedly when you play video games or perform desktop operations.

There are many more fixes listed, and overall, this looks like a must-have update; and indeed, it will be rolled out automatically through Windows update in due course, according to Mary Jo Foley.

Clearly this is not SP1, though it is larger than other Vista updates I’ve seen. Why the delay before the real SP1? The rumour is that this is because of changes being made in response to Google’s complaints about search integration. No doubt making these changes requires considerable work, but I can’t help thinking that it does no harm to Microsoft to delay the Google-friendly SP1, while wasting no time in rolling out the other updates that would have been in SP1. 

Technorati tags: , , ,

Fixing an over-sleepy Toshiba Portege M400 running Vista

Long-term readers may recall my experiments with Vista on a Toshiba Portege M400 Tablet. Since then I’ve kept the drivers up to date as new versions appeared. The machine is stickered “Windows Vista Capable.”

It’s been OK though the annoying problem with the machine not waking from sleep persisted. Although this may sound a minor issue, it is really not good, as you can lose data. By default the laptop sleeps after a fairly short interval of non-use. I set it to hibernate instead, which works, but waking from hibernation is slower. The symptom of the sleep problem is that when you try to resume, the machine seems to start up but the screen stays blank. It’s a known issue on several Toshiba machines, and sometimes fixable by twisting the display, or toggling the display on and off, but I found that often did not work. On one occasion when trying to resume from sleep, the screen stayed dark but the CPU fan went into overdrive, making such a racket that heads turned at the conference where I was taking notes. Embarrassing.

Of course I wanted to fix the problem. Updating BIOS and drivers didn’t seem to make any difference, but I found this tech note on Toshiba’s US site, which refers to “Blank screen after waking from standby state” and says:

A firmware upgrade for a component on the computer’s main circuit board corrects this problem. This upgrade must be performed by a Toshiba Authorized Service Provider (ASP).

I called support but the UK folk denied all knowledge of the fix, and when I referred to the tech note, said that it probably would not apply to a UK machine (though I’m doubtful that there is much difference). To be fair, my local Toshiba service centre did offer to look at it, but I was busy and didn’t want to hand over the machine immediately.

Two other things happened which forced my hand. First, the FireWire port became unreliable. Second, someone knocked the machine off a coffee table, and when it fell on the carpet part of the base snapped off, leaving a jagged edge. Ouch.

I sent the machine away for a new base, adding that I would also like the FireWire and resume problems fixed under warranty. I paid for the base, of course, but Toshiba honoured the warranty on the FireWire problem, which fortunately I’d reported before the accidental damage.

No word about the resume issue, but the engineer decided that fixing the FireWire port required a new motherboard. Got the machine back, and guess what? No resume problem. So far, it wakes from sleep perfectly. I know this is nothing to do with drivers, because I removed the drive with Vista on it before sending the machine away, and refitted it on return with no changes.

I didn’t enjoy the damage to my expensive laptop, but it’s good to have it working properly with Vista.

Technorati tags: , ,

Family.Show – an excellent WPF demo app

Microsoft’s Tim Sneath drew my attention to Family.Show, which he describes as “our first end-to-end reference sample for WPF”. This genealogy application was made public three months ago, but I had not tried it before. Source code is available, and there is a white paper [XPS] about how it was developed.

The application feels a little unfinished, but nevertheless it is excellent. I started the application and without reading any documentation started entering my family details. I enjoyed the results and carried on longer than I had intended. It scales beautifully, both when you resize the main window, and when you use the zoom control. Another neat feature is the time slider, which lets you change the current year. As you go back in time, everyone’s age goes down and people not yet born fade into the background.

WFP applications are unlike what we know as Windows applications. This is partly because they don’t use standard Windows controls, and partly because WPF encourages a different approach. It is more like a Flash application, and requires design skills to build.

The paper is also a good read. Family.Show apparently uses XML Serialization to persist its genealogy files. I’m not sure this is wise, though I’m open to being convinced. I’d be inclined to use an old-fashioned relational database, which I suspect would perform better with large files. Another problem with XML Serialization is that it can be brittle when you want to revise the objects.

I am always interested in performance, and a tip from the paper is worth highlighting. This is the huge benefit of virtualizing the ListView control, which means it doesn’t bother instantiating elements that are not visible. The team found sorting 32 times faster, filtering 70 times faster, and memory use 75% less when using a virtual list.