ExtJs 4.0 Class Browser

ExtJs 4.0 Class Browser


ExtJs 4.0 is an advanced JavaScript library that I have chosen as the basis for rendering QuickSilver widgets across multiple browsers and mobile devices. It support SVG graphics, flexible data models, and dynamic component loading.

Currently, I am porting QuickSilver from ExtJs 3.3 to ExtJs 4.0. There has been a complete rewrite of much of the library and this has resulted in a great deal of work in migrating the Smalltalk widget libraries.

ExtJs 4.0 has a new class system which is more similar to the Smalltalk class system.

As an exercise, I tried building (in JavaScript) a Smalltalk-style class browser for the native ExtJs classes and the tool works quite well. In fact, it is very similar to tools currently being built by Dan Ingalls (who created both Squeak and the original Smalltalk-72 and Smalltalk-80).


Smalltalk has long had the reputation for being a highly productive language. I keep wondering whether the productivity has been due to the simple language syntax or to the powerful tools available in the environment. It seems that Dan Ingalls has built a complete Smalltalk development environment
using JavaScript as the only language.

Smalltalk tools for JavaScript? I would be glad to hear your thoughts.


An article from a game developer publication:


At the Game Developers Conference last week, Electronic Arts and now Digital Chocolate (Millionaire City) founder Trip Hawkins worried that evolutions in the multiplatform space would pose major challenges for developers trying to earn money in emerging spaces.

The explosion of browsers onto mobile devices and the rise of cloud-based gaming can take much of the credit for why Hawkins, who was also Apple’s director of marketing prior to founding EA, believes that it’ll end up the game industry’s most central platform.

The browser has taken over 2 billion PCs–it’s going to be taking over a billion tablets over the next few years, billions of mobile devices,” he says.

And it’ll even enter new areas: “It will end up in my opinion very strong on the television. The browser is the platform of the future,” Hawkins adds.

Cloud-based rendering is increasingly enabling consumers to access content from a number of devices whether or not they own that content, thus “there is going to be enormous growth there,” he says.

Consumers will be able to integrate that content more persistently in their daily lives and want to remain engaged with it, versus traditionally when content was segregated to the living room or to a single computer.

He is saying what I have repeated several times in this blog – the application platform has moved from the desktop to the browser/tablet/phone connected to the Internet. And this trend will continue and accelerate.

QuickSilver runs in any JavaScript environment and is deployed from a cloud infrastructure (Google’s App Engine).

QuickSilver is an open source (MIT license) Smalltalk-to-JavaScript compiler that is entirely implemented in JavaScript.

It is designed to be deployed in client applications (any browser with JavaScript enabled) or on a Java server supporting the Rhino JavaScript environment.

I have now been working with QuickSilver for several weeks and these are my observations:

Major Bugs
There are two major bugs that I am aware of:

1) “self” within blocks does not work correctly.
There is an untested compiler fix for the problem.

2) there seems sometimes to be a problem associated with “super”.
I need to develop some test cases to clarify the circumstances.

Other Bugs

Smalltalk indexing is implemented as 0-based; should be changed to 1-based

Useful Syntax

The design decision to allow native JavaScript code within braces {} has proved extremely flexible and easy to use. It enables several shortcuts missing from standard Smalltalk syntax such as the ability to easily initialize arrays and dictionaries.

Programming Smalltalk versus JavaScript

My personal experience of the two languages is that programming in Smalltalk is much more intuitive and productive than programming in JavaScript.

JavaScript has the advantage of being almost universally deployed on client devices.

Smalltalk has the advantage of more closely reflecting the way that humans model the world.

QuickSilver was designed to enable programming in Smalltalk while developing in a JavaScript environment. And, it seems to be well on its way to fulfilling that promise – but, since I am the creator of QuickSilver, perhaps I am slightly biased 🙂

The site http://www.silversmalltalk.com is hosted on Google’s Application Engine and runs in a Java environment.

Besides Java, there are several other languages available which run on the JVM:

  • BeanShell
  • Clojure
  • Groovy
  • JavaScript (Rhino)
  • Python (JPython)
  • Ruby (JRuby)
  • Scala
  • Scheme


I have added support in the QuickSilver server code for server-side JavaScript scripting.

This opens a number of interesting possibilities:

1) QuickSilver can run on the Google servers

QuickSilver compiles Smalltalk to JavaScript source which can be compiled or interpreted by Rhino.

2) QuickSilver can support serialization on the server

Having an interactive session with a server scripting language requires that the language be able to save its state (serialized to the Memcache) between requests. Some languages can do this (C-Python, Clojure, Scheme) and others cannot. Unfortunately, JavaScript (Rhino) cannot serialize its state. However, QuickSilver should be able to maintain serialized state on the server because already stores JavaScript function source in its “CompiledMethod” objects – JavaScript functions can be instantiated only when a method is called (lazy evaluation).

3) Data and Functions can be exchanged between client and server with minimal encoding

JavaScript on both the client and server will greatly simplify client-server programming.

4) JavaScript on the server will facilitate dynamic data declarations for the database

Google’s “Big Table” database is a distributed key-value datastore (IIRC, so is Amazon’s S3 database) that does not use schemas.

What I have in mind here is using Smalltalk to directly define and manage data records.

Here is an blog post about a group doing something very similar with Clojure.

Google’s App Engine is massively scalable, very cheap to run (free for small projects), and supports instant messaging using sockets.

If we can build a comprehensive set of tools – including GUI designers and database browsers – in QuickSilver, it will open the door to building whole new classes of applications.

QuickSilver Smalltalk Project at Google Code

QuickSilver Smalltalk Project at Google Code


I have committed the latest JavaScript code for QuickSilver to SVN at the Google project site. The project uses the MIT license.

My development environment is Eclipse (Helios) for JavaScript and I use “SubEclipse” for synchronizing with the SVN repository.

Several people have indicated a desire to participate in the QuickSilver project. Please send me a request to participate at silverlight.smalltalk@gmail.com or post a message in the newsgroup at http://groups.google.com/group/silversmalltalk.

This project will focus on the QuickSilver JavaScript compiler.

I will be setting up two additional projects:

1) QuickSilver Server

This project will provide server implementations which are designed specifically to support QuickSilver clients:

  1. Java server for Google App Engine
  2. Python server for Google App Engine
  3. PHP/MySql example server

2) QuickSilver Smalltalk Libraries

Smalltalk source libraries for QuickSilver tools and utilities.

Scalable Vector Graphics in JavaScript

Scalable Vector Graphics in JavaScript



ExtJs 4.0 will be released on Feb 28.

It contains several new capabilities including the ability to draw SVG graphics using only JavaScript (no need for Flash).

And, of course, QuickSilver will immediately be able to make use of these new capabilities.

I said in an earlier post that new programming languages often succeeded when there were major shifts in technology.

IMHO, we are at the beginning of several concurrent technology changes right now:

  • the growth of scalable, pay-for-use server resources (buzzword “cloud computing”)
  • cheap, scalable real-time messaging (eg Google ChannelAPI)
  • much better JavaScript VM’s
  • HTML5 capabilities in newest browsers
  • new form factors such as smart phones, iPads, and e-readers
  • new library capabilities such as SVG in JavaScript

There seems to be a faster pace of change right now than at any time since the mid-1990’s.

The perfect time to launch a new version of Smalltalk.

QuickSilver Version 0.7

QuickSilver Version 0.7


Above is version 0.7 of QuickSilver running in a Firefox browser. Note that QuickSilver is now running the home page of the site. QuickSilver Smalltalk is now 12 days old.

QuickSilver now supports events and callbacks and is stable enough that I have moved it to the site home page.

Source code can be downloaded here.

These are the changes to the site over the next two days:

  1. Developer sign-in
  2. Instant messaging demo
  3. News Bulletin Window
  4. Developer Forum Window

Also, I will be adding SVN support to the QuickSilver Smalltalk project on Google.

Alan Kay once said that the best way to predict the future is to invent it.

QuickSilver Smalltalk aims to invent the future of online communication using Smalltalk.

And the Silver Smalltalk site will be the first to use the new technologies.