There is a lot of hype surrounding JavaScript.

Years ago Google started the developing of V8, a super Just in time compiler for its Chrome Browser.

The V8 compiler revamped competition: Microsoft and Mozilla foundation strike back optimizing their JavaScript interpreters.

On these days, a strong community is growing using Node.js, a web server “Evented I/O [Web application server] for V8 JavaScript“. Node.js sposts a non-blocking architecture which can lead to very fast server, able to process a lot of request with a single thread.

A quick peek on the people now. Lars Bak is the leader of the V8 project. It has worked on the design of Self and on the HotSpot JIT.  Lars Bak also co authored “Mixin in StrongTalk”.

So a lot of the optimization which let  Smalltalk and Java shine, are used in the JavaScript field nowadays. It is a simple “accident” 🙂 ?…or it is destiny?

JavaScript rocks? There is plenty of documentation all around, even if the first ECMA specification was quite unreadable in my humble opinion 🙂 There are some optimal guidelines for JavaScript module writing, for instance see the manuals on JQuery plugin development. But in JavaScript you are still a free player if you wish: no rule, no even need of structuring your code in some way:

var sith={}

sith.name=”DarthVader”;

sith.name=function(){
return “Nevermind, I am a function, now”;
}

The code above builds a very generic object, and add to it properties (which could be a function).

Worst, you get very strange things, evaluting:

[1,2]+[3,4]

you got:

“1,23,4”

This because “+” is not supported for arrays, so the JavaScript  language is effectively doing…

([1,2]+””)+[3,4]

I like dynamic languages like Self, but this is somewhat too…flexible 🙂

And last but not least JavaScript lacks a true integrated developement environment, even if here we smalltalkers could help a bit 🙂

So, SmallTalk2012 is not this version of JavaScript, at least not yet; JavaScript Harmony specification is working hard trying to polishing the language…As usual, the better way to predict the future is to …invent it… So let’s give Harmony a chance!

iliad

Nicolas Petton recently announced on the squeak-dev mailing list the first public release of Iliad, which is succintly described on the Iliad website as a “a flexible, lightweight but powerful Smalltalk web framework.” Originally developed on GNU Smalltalk, but ported to Squeak/Pharo, Iliad features:

  • standalone stateful widgets
  • nice urls with a simple routing system
  • simple API
  • easy to setup and deploy (no complicated configuration step)
  • javascript layer to update widgets using AJAX. If javascript is not enabled, the behaviour remains the same by making normal requests
  • support for the Magritte meta-description framework, for simple generation of views on data

Iliad combines elements of the other leading Smalltalk web frameworks Seaside, Aida/Web and HttpView2. You can find out more about the installation and use of Iliad by reading the documentation on the Iliad site, and on the GNU Smalltalk site.

Squeak in JavaScript

Dan Ingalls working at Sun Labs has just released their first version of Morphic implemented completely with JavaScript which they are calling the Lively Kernel. There is no plugin required, but your browser currently must support SVG. You should use your Safari browser for best results. It will work with Firefox but you should expect bugs. It does not work with Internet Explorer yet.

Point your supported browser here to see this exciting work! Great Job to the team at Sun, Dan Ingalls, Tommi Mikkonen, Krzysztof Palacz, and Antero Taivalsaari.