Recently, a new browser war has erupted all over the internet, with various browsers making massive improvements in each release to trumpet those made by others. While Firefox certainly ignited this new browser war, Chrome is the one who started the JavaScript war. The first release of Google’s web browser came with a brand new JavaScript engine that was a lot faster than those of its competitors, forcing them to improve their JavaScript performance as well. This whole JS thing has gotten to the heads of the folks at Google, and they’ve created a site for experiments which show off the power of JS.
The website, dubbed Chrome Experiments, is filled with neat and fun little experiments and games that show off the power of JavaScript. “We think JavaScript is awesome. We also think browsers are awesome. Indeed, when we talk about them, we say they are the cat’s meow – which is an American expression meaning AWESOME.” The about page reads, “In light of these deeply held beliefs, we created this site to showcase cool experiments for both JavaScript and web browsers.”
One of the cooler experiments is by Christophe Résigné, who recreated the entire Workbench interface of the original Amiga computer in JavaScript. You can manage windows, launch the CLI and process commands, and yes, he even implemented the draggable desktops feature. Pretty impressive, if you ask me.
Another impressive experiment comes courtesy of Satoshi Ueyama, who created a 3D model of an Apple iPhone-like gadget with sphere environmental mapping technique. It uses JavaScript and Canvas to render the model.
Browser Ball is quite a fun little trick. With it, you can bounce balls back and forth between windows, and have them drop from window to window. Google Gravity is also impressive; it makes all the elements of Google’s homepage drop to the bottom of the browser – and they’re still functional. Monster renders a 3D model of a morphing monster.
They might be just toys, but they do show off the power of JavaScript. Needless to say, you don’t need Chrome to get these to work.
Technology:
JavaScript, Flash
Not just javascript.
There is one (the drawing program) which uses Flash when you launch the demo in Internet Explorer… I haven’t seen another with Flash, but I haven’t seen them all.
EDIT: Ah, yes, some use Flash for the audio component.
Edited 2009-03-21 23:45 UTC
Well this is the best example of what ten years of progress has bought us. I thought that I had been impressed by something on the web this year. But now i am not so sure
–
ouch
I too share your depressed view of the world. The cause, however, is easily identifiable; proprietary technologies and patents. Both have killed anything meaningful from taking off. What happens? we’re stuck with the lowest common denominator (JavaScript) whilst technologies that would do the trick are either incomplete (Moonlight) or riddled with patents and proprietary to the gills from a vendor who hates Linux and opensource through their failure to work with third party opensource implementations (Adobe Flash).
I can’t work out why you were marked down; your negativity wasn’t towards the article or what Google was doing – just more to the general state of affairs given that in all other areas of IT there have been massive leaps and bounds forward with the web remaining akin to the horse and buggy.
Edited 2009-03-22 03:18 UTC
There is some truth to it, but it is somewhat one sided. I personally think the biggest problem currently for the Web is Microsoft, here I agree, it has managed to stall the development for almost 10 years. There are so many things useful already specced out by the w3c which never will make it thanks to Microsoft! But on the other hand the entire handling of things how the browsers do it is broken, well even the underlying protocol with its stupid get limits and distinction of put and get is broken, and last but not least nobody from the W3C was able to pull off a real component model for web parts like it would be needed for the type of applications done now all which they were able was to extend the existing forms with another bunch of input elements.
SVG+EcmaScript could have been the base for this component model, but Microsoft successfully forked it and torpedoed it!
So now where are we, we have a broken prototcol, a system of document singletons no isolation a scripting language on top of it and incompatible implementations with one market dominating vendor who gives a **** about driving the state of the art up to the levels the competition is, and ignorant users who insist of support of 10 year old obsolete buggy technology because they are too lazy to upgrade and myriads of frameworks which just exist because they try to cover this broken system and make it manageable, that is the unfortunate state of affairs!
And on top of that we have two closed semi standards which just do vendor lockins to bypass the limits of not having a decent isolation on documents and a decent UI enabled layer for more complex things, and the only one which is really open, java applets, which by now work really well are ignored because of their bad reputation deservedly earned in the early 2000s by shoddy implementations!
I’m not trying to attack you but could you explain to me how Microsoft is holding back development. I know they are quickly adding features but at the same time Microsoft could legitimise their position by simply saying that the technologies Opera, Safari, Chrome and Firefox are all draft and could change at anytime – thus it would be an expensive exercise to implement only to find massive change is needed at a later date.
I think the solution is alot simpler than what most people think. Look at the current list:
http://www.w3.org/Consortium/Member/List
No wonder the technology is still in draft stage; what Microsoft, Opera, Mozilla Foundation and Google need to do is come together and only the browser writers come up with technologies that they can all agree on and thus avoid the massive bureaucracy that exists in the w3c. Create a browser forum where the browsers – not the clingers on, make the decision for future technologies; if the browsers don’t support something then nothing else down the line matters one iota.
Microsoft have refused to implement the standard technologies for rich web content (namely DOM2/DOM3, SVG, SMIL and fast EMCAscript) for over eight years.
Lately, Microsoft has introduced (and is pushing hard) a new and incompatible technology, called Silverlight, parts of which are patented by Microsoft, to achieve the same functions that the aforementioned standards could have enabled eight years ago.
And to clarify, these technologies have been finalised and are official standards, not standards that are still in development? the reason I have to ask is because I’m not clued up on what has been put in as an official standard and which is still in development.
Here is a list of approved W3C standards:
http://en.wikipedia.org/wiki/W3c#Standards
Let’s look at DOM, because Microsoft implemented DOM, but utterly refused to go further on to DOM2 or DOM3.
http://en.wikipedia.org/wiki/Document_Object_Model#Standardization
OK, so Microsoft were “with it” as far as standards compliance goes up until some point around about 2000. Nine years ago.
Here is a list of the currently approved standards that are tested within the Acid3 compliance test.
http://en.wikipedia.org/wiki/Acid3#Standards_tested
Note the mentions of DOM 2, SVG, CSS, SMIL and the like? Most of those have been the standard for over five years, and some of them for nine years or so. IE8 (released a few days ago) scores just 20 out of 100 for this test suite, versus a score of 100 for WebKit and 94 for gecko.
Anyone who claims that Microsoft has held back web development for a decade has quite a lot of justification to support that claim.
Edited 2009-03-23 02:46 UTC
Thank you for the informative post – I’m really shocked to see how little of the standards Microsoft supports. I originally thought it might have been a couple of obscure standards but as you have proven in your post (through the links to the relevant websites) the problem is alot worse than just a couple of things missing.
Microsoft is so far behind the standards I wonder whether Microsoft would be better off replacing the Internet Explorer core with Webkit given the amount of work required to get IE up to speed would probably take months if not years to do.
Microsoft seems to be hell bent on crippling their web browser and give web developers the perception that the only way they can create rich applicatins is to use Microsofts own proprietary technolog. Quite frankly, if you are a software developer and you tell your customers, “can only work with Internet Explorer” then you deserve to sued along with Microsoft for vendor lock in and entrenching the Microsoft monopoly on the desktop.
Third parties are more guilty for their decision to only support Windows and only support Internet Explorer. All government procurement should mandate that any web based applications must be web browser agnostic; and if Internet Explorer can’t handle the new specifications used by the software, then use another browser that does support the standards.
Edited 2009-03-23 06:24 UTC
They have. It’s called the Web Hypertext Application Technology Working Group (WHATWG).
Have a look at ObjectiveJ (Cappuccino) – an Objective C into Javascript using Javascript. Try the demo at http://280slides.com/ to see what it is capable of.
There is obviously much more out there but these javascript frameworks are becoming very powerful.
For even more retro coolness, check out http://6502asm.com/ for a MOS 6502 compatible assembler and emulator written in JS!
Even with the latest Chrome beta, all the ones I’ve tried use a ton of CPU, even when nothing’s moving on the screen. It makes me wonder whether Javascript is really suitable for this sort of thing.
On the plus side, they do run smoothly.
JavaScript is not suitable for these kinds of things but their performance advantage over other browsers is impressive. I think they pushed JS to its limits.
Yet, I don’t consider that so meaningful. It took years of development to bring JS close to what Flash did years ago: smooth animation (which is what those demos are mostly about). Technologies like Flash and Silverlight are by far better than this: more polished, better design, better performance.
We have to acknowledge that Google pushed JS very far, however.
But flash is a proprietary technology, and it’s not available for real OS’s.
lol, I love the use of ‘real OS’s’
You’re correct, but I think it being proprietary (the actual executable) wouldn’t be so bad if they at least properly documented from top to bottom the Flash specification and supported third party implementations; heck, why not offer grants to opensource groups that are implementing it as well as integrating it into desktops for animation effects etc?
Moonlight does look pretty cool, however, unless it really gets alot of developers behind it, it’ll always end up beign 1 or 2 versions behind Microsoft’s own Silverlight implementation.
That’s not likely to be a problem. Aside from a few PR stunts when Silverlight 2 was released, nobody’s actually used Silverlight 2 for anything yet.
In fact, I’m not even aware of anyone using Silverlight 1 for anything aside from playing DRM-encumbered videos, which is never going to be supported on Moonlight anyway.
Never say never though; if Microsoft really want to see something work out, they will make sure of it. They might have lost the war when it came to HD-DVD versus BluRay, but at the same time they will make sure that Silverlight succeeds – even if it is just in the enterprise market as part of internal application development.
Silverlight 2 brings all kinds of magic (like ability to run Python in web browser, or access to compiled code).
I’m pretty sure Mono guys are working hard to bring Silverlight 2 to the (Linux) masses. Currently they’ve finished Silverlight 1, and it looks good.
I urge you to check the “DLRConsole” example from the following page, if you haven’t done so already:
http://silverlight.net/learn/dynamiclanguages.aspx
That’s nice, but the problem with Moonlight is that it is always going to be behind silverlight. In fact I see it getting worse and worse just as Mono falls further and further behind .Net. At least with Mono the primary purpose is a nice development environment for Linux/Unix with the bonus of being able to run on Windows and MacOS (I know MacOs is Unix underneath). Moonlight has no such benefit it needs to keep up to date with Silverluight or it is severly compromised.
Netflix?
Flash is an open source format :
http://www.adobe.com/devnet/swf/
It’s availaible for BSD :
http://www.pcbsd.org/content/view/79/30/
“Added support for linux-flashplugin9 to the default install for i386 and amd64”
—–
BSD’S predate Flash first company by 23 years …
“In January 1993, Jonathan Gay, Charlie Jackson, and Michelle Welsh started a small software company called FutureWave Software and created their first product,”
BSD’s majority of code is in proprietary software and proprietary technology … Ironic that only now some BSD want free software and Open Source , when they let there software be the creator and base of two of the mainstream OS today namely Microsoft Windows and Apple
Mac OS X.
As shown by the GNASH project and Swfdec project and others , people who want can create alternative.
Mac OS X is BSD based and enjoy full Adobe support.
Read the license. You may not use this documentation to create a compatible Flash Player. You can use it to build tools that create Flash .SWF files, but you can not use it to decode them.
So the license allows you to create and play the files. Meaning you are basically allowed to do the same thing that Adobe does. Adobe Flash creates Flash files, and the player plays them back, but swf files aren’t meant to be decoded.
Why would you need to decode the files?
OK, apparently they changed the license.
It used to specifically disallow using the spec to implement any kind of player. It was also missing all kinds of stuff, like a description of RTMP and AMF, which would have been needed to implement a compatible player, or compatible server software.
Now, it just has the rather odd contradiction of being freely available from their website, with terms attached prohibiting any kind of distribution or reproduction. Otherwise, it looks like it might actually be a useful reference.
JavaScript is not suitable for these kinds of things…
Technologies like Flash and Silverlight are by far better than this: more polished, better design, better performance.
Technicaly Flash’s scripting language(ActionScript) and JavaScript are based on the same laguage – ECMAScript.
JavaScript + SVG should be just as capable and this is the direction all major browsers except IE are going.
It’s not the language. Rather, under the hoods, technology is different. Suffice to say both Silverlight and Flash can run hardware-accelerated code while JS can’t.
I read somewhere that Google plans to run near-native JS code but until they compile it (at least to bytecode), there will still be a big performance difference.
As I said, however, there are no doubts that Google worked on their JS implementation a lot more than other companies but I understand that: JS is very important in their strategy while it has less importance to other companies.
There are (at least) two JS accelerators in the works right now. One accelerator is SquirrelFish for WebKit, and the other is TraceMonkey for gecko (Firefox).
SquirrelFish compiles Javascript to bytecode, and SquirrelFish Extreme compiles Javascript to native machine code. I’m not sure which one of these it is that Google Chrome uses.
TraceMonkey is an optimization of SpiderMonkey, and it uses an optimisation called “Trace Trees” … but I am not sure what exactly that means, apart from the fact that it too is a just-in-time (JIT) compiler for JavaScript. TraceMonkey will not be available in Firefox until release 3.1.
Edited 2009-03-23 01:17 UTC
Thanks for clarification. I think Google is going to make their own optimization engine. However, I still believe that idea to compile JS won’t make JS as perfomant as other technologies.
Reason is when I compile (even to bytecode, which is just an intermediate state) my code, it will have a huge performance gain over yet-to-compile code like JS. So if we assume Google (like other engines) will compile code before executing it, it has to do more work. And I’m assuming JS code inside a page will be compilable because what would happen if my code has a syntax error which prevents compilation? Google browser won’t find that until page is executing and then it won’t be able to compile.
Moreover, that performance delta will be bigger the more big code to compile will be (for obvious reasons). So optimizations will be welcome but I doubt that they will bring JS close to other technologies. Unless JS specifications will include a standard way (which all browsers will use) to pre-compile JS scripts, at least to bytecode.
AFAIK none. Google developed their own JavaScript engine called V8.
So 3D modelling and transformations equates with smooth animation in your mind.
I guess you’re not aware that 3D frameworks for Flash exist since years… the 3D modelling demo I saw was painfully slow even on Chrome. That’s not impressive at all to me. But if you’re impressed, ok for me…
Obviously not yet. Why would you want a software 3D engine written in Javascript when you’ve got perfectly good hardware to do that job?
But that’s because browsers have so far not exploited the full power of whatever they’re hosted on. Google obviously views the browser as an application platform – something I know a lot of people here disagree with. So they’re trying to make the browser much more capable.
I believe it’s just a case of Google looking a what people are trying to do with Javascript and improving the performance of that in their browser. How successful they will be in that endeavour has yet to be seen. I wish them luck.
The chiptune WB clone has been around for years now.
It’s still very cool for us old miggy sceners though!
I have javascript and flash disabled in my browser and this is not enough to entice me to enable it on more than a selective, case-by-case, site-by-site basis. In fact it is not even close. This will end up being just more garbage that coders will use to make the web even more tedious, slower, and awkward to use, than it legitimately needs to be.
Thom, I know it’s probably just journalistic freedom or something, but the javascript-wars were already going on between Gecko (Mozilla/Firefox) and Webkit (Safari at the time). For example Safari already had just before that releases a new and improved javascript-engine and Mozilla-guys were already busy with TraceMonkey. This is also the reason they could actually compete with Google’s Javascript-engine. IE on the other hand, was still 3 optimisation steps behind. Although there rendering isn’t to bad, which they say they focusing on is more useful.
Agreed – Chrome is nice, but it certainly didn’t play any part in starting a new browser war – Gecko, WebKit, and Opera were already going at it enthusiastically long before Google jumped in. Google is just the most recent entrant in a competition that’s been going on for a few years now… a competition I think largely inspired by the Acid2 and Acid3 tests…
The Acid2 and Acid3 tests were written by Hixie who is employed by … Google. Cheers.
javascript is nice to control SVG. I tryed to read that code but it is unreadable:
http://www.chromeexperiments.com/hosted/ballpool/js/box2d.js
They should have put some comments and stuff, and they shoud have used SVG. Sure it demonstrates how fast is chrome javascript engine, but does it matter? How fast is their SVG implementation? That is what I want to know. SVG is much more useful for those kind of apps.
I just loaded Chrome (after 2 reboots, it kept hanging) once it installed, I went to the Chromeexperiments website to see how it loaded JS really fast. Noticed it bitching about no Flash, but I moved on… Then when I tried running their experiments “Oops! This link appears broken.” Worked fine with Opera and Firefox…. slow as hell but worked. With IE it was nice and let me know it wouldn’t run on IE.
Ok, lets install FLASH under Chrome and try again. Still broken. Although I do believe it rendered the Oops! page faster than the other browsers.
Works fine for me and most other people. Did you come here looking for support or just to troll? You’re completely off topic.
I hope Google succeeds in getting more buy-in for using open standards to present “rich” content in a browser, if that is their goal. Flash is bad enough, and now I’m getting hit with “download Silverlight” from media outlets that Microsoft has paid off. So far none of that content has been compelling enough for me to actually download Silverlight (and then get it running on Linux), but I’m afraid someday it will be like Flash and YouTube.