Lively Kernel – Another waste of time?

Tags:

Originally posted in my old blog at My Opera

Sun Labs recently introduced Lively Kernel, which is an attempt to treat web applications in a similar way as desktop applications are programming-wise.

The Lively Kernel places a special emphasis on treating web applications as real applications, as opposed to the document-oriented nature of most web applications today. In general, we want to put programming into web development, as opposed to the current weaving of HTML, XML and CSS documents that is also sometimes referred to as programming.

Says it the best. Despite sounding interesting, this may all be a big waste of time.


Let's first look at the features of Lively Kernel a bit.
To the programmer, it's based on JavaScript, but it utilizes SVG for rendering behind the scenes.
You can have various kinds of graphical elements that you can move, rotate, morph etc. even on the fly. One thing I particularily liked was the subworlds – they act like separate desktops, providing space for more objects. If you wanted to take an object from a subworld to an another, you could simply drag it to the portal thingy.

All this works surprisingly well: The drag dropping is not glitchy like it sometimes can be, and selecting text works properly and depending on where you click, like in Photoshop for example, you can drag the text or select it.

Using purely JavaScript for writing web applications is a nice idea in theory. It can be used to simplify things like laying things out a lot and you could build reusable UI components like in Windows Forms that you can easily use on websites. Additionally, it does unify the development like the intention of the project is – You won't need to write HTML or CSS.

It also works relatively well considering it's purely JavaScript and SVG based graphics. The subworlds with less stuff in them are quite responsive to clicks and such, but the main subworld you get when entering the kernel displays the problem with the idea: JavaScript.

JavaScript is slow. I have a quite fast PC and when there was more action on the screen, it still would slow the kernel down.
Also, advanced JavaScript support like the Lively Kernel requires doesn't exist in most browsers as we can see from the supported browsers list: Safari 3 is the only browser where it works properly, and even though there's Firefox 2 mentioned in the supported browsers list, I wasn't able to get Lively working in it at all. This could of course be just because they wanted to get it working under a single browser first and will perhaps expand from there, but take Internet Explorer which doesn't even have native support for SVG…

But what about the future? This is clearly something that isn't ready yet and is just a research project like mentioned on the page. In the future, we should be getting better JavaScript… right?

Not necessarily.

There are some minor new revisions of JavaScript coming in the new versions of Firefox but that's about it for now. Small improvements are unlikely to bring much more speed to the language. A complete new version of the language and new compilers could help: Compare ActionScript 3 speeds to ActionScript 2 speeds. As a side note, there is a C/C++ to ActionScript translator too.

At the moment, we have JavaScript 1.5. Firefox 2 has 1.7, Firefox 3 will have 1.8. So why 1.5? Because Internet Explorer is stuck at 1.5 and there's no sign of moving forward. And now that Microsoft is coming with Silverlight, it's possible that they might be interested in slowing down the JavaScript progression…

If you've ever used Writely or Google Docs, you might've noticed similar things. It isn't exactly fast or as good as, say, MS Word or OpenOffice.org Write. It seems that for now the only real platform for something as rich and interactive as this is Flash and perhaps Silverlight when it matures. Try comparing Google Docs to Buzzword which is Flash and Flex based – it's much better.

One could even say that AJAX, DHTML and whatnot have been around for 7+ years already and google decided to get out the defibrillator and revive it from the dead, only for it to gain popularity for a while and then fade again…

But let's not start bashing it now, I think it's too early to seriously consider things like these. The Lively Kernel is a cool project and definitely the best implementation of a framework like this for JavaScript that I've seen so far… but it's still too early to say what will happen. We might end up in JavaScript Googolland or the era of Flashy AIR and microscopishly soft Silverware.