Tag Archives: internet explorer 9

What’s the story with IE9 and embedded Internet Explorer?

There is a certain amount of fuss over the fact that Apple’s latest mobile Safari does not give full performance when either embedded in another application, or pinned to the home screen.

It would help if Apple were more forthcoming on the issue; but in general you cannot assume that embedded browser components will behave the same way as the full browser, even when they share common libraries.

I did some quick experimentation with the released Internet Explorer 9 and the .NET Webbrowser control. First, I tried the SunSpider JavaScript benchmark. I had to use version 0.9 since the latest one gives an error in the Webbrowser control. No great surprise: the embedded version was substantially slower. I ran the tests separately, and for the .NET application I ran in release mode outside Visual Studio. IE9 completed in 314.6ms, the Webbrowser control in 578.2ms.

image

While that may seem a bad result for embedded IE, it could be much worse. Unfortunately I did not think to run this test before installing IE9, so I dual-booted into a Windows install that still has IE8 and ran the exact same application. At 6175ms it was more than ten times slower. It was slightly quicker in standalone IE8, but not by much.

image

Next I tried the Fish Tank demo, which tests hardware graphic acceleration.

image

There were two notable facts about my result here. First, the Webbrowser control reports itself as Internet Explorer 7. Second, the frame rate for the two instances was nearly identical. In practice it varied slightly and some of the time the standalone IE9 was fractionally faster, but still close. By way of reference, Apple’s Safari was around 10 times slower.

Update: embedded IE is slower on the Fish Tank than I first realised. 60fps is a kind of maximum for the demo. Embedded IE9 slows to 45fps with 50 fish, whereas full IE9 does not drop below 60fps until 500 fish on my system. It does makes the fans whir though!

My guess is that Microsoft is more concerned about compatibility than performance, when it comes to embedded IE. However, clearly there is significant benefit from IE9 even when embedded.

How can you get embedded IE not to report itself as IE7 and to use full standards mode by default? If it is like IE8, this can only be done on a per-application basis via setting a registry key. That is awkward for developers, who would prefer an API call to set this. I am not sure if there is any change for IE9.

IE9 in Windows Phone will be good for cross-platform JavaScript and HTML5 apps

Microsoft CEO Steve Ballmer, accompanied by Nokia’s Stephen Elop, showed coming updates for Windows Phone 7 at a Mobile World Congress keynote last night.

A minor update due in early March will add copy and paste, and CDMA support is also coming in the first half of 2011.

The more interesting update is planned for the second half of 2011 – I’m guessing late this year – and will have multi-tasking for 3rd party apps, as well as a mobile version of Internet Explorer 9. We were told that this will feature the same HTML 5 standards support and hardware acceleration as in the desktop version.

Windows Phone VP Joe Belfiore showed the fish demo running on Windows Phone with IE9 alongside Safari on the iPhone. The iPhone fish jerk slowly across the screen.

image 

Note that Apple will likely have a new iPhone out before mobile IE9 is ready, which may well equal or exceed IE9’s graphics performance.

Nevertheless, this is interesting for developers since it means that the fast “Chakra” JavaScript runtime will be available on the device. HTML and JavaScript is one route to cross-platform mobile applications.

Silverlight on Windows Phone includes a WebBrowser control which has access to isolated storage. This means you could write most of your app in cross-platform JavaScript and HTML, but wrap it in Silverlight for access to native phone features.

It is a shame though that Microsoft does not include the Sqlite local database engine found in WebKit-based mobile browsers. Sqlite is in the public domain so this may be an example of the “not invented here” syndrome. Microsoft does not even have SQL Compact Edition in Windows Phone 7, though it would not surprise me if this also appears in the autumn update. Full details are being held back until the Mix conference in April.

Although it has not been stated, it would make sense for this update to be used in the first Windows Phones from Nokia. On Sunday evening, Nokia stated its desire to deliver a Windows Phone device before the end of the year.

Microsoft Internet Explorer 9 beta is out

Head over to http://www.beautyoftheweb.com/ and you can download the beta of Internet Explorer 9, which is now up and running on my Windows 7 64-bit machine and looking good so far.

So what’s new? In terms of the rendering engine, this is like the last Platform Preview, but a little bit further along. During the briefing, we looked at at the experimental (and impressive) site put together by EMC, which shows 3D rotation of a motor vehicle along with other effects, put together entirely in HTML 5. At the time I only had the fourth platform preview installed, and the site did not work. Amusingly, I was advised to use Google Chrome, which worked fine. Now that I’ve installed the beta, the same site works in IE9, rather more smoothly than in Chrome.

What’s really new though is the user interface. The two things that jump out are the adoption of a single box for search and URL entry – many users do not understand the difference anyway – and the ability to drag tabs to the taskbar to pin them there like application shortcuts. Once pinned, they support Windows 7 Jump Lists, even when the site is not active:

image

If you squint at this screenshot, you’ll notice that the Discovery site, which is tweaked to use this feature, has a good-looking icon as well as a Jump List, whereas the icons adjacent to it look bad. That’s because you need to create a new large favicon to support this feature, as well as optionally adding metadata to create the Jump List. None of this is any use, of course, if you use Vista; and if you use XP you cannot even install IE9.

There’s also a download manager at last.

There’s no doubt that IE9 is miles better than IE8. Is it better than rivals like Chrome, from which a casual observer might think it has drawn inspiration? Too soon to say; but using the official native browser does have advantages, like integration with Windows Update as well integration with the OS.

That said, I’m not personally a big fan of the single box approach, and I’ll miss the permanent menus. If you press the Alt key the old File, Edit View etc magically appear, but I can’t see any way to make it persist.

More on Microsoft’s difficult choices: WPF, Silverlight, HTML 5

Earlier today I posted a story speculating about the future direction of Microsoft’s development platform, which has proved controversial and to some extent has been misunderstood. Although it is speculative, the issues are important since developers want to target platforms with a strong future. Here’s another take on why Microsoft, whichever way it decides to go, faces some difficult choices.

First, let me be clear: I don’t see Microsoft abandoning Windows Presentation Foundation let alone Silverlight. Microsoft has an good track record when it comes to continuing support for its technologies, better than competing platforms. Visual Basic 6 applications mostly still run today on Windows 7, perhaps with a few issues caused by User Account Control for which there are workarounds. Whatever you target, there is an excellent chance Microsoft will continue to support it long into the future. The main exception I can think of is Windows Mobile, which is incompatible with the new Windows Phone 7 series, but given the challenges Microsoft faces in mobile you can understand the decision.

Nor is there any chance of Microsoft reviving old frameworks. There will not be a return to Windows Forms. WPF is a better GUI framework in every way, other than performance on older systems – though note that Windows Forms applications still run fine today, and I imagine will run fine on Windows 8 and probably 9 as well.

The real question is not about support, but future investment. Microsoft has finite resources. It is in overdrive right now on Internet Explorer, on Silverlight, on Windows Phone 7, and on Azure, for example. There will be other products and technologies that receive less attention, because someone has decided they are not strategic.

It also seems to me that Microsoft’s server and cloud story is less conflicted. From the developer’s perspective it is thoroughly .NET based, and you can be confident that technologies like C#, IIS, ASP.NET, SQL Server, Exchange and SharePoint will be around for the foreseeable future.

With that out of the way, a few further comments.

Windows Presentation Foundation

The history of WPF goes back to the early days of Windows Vista, then called Longhorn. WPF was one of the the “three pillars”, Avalon, where the others were Indigo (WCF) and WinFS. Avalon was the future of the Windows GUI API, based on .NET code and XAML layout.

If Longhorn has proceeded as planned, WPF would be the loose equivalent of Cocoa on Apple’s OS X, the standard way to code Windows GUI applications. Unfortunately, in 2004, Microsoft discovered that Longhorn was heading for disaster. The project was reset, delaying release and resulting in Vista being both late and rushed. The reset project included Avalon as a supported framework, but made it incidental to the workings of Windows itself. The Windows team, in other words, lost faith in Avalon and reverted to native code with a dash of DirectX.

Windows 7 is more of the same. WPF is there but it is not at the heart of the OS. Developers are encouraged to use it for their own apps, but the Windows team is focused on native code.

When Visual Studio 2010 was released, with a shell built in WPF, Microsoft made some noise about how it showed its commitment to the framework. It was also noted that the Visual Studio team had worked with the WPF team to fix some issues. However, there is little sign of WPF changing its role as a layer in Windows primarily to support custom applications, rather than being used for the shell of Windows itself.

The question now: how much should Microsoft invest in future WPF development? It is not essential for Windows itself. Nor it is compelling for developers wanting to take advantage of the cloud model and support diverse clients. Frankly it does not look strategic unless it becomes the Windows shell API; and you could understand Microsoft having a “once bitten twice shy” attitude to that possibility.

I find it plausible that Microsoft would throttle back on WPF development.

Silverlight

Silverlight by contrast is strategic. Silverlight is a framework that runs in the browser, out of browser, and on Windows Phone 7. It is lightweight and cloud-oriented, and it runs .NET code, ticking lots of boxes for developers moving on from Windows desktop applications. It is also designer-friendly, with rich graphics and multimedia support. There are still a few gaps – printing is crude, for example – but it makes more sense for Microsoft to invest in Silverlight than WPF. It is significant that the new LightSwitch tool for rapid development of database apps targets Silverlight, not WPF, and not ASP.NET (except on the server). Silverlight is also the application platform for Windows Phone 7.

Then again, Silverlight is WPF. It was originally WPF/Everywhere, and uses the same XAML language for layout.

I will be surprised if Microsoft back-pedals on Silverlight. Nevertheless, I can also understand this being a matter of debate. Despite Microsoft’s efforts to distinguish them, there is considerable overlap between what Silverlight does, and what HTML 5 in IE9 does, especially when in the browser. There is also the Apple problem: HTML applications will run on iPhone and iPad, but Silverlight will not. What if Microsoft focused on the new IE engine instead of Silverlight, supporting it properly in Visual Studio, and providing ways for developers to create out-of-browser apps that run with full trust and have access to local system APIs? This would be along the same lines as the Palm WebOS and Google’s Chrome OS.

Put another way, does it make sense for Microsoft to invest equally in HTML 5 and Silverlight, when possibly IE 9 could be the basis of a unifying technology, a subset of which would work on any modern browser on any client?

It seems to me that Microsoft will have to invest in tooling for HTML 5 clients in some forthcoming edition of Visual Studio, and that this will be a selling point for its cloud platform, while possibly undermining the role of Silverlight.

There is also a continuing case for Silverlight, both because of the inherent advantages of a plug-in – consistency of client platform as well as features that HTML 5 lacks – and because it supports .NET. The .NET languages (Mono aside) tie developers to Visual Studio and to Microsoft’s platform. Visual Studio combined with .NET is a formidable tool for both client and server and a key advantage for the platform.

Watch this space.

Microsoft wrestles with HTML5 vs Silverlight futures

Former Microsoft Silverlight Product Manager Scott Barnes has posted a series of tweets following a visit to Microsoft:

So.. after a week in Microsoft HQ etc.. i have a lot of inside info that just basically puts into question the future of #Silverlight #wpf

he remarks, and then:

Right now there’s a faction war inside Microsoft over HTML5 vs Silverlight. oh and WPF is dead.. i mean..it kind of was..but now.. funeral.

Barnes positions it as a fight between Windows/IE9 backing HTML5, and the developer division backing Silverlight. He also suggests that Microsoft is contemplating a classic “Embrace and extend” strategy for HTML:

HTML5 is the replacement for WPF.. IE team want to fork the HTML5 spec by bolting on custom windows APi’s via JS/HTML5

He says further that Microsoft has “shut down the designer story” – I am not sure what that implies, though I can imagine that a lot of money has been sunk into the Expression tools without drawing significant market share from Adobe’s Creative Suite.

Barnes is a straight-talking guy but clearly this is all speculation. Nevertheless it is obvious that, on the eve of launching IE9 beta with its fast JavaScript engine, hardware accelerated graphics, and pixel-precise bitmap drawing, Microsoft has a tricky job positioning HTML5 vs Silverlight. For that matter, even positioning Silverlight vs desktop Windows Presentation Foundation is not easy.

Since we are also on the eve of launch for Windows Phone 7, which Microsoft has flagged as a strategic product and which uses Silverlight as its app platform, it seems unlikely that the technology will be sidelined; but rumours of internal divisions on the subject do not surprise me.

Firefox 4 as Psychedelic as IE9 with Direct2D enabled

IE9 is much faster than Firefox 4 beta at the Psychedelic test on the testdrive site, which demonstrates drawing fast graphics to the Canvas element. That said, a comment to an earlier post prompted me to try enabling Direct2D in Firefox 4.

As you would expect, the difference is dramatic. Here’s the before and after:

image image

How about IE9?

image

Really nothing in it. It’s all about hardware-accelerated graphics.

Direct2D is not enabled by default (currently), so it is not unreasonable for Microsoft to show the slower speed in its published comparison; but worth noting that the issue is easily fixed, presuming Firefox 4 is stable in this mode.

If you want to enable Direct2D in Firefox 4, the how-to is here.

Render SWF in JavaScript – a solution for Flash on iPhone/iPad?

Looking at the blazing-fast JavaScript in IE9 Preview 4 made me wonder if anyone had tried to write a SWF renderer in JavaScript. SWF is the Adobe Flash file format and a published specification.

Of course someone has. Tobias Schneider has been working on Gordon and built his first full release in June.

image

Gordon is a little behind in terms of version support:

In this build, Gordon can read and parse all valid SWF’s, even if they are compressed with ZLIB, but plays only SWF1 files completely, as well as the most of the SWF2 features.

The Adobe SWF specification is now up to version 10.

It is still an interesting exercise. Consider Google Web Toolkit, which compiles Java to JavaScript. What if Adobe did something similar for Flash? In fact, if you look at the Smart Paste “sneak peak” from Adobe Max 09 something like this was demonstrated.

The Flash player includes some proprietary codecs that could not easily be replicated in JavaScript. Still, given such limitations, “Export to HTML 5” would be a nice option to find on some future version of Flash Professional, and would help Adobe’s tools business even if it also dented its ambitions for Flash as the universal runtime.

Testing the Canvas element in Internet Explorer 9

I’m impressed by the demos at the IE9 Testdrive site, which is full of fun and interest. Of course it’s good to try the demos in other recent browsers, though as you would expect on a Microsoft site, IE9 tends to work best. For example the great Beatz demo scored 8510 in IE 9 versus 1560 in Google Chrome 6 (developer build):

image

But are these demos slanted to favour IE9? I looked around for some independent demos, especially for the Canvas element. Here’s one on developer.mozilla.org, for example:

image

Hmm, it looks like some of these demos do not allow for the possibility of Internet Explorer supporting Canvas. What about this one?

image

Not too good either. I tried downloading it and hacking it to work in IE9. I disabled the script that conditionally displays the Chrome Frame offer and tried again. Another failure, because IE9 loaded the page in IE5 document mode. When I have a moment I’ll work out why. I forced IE9 mode (Debug menu) and at last was in business, sort-of:

image

Chrome is on the left, IE9 on the right. This is an animation with speech bubbles, and there is some problem with the text handling because the bubbles do not appear in IE9. Still, it did run. I noticed that IE9 ran slightly faster than Chrome, but with nothing like the big Testdrive difference: 209fps versus 164 fps, for example, but varying considerably as the animation proceeded.

I also tried with Mozilla Firefox 3.6, which is much slower than Chrome on this example, around 71 fps.

No conclusions yet, but watch this space. It would also be helpful if more of the folk doing Canvas demos would test with IE9 as well as Chrome, Firefox, Safari and Opera. The experience bears out what Microsoft is preaching: test for the feature, not the browser version.