Morphic for Amber

Student proposal by Matthias Springer

Second mentor: Janko Mivšek
Level: Advanced
Invited students: Matthias Springer
Students interested: Matthias Springer


Amber [1] is a Smalltalk implementation running in a web browser. It supports rendering HTML code in a Seaside-like way. But in contrast to Seaside, Amber has the advantage that the whole Smalltalk VM runs inside the browser.

My proposal is to reimplement parts of the Morphic framework in Amber.

This would have several advantages:

  • Existing Squeak/Pharo/... applications that use Morphic can be ported to Amber easily.
  • GUI application development becomes much easier. As a developer you don't have to think about HTML and CSS all the time. For complex GUI applications running in a browser, people usually use JavaScript libraries like ExtJS [2]. I think when someone decides to use Amber, we can assume that this person is already fairly familiar with Morphic.
  • GUI applications can be written entirely in Smalltalk, without JavaScript.
  • We can provide advanced programming tools like multiple class browser windows and OmniBrowser.

Technical Details

  • Morphs need to be rendered as HTML DOM elements, e.g. by the (already existing) Amber classes "HTMLCanvas" and "Widget".
  • Not all HTML tags can be reused. For instance, the HTML textbox/textarea does not support text with different formats (color, emphasis, ...).
  • DOM manipulation can be done with the JavaScript DOM API [3] or external JavaScript libraries. Amber already uses jQuery [4] for event binding and some DOM manipulations.
  • Similar (previous) work: The Lively Kernel [5] is an implementation of Morphic in JavaScript (no Smalltalk).

Benefits to the Student

  • Get to know the Smalltalk community.
  • Learn about and understand the Morphic framework. Not just how it's used but also how it works internally.
  • Discover new ways of building web application GUIs.
  • Build tools that are used by developers and end-users.

Benefits to the Community

My vision is to provide a fully-featured Smalltalk programming environment running in the browser that provides all IDE features that are offered by Squeak/Pharo. I think not all of this can be done in the scope of a GSoC project but providing a Morphic implementation would be the first step.

This project is probably most interesting for people who want to develop web-based GUI applications in Smalltalk and already know the Morphic framework. But it might also attract JavaScript developers (possibly non-Smalltalkers) and make Smalltalk and Amber more popular.

Currently, Amber lacks some IDE features. What's missing most from my point of view is a way to put multiple class browsers next to each other (instead of tabs) and refactoring features. Having such features would make software development in Amber (even more) enjoyable. With Morphic around, it is easier to port existing tools from Squeak/Pharo to Amber.

[1] http://amber-lang.net/
[2] http://www.sencha.com/products/extjs
[3] http://www.w3schools.com/jsref/
[4] http://jquery.com/
[5] http://www.lively-kernel.org/

Updated: 27.4.2013