Will HTML5 fulfill the old Java(script) write once run anywhere promise?

Do you remember the slogan Java Everywhere – write once, run anywhere – WORA, sometimes WORE or by some, and here I mean .NET developers (like me), called Just-W*ORE. This slogan saying you can write Java code on any machine, compile it and run on any device, was very popular a couple of years ago. Is it true, though? Could HTML5 be such a technology to fill this hole? We will present you another point of view about the HTML5 empire than presented by Kamil in his last blog post. Here I will try to present some of the advantages and disadvantages of HTML5.

Have you ever seen an application working on any screen?

Seriously, I have never seen any application written in any language by one developer which could be run everywhere: starting from your daily PC through a mobile device to your TV. Maybe some simple applications that print “hello world” on a screen are really multi-platform (as long as there is a screen). The problem begins when you want to draw some graphics, open a local file or just fit your UI controls on a screen. This kind of drama considered mostly JavaME edition on cell phones – but, let’s forget about it. The problem here is not with the language itself, but with the hardware and it seems that you will always have such problems. Let’s take a look at HTML5, which seems to bring some light into this area.

Will HTML 5 solve the issue?

We prefer solving issues instead of complaining about things. And HTML5 is supposed to be the remedy. Recently, at the IT Academic Days at the Gdańsk University (slides available here), we discussed this matter. We tried to show what HTML5 offers to both its end-users and developers today and what it might offer in the future, Windows 8 include.

The iPad and its lack of FLASH support moved HTML5 forward. What is more, the whole community of web developers was excited to play with the HTML5 toys creating many applications.


Why HTML5?

We got many useful questions during and after the presentation – why did we present HTML5 even though it’s not completed yet? The answer was simple – it’s the future (even if it seems like a stupid and valueless answer). There is no easy answer to it until you touch the technology itself. Similar questions were asked in Kamil’s blog post comments.

Many of the features available in HTML5 today are stable and can be used almost everywhere without using any browser plugins.

In a few months (not years) you will be able to create fancy CSS animations without the use of Flash or Silverlight. Why use some analog nicely looking clock, video player or photo gallery created in third-party plugin? Instead you have it directly in HTML and CSS.

You can easily write flash/silverlight applications and publish them on the web. What is more, it’s a plugin and thanks to this it will be updated quicker than the browser. That’s of course true… today. Take a look at Chrome or Firefox browsers which are updated frequently with a new features list. Even IE started to move on.

The HTML (JavaScript) community is bigger than flash/silverlight community. Flash/Silverlight is under control of one company, where JavaScript is under control of the whole world. As an example take a look at jQuery. When something is not working on a specific web browser, then sooner or later some developers will fix it in the library or make some workaround.

Should we learn FLASH or HTML5?

There were also questions where the answer wasn’t so simple, like in this case: Should we learn Flash or HTML5? Of course, if you are a Flash or Silverlight developer then don’t give up on this technology because they will still be in the market for a long period of time. But if you are a newbie then it will be best to learn HTML5. The first reason for this is that you can use pure HTML in your MVC applications. Take a look at any web page. A web page is created mostly from HTML, CSS and JavaScript. Day by day, there are less flash-only pages.

You can use any IDE (also notepad if you are a masochist) to edit the source of your page. Your page is independent and can be displayed on any device. You do not need any expensive tools to create a flash-looking page (find the differences for example here). What is interesting, you can browse the code of the page by using developer tools build into a browser (like IE Developer Toolbar in IE9+ by pressing F12). Here you have another answer to a question before you even asked about it. If you can browse the code, then also search engines can browse the code and index your page – it’s a SEO thing.

HTML5 looks very promising!

Calm down, not fully yet. Still there are a lot of features that differ among browsers and probably this will be also the case in the future. Each manufacturer will create its own browser core which will differ in some areas. Still, the performance is a bottleneck for more calculation consuming applications – if you want to have time-consuming calculations, it’s hard to implement them in a browser. The web browser is not designed for such applications, to make a galaxy simulation you still need to use C++ with some CUDA technology or even assembler.

Besides, there’s still a market for non-HTML desktop applications.

As an example, IE seems to be more promising in some areas (like canvas in my last demo described in this post), but Chrome on the other hand has some good support of WebGL. Despite this, any web browser will have a big subset of HTML5 which will work on any browser in the same way (this is currently possible).

What’s the future?

Over the last few years we had Java Applets, Flash Pages, Silverlight applications – every technology had its time, now it’s going to change again. HTML5 seems to be the promised land for developing REAL multi-platform client side applications looking and working in the same way. Write it on any machine, use any browser and display in the same way. However, still with some restrictions and browser specific workarounds. Still the flash based technology will have it’s place on the web, but the most part of Flash applications today will be replaced by HTML5 based ones.

At the end relax and play this Flash Silverlight HTML5 game – Cut the Rope.

What’s your opinion about HTML5 and the use of “JavaScript-Everywhere”? Have you played with HTML5? Have you made any non-browsers apps with JavaScript and/or HTML? What’s your opinion?

namespace Marcin.Dembowski {
internal class Me {
public IEnumerable Info {
get {
yield return “Finished studies some years ago at Gdańsk University.”;
yield return “Sometimes he is accessible for public by giving presentations.”;
yield return “Since 1 Apr. 2011 nominated as Microsoft MVP.”;
yield return GetTweets.From(“D3M80L”).Last();
yield return GetBlogPost