InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Smalltalk IDEs Come to the Browser: Jtalk, tODE, Lively Kernel 2.0

Posted by Werner Schuster on Aug 22, 2011

Sections
Development
Topics
Runtimes ,
Java ,
Ruby ,
Javascript ,
Websphere ,
Application Servers ,
Dynamic Languages ,
IBM ,
SmallTalk ,
IDE ,
Agile in the Enterprise ,
Companies ,
Languages ,
Programming ,
Agile ,
Lively Kernel ,
Morphic

Smalltalk implementations have always had tight integration with IDEs, starting with the very first ones created by Dan Ingalls and Alan Kay at Xerox PARC.
IDEs and developer tools have started coming to the web, eg. Cloud9, or use HTML and Javascript GUIs like RЅtudio (RStudio uses GWT) or the WebInspector that's shipped with WebKit browsers. Some Smalltalk implementations have started down that path too.

tODE is a web browser-based frontend to the capabilities in a Pharo (a version of Squeak) and GemStone Smalltalk. tODE brings HTML/Javascript versions of the various browsers (class browsers, etc) to the web browser. The tODE approach makes sense for applications written with the Smalltalk web framework Seaside; it's possible for a developer to use the web application and in case of breakpoints or exceptions makes it possible to be transported straight into the debugging tools - right there in the web browser. The tODE approach also brings inspectors to the browser to help look at the components generated by Seaside.

The first version of tODE 0.1 has just been released and currently works with Pharo and GemStone. The tODE website has a simple way of trying tODE: download the one click application which brings a Pharo VM and image set up for tODE. On launch, start tODE  and point a web browser at http://localhost:8080.
A similar approach has been tried by Cincom with WebVelocity.

Another approach to Smalltalk in the browser is to create a Smalltalk runtime that runs on the Javascript VM. Jtalk is a Smalltalk that uses the Pharo grammar (with a few modifications, eg extension for inline Javascript). The Jtalk compiler is written in Jtalk and compiles straight to Javascript. Some of the solutions of Jtalk can be traced to Avi Bryant's Clamato project, including the use of the PetitParser, a Smalltalk-based PEG parsing library written in Lukas Renggli.
As most Smalltalks, Jtalk comes with the development tools to write, read, and browse available classes; on the Jtalk website, pressing the button "Class browser" pulls up the IDE, including a REPL ("Workspace"). The beginnings of a debugger have been added to Jtalk GitHub repository. The code in the browser can be edited and committed back to a WebDAV server (see documentation on how to use JTalk with a WebDAV server).

Jtalk compiles Smalltalk code to Javascript, and as such has to deal with some of the issues of the Javascript platform. Jtalk creator Nicolas Petton explains the problems of implementing Smalltalk's DNU (doesNotUnderstand, similar to Ruby's method_missing) functionality.
In short, implementing the feature requires that all call sites need to check if a method exists in the receiver, if not it invokes the DNU specific handlers.
Gilad Bracha, one of the creators of the Newspeak language, has recently mentioned that a Javascript version of Newspeak is in the works and, as Newspeak's ancestor list includes Smallalk, has encountered the same problems and more. 
The problem is reminiscient of the problems of implementing dynamic languages on the JVM, which have recently been adressed in Java 7 with the invokedynamic bytecode and related functionality. A somewhat comparable solution for the JS platform are Dynamic Proxies, which will be included in a future version of Javascript. Early versions of Dynamic Proxy support exist in Mozilla Firefox and work on Dynamic Proxy support in Google's V8 has started too. Obviously, it will take a while until languages for Javascript VMs can rely on Dynamic Proxies being available; whether it'll take as long as Java's invokedynamic functionality remains to be seen.

Finally, another approach to bringing a Smalltalk-style IDEs to the web browser is the Lively Kernel. Created a while ago by a team around Dan Ingalls, it was moved from Oracle into its own project. The project's been silent for a while, but a recent announcement shows that Lively Kernel 2.0 has been progressing. Dan Ingalls has explained the reasons the ideas and concepts behind the original Lively Kernel, and the Lively Kernel 2.0 brings a new rendering mode for the Morphic based GUI, a new way to serialize the state of a Lively session, similar to Smallalk Images.

  • This article is part of a featured topic series on Agile
You are missing one by Erlis Vidal Posted
Re: You are missing one by Werner Schuster Posted
Nice to see Smalltak resurgence by Faisal Waris Posted
  1. Back to top

    You are missing one

    by Erlis Vidal

    This is a good one, created by Peter Fisk

    www.silversmalltalk.com/

  2. Back to top

    Re: You are missing one

    by Werner Schuster

    Yes, I've been tracking Peter's work, including QuickSilver Smalltalk (and the predecessor GWT Smalltalk: www.infoq.com/news/2009/09/javascript-compilati... as well as _its_ predecessor Vista Smalltalk).
    The reason I didn't include QuickSilver Smalltalk is that the project hasn't really seen much activity recently, at least from what I can see on the blog:
    silversmalltalk.wordpress.com/

  3. Back to top

    Nice to see Smalltak resurgence

    by Faisal Waris

    As an ex Smalltalk-er, it is nice to see that the language is still thriving.

    Looking (breifly) at the many mentioned here, I like the idea of building SPAs (single page apps) with jTalk and Lively Kernel. It seems much more sane than hacking raw HTML5 and javascript together.

Educational Content

Evolution in Data Integration From EII to Big Data

Approaches to integrating data are changing with emergence of cloud computing.

Winning Hearts and Minds: How to Embed UX from Scratch in a Large Organization

Michele Ide-Smith presents the lessons learned in the process of introducing UX principles and techniques into a large organization through a series of small steps.

LMAX Disruptor: 100K TPS at Less than 1ms Latency

Dave Farley and Martin Thompson discuss solutions for doing low-latency high throughput transactions based on the Disruptor concurrency pattern.

Thoughts on Test Automation in Agile

Rajneesh Namta shares his thoughts, experiences, and some of the critical lessons learned while implementing software test automation on a recent Agile project.

Actor Interaction Patterns

Dale Schumacher presents several patterns of actor interaction that can be used in collaborative programs written in any language.

Scalaz: Functional Programming in Scala

Rúnar Bjarnason discusses Scalaz, a Scala library of pure data structures, type classes, highly generalized functions, and concurrency abstractions to perform functional programming in Scala.

Faster, Better, Higher – But How?

One of the main challenges when designing software architecture is considering quality attributes. Not only their design turns out to be difficult, but also the specification of these attributes.

Software Naturalism - Embracing the Real Behind the Ideal

Michael Feathers analyzes real code bases concluding that code is not nearly as beautiful as designers aspire to, discussing the everyday decisions that alter the code bit by bit.