Category Archives: microsoft

Doubling performance with Silverlight multithreading

Bart Czernicki has a detailed post showing how Silverlight 2.0’s multithreading can improve performance. He took my counting primes code and  adapted it for parallel processing. On my quad core system the results are impressive:

As you can see by squinting at the screen grab, the processing time went from 0.43 to 0.20 seconds.

Multithreading is getting a bad rap in some quarters, because it greatly complicated debugging. On the other hand, if you have an app which does some heavy duty calculations then performance benefits like this are worth a little pain.

Technorati tags: , ,

H.264, AAC comes to Silverlight. Game over for VC-1?

Microsoft has announced that Silverlight will support the H.264 video standard “in a future version”, along with AAC for audio. H.264 is also used by Adobe Flash and has wide adoption across the industry; it’s likely that your HD video camera records to H.264, for example.

Good news for Silverlight, though it may be a while before we see this rolled out, but surely bad news for VC-1, Microsoft’s preferred video format and part of the Windows Media family. Why would anyone not standardize on H.264 now?

Defining cloud computing

I liked this post by Larry Dignan on the cloud computing buzzword and how meaningless it has become.

Writing on the subject recently, I was struck by the gulf between what some people mean – online apps like Google Apps and Gmail – and what others mean, on-demand utility computing such as that delivered by Amazon Elastic Compute Cloud or Flexiscale. These things have little in common.

Dignan has even more examples.

Should we abandon the term? Maybe, but I find it useful if only as shorthand for describing how the centre of gravity is shifting to the Internet.

Some services are more cloudy than others. Dignan refers to this Forrester report (though you’ll have to look at the blog post for the extracts, unless you want to buy it) which has a table of “six key characteristics.” I don’t agree with all of them; the business model, for example, is not an inherent part of cloud computing. I am interested in number two:

Accessible via Internet protocols from any computer

Any computer? OK, probably not the Atari ST which I have in the loft. Any computer with a web browser? What about requiring a “modern” web browser, is that OK? Java? Flash? Silverlight? A specific version of Java or Flash? What about when we need a runtime like Adobe AIR or Microsoft Live Mesh? What if it doesn’t run on Linux? Or on an Apple iPhone? What about when there is an offline component such as Google Gears? All these things narrow what is meant by “any computer”.

This is the old “rich versus reach” debate; it is still being played out. My point: cloud computing isn’t a boolean characteristic, but a continuum from very cloudy (NTP) to not cloudy at all (Microsoft Office).

Microsoft Oslo: a tool, a language, a repository

A couple of Microsofties are talking up the Oslo launch at the forthcoming PDC. “Oslo” is what Microsoft sees as the next generation of software development – I think.

Don Box and Douglas Purdy have just posted their own definitions. They should know, they’re working on it.

Box says:

With Oslo, we’re doing two things:

1. We’re making it easier for people to write things down in ways that make sense for the domain they are working in – the common term for this in the wild is modeling.

2. We’re making the things people wrote down accessible to platform components during program execution.

Purdy:

we have boiled down Oslo to three very simple things:

  • A tool that helps people define and interact with models in a rich and visual manner
  • A language that helps people create and use textual domain-specific languages and data models
  • A relational repository that makes models available to both tools and platform components

There will be a CTP for us all to try at PDC.

The last time the industry tried this I believe it was called UML 2.0; it excited a lot of theoreticians but made little impact on real-world application development. I’m sceptical about Oslo too; but let’s acknowledge at least that the goal is a worthy one.

Having said that, what do you think about this remark from Purdy:

For me personally, Oslo is the first step in my vision “to make everyone a programmer (even if they don’t know it)”.

I’m sorry, that “everyone a programmer” line brings to mind spaghetti-macros in Excel or some of those unmaintainable Access and Visual Basic applications which you still see sometimes if you hang around small businesses.

Still, there is a costly divide in development, which is to do with the fact that A is an expert is some particular field, B is a programmer; and somehow A’s expertise has to be expressed in B’s code. I think this is about bridging that gap.

Technorati tags: , , ,

What happens to the browser market when Google plays the OEM card?

Here’s a bit of speculation. My initial thinking about Google Chrome was that it would mainly take market share from Firefox; and that while IE’s share may continue to erode, Chrome is unlikely to accelerate that much.

I’m beginning to change my mind. One factor is OEM installs. We all know what a huge influence default installs have on users, which is why software vendors are happy to pay the likes of Dell and HP for space on the desktop, or to be the default anti-virus engine, for example. This has often been to the detriment of the user’s experience overall, to the extent that it helped to damage Vista’s reputation, but that is an aside.

Now, one thing I’ve noticed is that Google’s toolbar often turns up by default in OEM installs of Windows. When you start up for the first time (or the first time for real, after all those reboots), IE confronts you with Google’s terms of service. However, I have not yet seen Firefox installed as the default web browser. I’ve presumed that Mozilla doesn’t quite have the financial muscle to do it, or maybe there are other reasons.

Google is a more formidable presence than Mozilla. What if Google buys browser share by being the default browser on machines from the leading OEMs? I suspect that would soon impact IE’s share. Microsoft cannot prevent it because of anti-trust constraints.

Since Chrome is in effect the new Google toolbar, this move strikes me as inevitable.

This would mainly impact the consumer and small business space. IE has some special advantages for enterprises, since it hooks in tightly to Microsoft’s software management tools, and there are further improvements to this aspect in IE8. The consumer/business separation is a leaky one so it could still have a big impact.

Technorati tags: , ,

Flash and Silverlight are the Chrome losers, says Zoho boss

Zoho CEO Sridhar Vembu makes an interesting statement in an email he has circulated following the launch of Google Chrome:

The biggest losers in Google’s announcement are not really competing browsers, but competing rich client engines like Flash and Silverlight. As Javascript advances rapidly, it inevitably encroaches on the territory currently held by Flash. Native browser video is likely the last nail in the coffin — and Google needs native browser-based video for its own YouTube; so we can be confident Google Chrome and Firefox will both have native video support, with Javascript-accessible VOM (video object model) APIs for web applications to manipulate video. As for Silverlight, let me just say that if Silverlight is the future of web computing, companies like us might as well find another line of work — and I suspect Google and Yahoo probably see it the same way too.

These last weeks have not been good for Adobe. First there was the Harmony announcement, sidelining the Adobe/Mozilla Tamarin project and making Adobe’s ActionScript 3.0 look more proprietary. Now there is Chrome; and I’m inclined to agree with Vembu, that Google will try to move away from Flash dependency. If that is right, then neither Google, nor Microsoft, nor Apple wants to play the Flash game.

As for Silverlight, I see this more as a Microsoft platform solution, extending its reach beyond the Windows client. I doubt it will be much affected by Chrome, though Vembu is right in saying that the more capable the browser becomes, the less necessity there is for something like Silverlight.

What about Zoho itself? I would take it more seriously if it were not so desperately slow whenever I give it a try, in contrast to Google’s usually responsive servers. It may be better in the USA, or perhaps there is some other reason, but for me the performance just kills it.

Counting primes in Google Chrome

A while back I put together a quick prime counting test for Flash and Silverlight.

As someone noted, this test runs remarkably fast in Chrome, thanks to the V8 JavaScript engine.

Here’s the JavaScript version of the test – note that you cannot easily run this in IE or Firefox for larger values, because the script times out, though you can configure your browser to prevent this.

Here are my figures on Vista (lower is better):

  1. Microsoft Silverlight 2.0 beta 2: 0.464 secs
  2. JavaScript Google Chrome: 1.4 secs
  3. Adobe Flash: 1.667 secs
  4. JavaScript Mozilla Firefox 3: 6.046 secs
  5. JavaScript Microsoft IE7: 11.916 secs

I can’t easily test IE8 as I have it installed in a virtual machine.

10 things you might not have known about XAML

I’ve written a short piece on XAML for the Register. Here’s a few things you might not have known about Microsoft’s Extensible Application Markup Language:

1. It is not just for WPF (Windows Presentation Foundation); it is also used as a language for Workflow Foundation (WF). Microsoft has hinted that we will see more XAML applications announced at the forthcoming PDC.

2. XAML doesn’t have to be XML – see the intro to the XAML Object Mapping Specification 2006, which says that “any physical representation may be used.”

3. XAML is a small core and distinct from XAML vocabularies. The huge WPF is a XAML vocabulary. WF is another vocabulary.

4. Although XAML is usually represented as XML, it is near-impossible to create an XML Schema to validate it usefully. Here’s where Microsoft explains why.

5. In Visual Studio 2005, a huge but imperfect .xsd schema file was used for validation and to drive IntelliSense (things like code completion) in the XAML editor. In Visual Studio 2008 Microsoft abandoned that idea and uses a language service instead.

6. The core idea behind XAML is to be a declarative language for .NET. WPF is merely an early application for XAML.

7. XPS, Microsoft’s fixed-layout language that competes (just about) with Adobe’s PDF, uses XAML that is a subset of WPF. This means that you can actually display XPS documents in Silverlight – there’s no need for a viewer, it is native Silverlight code.

8. When you compile a Silverlight application, the XAML stays as XAML, albeit bundled into a resource.

9. Silverlight allows you to write inline XAML within HTML.

10. XAML rhymes with Camel. Sorry, you knew that already. But did you know that CAML (Compiled Application Markup Language) is XAML compiled to MSIL (Microsoft Intermediate Language)? Microsoft tested this idea in pre-release versions of WPF, but apparently the performance benefits were disappointing and it was less compact than BAML (Binary Application Markup Language), a tokenized representation of XAML. Silverlight doesn’t bother with either: XAML is saved as a resource in a .NET DLL, and then zipped as part of the .XAP package by which a Silverlight application is delivered.

Technorati tags: , , , ,

The new Google Chrome browser: a bad day for Firefox

The Firefox angle is what puzzles me about Google’s announcement that it is is launching a new open source browser. We should get to try it tomorrow; perhaps we’ll see that Google is successfully reinventing the browser. In particular, this is a part of what is sometimes dubbed the Google OS: the client for cloud applications running on Google’s servers:

Under the hood, we were able to build the foundation of a browser that runs today’s complex web applications much better.

Google is using some proven technology in the form of the Webkit rendering component (as used in Apple’s Safari). I imagine it can do a decent job. But why? From Google’s perspective, the browser market was shaping up nicely already. Microsoft’s IE has a still large but declining market share; Mozilla Firefox is growing, has a vibrant community, and relies on Google for the bulk of its income in return for making it  the default search engine – a deal which has just been extended for three years.

Now Google appears to be going head-to-head against Firefox. It won’t necessarily succeed; Firefox has lots of momentum and will be hard to shift. Equally, I doubt that Microsoft’s market share will decline significantly faster against a Google browser than it would anyway against Firefox.

The risk is that this will split the open source community.

As for Firefox, this can only be bad news. It has the embarrassment of relying on a major competitor for its income, and the knowledge that it is driving traffic to a company that will push users to switch to an alternative.

Maybe Google Chrome is so good that it will all make sense when we get to try it. For sure, it is an intriguing development for web applications and I’m looking forward to seeing how well Google can substantiate its claims that it is “much better” for the job of running them.

Internet Explorer 8, FireFox 3 pop-under failure

I attended a UK briefing for Internet Explorer 8 last night. An interesting product which I’ll be writing plenty more about – you can get it here. Installed smoothly on my Virtual Box Vista.

At the event I mentioned to someone from the IE team that it is annoying how pop-ups still somehow get round the pop-up blocker. The guy seemed mildly surprised and asked me to send him any urls I found. I didn’t have to wait long. If you want obsessive detail on the recordings of Elvis Presley, a great site to visit is elvisrecordings.com [warning: pop-ups and pop-unders]. I can’t recommend it though, because there are some annoying scripts there. I thought this would make a good test for IE8 Beta 2. The home page has some stuff that gets blocked, and it has some Java which doesn’t run because I haven’t installed it yet, but if I click the link for the Sun recordings (arguably the best of Elvis) I get this:

The only extra step I took to get this screen was to click the pop-under in the task bar so it came to the front. Lucky me, I’m a “possible Audi A3 winner”.

Just to be fair, I tried it in FireFox 3. Same result:

Maybe it is just too difficult to block this stuff successfully without breaking pages.

The other question: why do otherwise useful sites pollute themselves with this junk? Is the money really that good? For what it’s worth, the culprit seems to be a “free” web stats provider called Motigo. Avoid.

I’ll forward the url to my contact.