Javascript Rocks!

January 30, 2008

Loved this article by Michael Morrison in CIO Mag – You used Javascript to write what?

The other side of the coin is the mentality of viewing a Web application as a program, as opposed to a page. In this scenario, the application is utterly dependent on the active functionality made possible by JavaScript, which means it’s okay to forego users who lack JavaScript support. Google has embraced this philosophy in several marquee products, two of which are extremely popular: Gmail and Google Maps. Both applications make extensive use of Ajax (JavaScript), and neither apologizes to users who can’t run them due to a lack of JavaScript. If this article had been written just a few short years ago, I might have used an e-mail application as the ridiculous example of when not to use JavaScript, instead of Halo. But Gmail has pushed through that barrier.

Even if JavaScript-powered, web-based e-mail ultimately takes hold, surely there are other stand-alone applications that will just never make sense in Web form. Two such applications that come to mind are video and photo editing. Similar to games, these are such media-intensive applications that they just can’t make sense in JavaScript, right? Yet Adobe has already released Premiere Express for online video editing and is putting the finishing touches on Photoshop Express for Web-based photo editing. What’s interesting about these applications is that they aren’t technically built in JavaScript; they’re built in ActionScript, a close cousin of JavaScript used in Adobe’s Flex development environment. But the ActionScript in these applications is compiled, so the net effect is more akin to a native application. Adobe may be foreshadowing the future of Web scripting to some degree, at least in terms of building more feature-rich applications. And in doing so, they’re forcing us to rethink just what is possible with scripting languages.

Don’t forget “You used PHP to write what?” and read Jesse Donat comment about PHP “Not Scalable? Ever hear of a little something called Facebook?”

Advertisements

How Javascript won the war

November 6, 2007

Just in case you thought that real men don’t program in javascript, comes an interesting overview in the Journal of Object Technology from Dave Thomas – the creator of the Eclipse IDE Platform. His basic thesis – look out for the next OS to be a webOS, one which can be developed in java or C# and exported or compiled as JS.

There are numerous JS UI frameworks which enable developers to “target” JS in the browser for delivering applications including Google Web Toolkit (GWT), Yahoo Widgets and various Ajax frameworks. A more ambitious approach is used by Morfik’s JST, which compiles applications developed using their UI builder and Basic, C#, Java or Pascal into JS Ajax.

A similar project, JSC is an experimental project to compile C# to JS.

Unfortunately, JS is not without its problems, one of which is the security risk exposed in XMLHTTP and JS/DOM interactions. These problems are due more to the DOM and Browser however. The Browser in particular is larger than many operating systems!

But surely no one would seriously consider compiling real applications to a native JS Platform. You clearly can’t do that with JavaScript! Well, if you have not been watching your RSS feed you need to read about the bleeding edge research at Sun Labs and Microsoft Live Labs.

Microsoft Live Labs Volta research project led by Erik Meijer, the father of LINQ, compiles MSIL to JS. The main goal of the Microsoft Live Labs Volta experiment is to delay irreversible decisions when building Web 2.0 applications until the last possible responsible moment. Volta allows today’s MS tools such as Visual Studio, C# and Visual Basic and applications to leap into the browser and cross platforms with zero deployment cost, optimizing for whichever execution environment (JavaScript, Silverlight) is already available on the client. Volta explores simple ways to build applications which span the internet cloud from user to data source using declarative tier-splitting refactoring.

Sun Lively is billed as a WebOS in JS. Lively leverages the impressive Squeak Morphic graphic framework to deliver applications on a JS + SVG platform. Lively is inspired by Dan Ingall’s work on Smalltalk and Squeak and no doubt by Dave Ungar’s work on Self. It provides an open, live programming experience in which the running code can be edited on the fly. The use of vector graphics enables rich new UIs that go beyond classical widgets. This brings to mind Sun NeWs, which pioneered the use of programmable vector graphics based UIs using Display Postcript and was used heavily in NextStep.