Tag Archives: html 5

Internet Explorer 10 Platform Preview 2 gets web workers, HTML5 sandbox

Microsoft has released Internet Explorer 10 Platform Preview 2 which adds a number of features. These include:
  • Web Workers for background JavaScript.
  • File Reader API
  • HTML 5 drag and drop
  • CSS3 positioned floats
  • HTML 5 sandboxing
  • Some features of HTML 5 forms
I asked Microsoft’s Ryan Gavin and Rob Mauceri why IE seems so far behind its rivals in HTML 5 support if you look at a test site such as html5test.com, where IE9 scores 141 and Google Chrome 329. I was given several reasons. The site does not cover CSS3, SVG, yet does include “specs that are still under development, specs that have been superseded by other things, you have look at what it is actually testing,” said Mauceri. He added that the site only tests for the existence of the feature rather than how well it is implemented.
Fair points, but my sense is that Microsoft, while hugely ahead of where it used to be in terms of HTML standards support, is likely behind Google and Mozilla and likely to remain so. Microsoft has a slower release cycle, and a greater burden of legacy issues to worry about.
That said, Microsoft is pushing forward energetically compared to pre-IE9 days and the new features are interesting, particularly in the light of the greater role of HTML5 which has been promised for Windows 8.
Web Workers, for example, enables more responsive web pages through concurrent programming.
image
I also asked how Microsoft will enable greater access to the Windows API in Windows 8 without polluting the standards, but got the non unexpected answer “wait for the Build conference”.
No formal word on timing, but I would expect the delivery of IE10 and Windows 8 to be connected.

Microsoft releases IE10 preview, talks up native HTML5

Microsoft has released an early preview of Internet Explorer 10, which you can download now. It shows the company’s commitment – for the moment – to an energetic release cycle for its web browser.

image

Why use IE? Microsoft is pushing the notion that only IE is truly native on Windows:

IE10 continues on IE9’s path, directly using what Windows provides and avoiding abstractions, layers, and libraries that slow down your site and your experience.

In practice, this means using the Windows graphic stack directly and integrating with the Windows shell through features like jump list support on Windows 7.

IE10 supports more CSS3 standards including multi-column layout, Grid layout and Flexible Box Layout,  and Gradients. There is also support for EcmaScript 5 Strict Mode, which enforces tighter standards so reducing the likelihood of errors. Strict Mode is optional; if a web browser tried to apply it to the entire web lots of pages would break.

Microsoft is promising to support additional CSS3 standards including transitions and 3D transforms, though these are not in the preview. New preview releases will appear every 8-12 weeks.

According to Corporate VP Dean Hachamovitch, the company is steering a tight path between falling behind, and implementing immature standards:

When browsers prematurely implement technology, the result is activity more than progress. Unstable technology results in developers wasting their time rewriting the same site.

he writes in a blog post.

IE10 was announced today at the Mix conference in Las Vegas. Mix seems to be featuring equal measures of HTML5 and Silverlight, which makes for an interesting tension. News on Windows Phone is also promised, though I am not sure whether this is the moment when Microsoft will tell us about the next generation of Windows Phone and how it ties in with Windows 8 and with tablet devices. All will be revealed (or not) tomorrow.

Microsoft promises Silverlight 5 beta soon, more love for HTML 5 in uncertain blog post

Microsoft has promised to deliver a Silverlight 5 beta at the Mix conference next week. The team posting is by Walid Abu-Hadba (Corporate VP of Developer and Platform Evangelism), Soma Somasegar (Senior VP or Developer Division) and Scott Guthrie (Corporate VP of .NET Developer Platform) and seems intended to clarify the company’s much-debated strategy concerning Silverlight vs HTML 5:

we have received questions from the community about the future of plug-ins, and how Silverlight is viewed as part of an overall solution set. We’ll provide clarity, background and context below

Despite the high-powered authorship though, the post tells us little. I mean, can you get vaguer than this?

HTML5 is a solution for many scenarios, and developers should make the appropriate choice based on application needs, knowing that we have a heritage and a future vision of supporting a wide variety of technologies to meet those needs.

This sentence is considered so perfectly nuanced that it is repeated at the end of the post.

If you enjoy reading between lines, there is a phrase to ponder here:

Over the coming months we’ll be particularly demonstrative of our emphasis on HTML 5, in Internet Explorer and in tools.

I’m hearing noises about Visual Studio 2012 now, and I imagine we will see some HTML 5 tooling there. I would expect it to include support for rich ASP.NET clients talking to WCF RIA Services or maybe  WCF Web APIs as well as things like the ASP.NET Membership Framework; and I would expect JQuery and ASP.NET Ajax to figure strongly.

I do not think Silverlight is dead though; apart from its role in Windows Phone, we are hearing rumours about the AppX application model in Windows 8 which looks a lot like Silverlight; and I have already noted the extensive use of Silverlight in Microsoft’s own products. I would rather hear the developer division VPs discuss this aspect of Silverlight, rather than reiterate corporate angst over how it relates to HTML 5. I would also like to see a post signed by the Windows team as well as by developer division.

Silverlight in Microsoft products – Silverlight the new Windows runtime, HTML 5 the new Silverlight?

Is Microsoft ditching Silverlight and embracing HTML 5? Or is Silverlight the future of desktop and browser-based development on Microsoft’s platform?

Good question; and I am not sure that Microsoft itself can answer. There is evidence for both cases.

One thing I have noticed though is that Silverlight is turning up in numerous Microsoft products. This is in contrast to the early years of the original .NET Framework, which Microsoft used rather little in its own stuff, though the context is different today because of the growth in web-based development.

I guess we cannot really count Visual Studio LightSwitch, which is a tool that builds Silverlight applications, though it is interesting insofar as the target market is not expert developers, but smart general users who want to build database applications.

Lync Server 2010 is a better example. Silverlight is used for the control panel.

image

Windows Azure, a strategic product for Microsoft, uses Silverlight for its control panel

image

Windows Intune, for maintaining networks online

image

System Center for managing Microsoft servers. I’m not actually sure how much Silverlight is used in System Center, but I understand the newly announced “Concero”, a new feature for managing public and private clouds, uses a Silverlight control panel and I suspect it is used elsewhere as well.

image

These are a few that I am aware of; I would be interested in other examples.

Now, you can make sense of this to some extent by distinguishing “Windows platform” from “broad reach” applications. It is curious, but Silverlight which started out as a broad reach plugin is gradually moving towards a Windows platform runtime, though it still runs on a Mac with some limitations, mainly lack of COM interop. There has been speculation that Silverlight could merge with the desktop Windows Presentation Foundation and become a commonly used application runtime for desktop Windows as well as web apps, and of course Windows Phone.

When Microsoft wants broad reach, it uses HTML, an example being Office Web Apps which make hardly any use of Silverlight.

Nevertheless, using Silverlight for products like Windows Intune could be annoying for administrators who might otherwise use an Apple iPad when out and about; but I guess Microsoft figures that if you are deep enough into Windows to use Intune, you probably will not be using an iPad.

Let me add that Silverlight seems to me to be working well in the examples above, to the extent that I have tried it. Could they be done equally well in HTML and JavaScript? Probably, if users have IE9, but probably not if it is IE8 or earlier.

Silverlight the new Windows, HTML 5 the new Silverlight?

Adobe targets Apple iPhone and iPad browsers with tool to convert Flash projects

Adobe has released an “experimental technology” codenamed Wallaby on its Adobe Labs site. Not all Adobe Labs projects become fully released products, but it is an indication of serious interest. The experiment was first previewed at the Adobe Max conference last year.

Wallaby is an Adobe AIR application for Windows and Mac. The tool is simplicity itself: just select a .FLA file and convert it.

image

.FLA is the format of Flash projects, not Flash output. gauges

According to Adobe’s John Nack Wallaby has limited goals, focused on “converting typical banner ads to HTML5.” It is aimed at WebKit-based browsers, the implication being that Adobe’s main intent is to enable Flash ads to work on Apple’s iPhone and iPad, though it also works on Google Chrome and Apple Safari on the desktop. There is no ActionScript conversion, though you can edit the exported project after conversion and add your own scripting.

ActionScript is based on JavaScript so a conversion tool should not be too hard.

Other Flash features not supported include video, sound, 3D transforms, Filters, Inverse Kinematics, and gradient strokes

The fascinating aspect of Wallaby is in its potential. Users do not care whether a web site or application uses Flash or HTML5; they just want it to work. Adobe’s primary strength is in its design tools. One possible scenario is that Adobe might gradually extend its HTML5 support so that the tools are applicable for both platforms; Flash could become a workaround technology for legacy browsers.

No doubt Adobe would rather see the Flash runtime used everywhere but at least the company has a plan B. If, for example, Apple comes to dominate personal and mobile computing and continues to block Flash wherever it can, then that is important. Adobe already has a Flash to iOS packager for apps; now it has the beginnings of a solution for in-browser Flash on iOS as well.

Update: revised post with more detail about what is not supported.

JetBrains WebStorm 2.0 and PHPStorm 2.0 First Look

I respect JetBrains, an IDE company which survives despite intense competition from free tools such as Eclipse and NetBeans. It does so because developers like the products, especially the IntelliJ IDEA Java IDE. The tools are focused on coding; there are few visual designers but lots of coding help, such as code completion, refactoring, find usages, and fast navigation. The tools are also relatively lightweight, so start up quickly, and generally run on Windows, Mac OS X and Linux.

The latest from JetBrains is two related web development IDEs. WebStorm 2.0 is for general HTML/CSS/JavaScript work, and PHPStorm 2.0 is a superset of WebStorm which adds PHP editing and debugging. There is also some support for Adobe’s Flex and ActionScript code.

New in PHPStorm is PHP 5.3 support, Zend Debugger support, improved SQL editing, support for the Mercurial source code management system, and updates for HTML 5 and EcmaScript 5.

I am interested in these tools since HTML development is increasingly important. Browsers are getting increasingly powerful, with HTML 5 and fast JavaScript engines challenging plugins as rich application runtimes, and PHP is less well served by IDEs than you would expect considering its popularity.

My first impressions though are mixed. I noticed a lot to like, in particular the work JetBrains has done on supporting mixed languages: HTML, JavaScript, CSS, SQL,XML and so on. One of its features is that code completion works even within quotes. For example, if your PHP is outputting HTML to the browser, code completion still works. Most editors treat anything within quotes as plain text rather than as code.

image

The IDE is highly configurable and also supports plugins. Live templates let you expand abbreviations to code fragments. There is support for generating documentation with JSDoc, ASDoc and PHPDoc. Testing with PHPUnit is integrated. These are products that will appeal to developers who are code-oriented – are there any others? – and who like the ability to fine-tune their tools to improve productivity.

That said, I did not find it easy to get started with PHPStorm. The main challenge is configuring your PHP environment to support debugging. I have not yet succeeded, though I have not spent all that long on it. Difficulty getting PHP debugging working seems to be the biggest single topic on the support forums currently.

I know this is tricky and it took me a while to get it working with Eclipse. It is important though, and anything the tools vendors can do to make this easier to setup would be welcome. There is a case for simply installing a dedicated LAMP or WAMP server with the product so that developers get immediate and reliable support for PHP debugging, with the option to configure for their own PHP server later.

Another thing I found annoying was the over-zealous spell checker, which seems inclined to check variable names as well as being unaware of PHP extensions like mysqli:

image

I expect there is a way to fix both issues by configuring the product.

In general JetBrains does not seem to suffer from the “not invented here” syndrome and uses open source libraries and tools; in fact it depends on Firefox for JavaScript debugging, and automatically installs its own plugin to improve integration.

image

However I picked up a note of disapproval in the description on the Zen Coding site about the way JetBrains has chosen to implement Zen Coding abbreviations:

These plugins are developed by third-party and has their own ZC engine implementation, which leads to different feature set and abbreviation syntax. Zen Coding team has no relation to this projects

WebStorm is modestly priced at £54.00 for individual developers or £115 per concurrent user for organisations.  PHPStorm is £77 or £154 on the same basis. Free licenses are available for education or for open source projects, on application.

Competing products include the free Eclipse PDT and NetBeans, the commercial Zend Studio, and for a more designer-friendly approach to PHP, Adobe Dreamweaver CS5.

HTML 5 Canvas: the only plugin you need?

The answer is no, of course. And Canvas is not a plugin. That said, here is an interesting proof of concept blog and video from Alexander Larsson: a GTK3 application running in Firefox without any plugin.

image

GTK is an open source cross-platform GUI framework written in C but with bindings to other languages including Python and C#.

So how does C native code run the browser without a plugin? The answer is that the HTML 5 Canvas element, already widely implemented and coming to Internet Explorer in version 9, has a rich drawing API that goes right down to pixel manipulation if you need it. In Larsson’s example, the native code is actually running on a remote server. His code receives the latest image of the application from the server and transmits mouse and keyboard operations back, creating the illusion that the application is running in the browser. The client only needs to know what is different in the image as it changes, so although sending screen images sounds heavyweight, it is amenable to optimisation and compression.

It is the same concept as Windows remote desktop and terminal services, or remote access using vnc, but translated to a browser application that requires no additional client or setup.

There are downsides to this approach. First, it puts a heavy burden on the server, which is executing the application code as well as supplying the images, especially when there are many simultaneous users. Second, there are tricky issues when the user expects the application to interact with the local machine, such as playing sounds, copying to the clipboard or printing. Everything is an image, and not character-by-character text, for example. Third, it is not well suited to graphics that change rapidly, as in a game with fast-paced action.

On the other hand, it solves an immense problem: getting your application running on platforms which do not support the runtime you are using. Native applications, Flash and Silverlight on Apple’s iPad and iPhone, for example. I recall seeing a proof of concept for Flash at an Adobe MAX conference (not the most recent one) as part of the company’s research on how to break into Apple’s walled garden.

It is not as good as a true local application in most cases, but it is better than nothing.

Now, if Microsoft were to do something like this for Silverlight, enabling users to run Silverlight apps on their Apple and Linux devices, I suspect attitudes to the viability of Silverlight in the browser would change considerably.

Microsoft pledges commitment to Silverlight – but is it enough?

Microsoft’s president of Server and Tools Bob Muglia has posted a response to the widespread perception that the company is backing off its commitment to Silverlight, a cross-browser, cross-platform runtime for rich internet applications. He is the right person to do so, since it was his remark that ”Our strategy with Silverlight has shifted” which seemed to confirm a strategy change that had already been implied by the strong focus in the keynote on HTML 5 as an application platform.

Muglia says Silverlight is in fact “very important and strategic to Microsoft”. He confirms that a new release is in development, notes that Silverlight is the development platform for Windows Phone 7, and affirms Silverlight both as a media client and as “the richest way to build web-delivered client apps.”

So what is the strategy change? It is this:

When we started Silverlight, the number of unique/different Internet-connected devices in the world was relatively small, and our goal was to provide the most consistent, richest experience across those devices.  But the world has changed.  As a result, getting a single runtime implementation installed on every potential device is practically impossible.  We think HTML will provide the broadest, cross-platform reach across all these devices.  At Microsoft, we’re committed to building the world’s best implementation of HTML 5 for devices running Windows, and at the PDC, we showed the great progress we’re making on this with IE 9.

The key problem here is Apple’s iOS, which Muglia mentioned specifically in his earlier interview:

HTML is the only true cross platform solution for everything, including (Apple’s) iOS platform.

Muglia’s words are somewhat reassuring to Silverlight developers; but not, I think, all that much. Silverlight will continue on Windows, Mac and on Windows Phone; but there are many more devices which developers want to target, and it sounds as if Microsoft does not intend to broaden Silverlight’s reach.

Faced with the same issues, Adobe has brought Flash to device platforms including Android, MeeGo, Blackberry and Google TV; and come up with a packager that compiles Flash applications to native iOS code. There is still no Flash or AIR (out of browser Flash) on Apple iOS; but Adobe has done all possible to make Flash a broad cross-platform runtime.

Microsoft by contrast has not really entered the fight. It has been left to Novell’s Mono team to show what can be done with cross-platform .NET, including MonoTouch for iOS and MonoDroid for Google’s Android platform.

Microsoft could have done more to bring Silverlight to further platforms, but has chosen instead to focus on HTML 5 – just as Muglia said in his earlier interview.

Whether Microsoft is right or wrong in this is a matter for debate. From what I have seen, the  comments on Microsoft’s de-emphasis of Silverlight at PDC have been worrying for .NET developers, but mostly cheered elsewhere.

The problem is that HTML 5 is not ready, nor is it capable of everything that can be done in Silverlight or Flash. There is a gap to be filled; and it looks as if Microsoft is leaving that task to Adobe.

It does seem to me inevitable that if Microsoft really gets behind HTML 5, by supporting it with tools and libraries to make it a strong and productive client for Microsoft’s server applications, then Silverlight will slip further behind.

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.