Monthly Archives: June 2015

Sending Smalltalk Objects Through Socket Connections

myst

In the image above:

  • on the left is a MySmalltalk desktop application
  • in the center is MySmalltalk in a Chrome browser
  • on the right is MySmalltalk in a Safari browser

The three different instances are communicating through real-time socket connections.

In the example above, I am sending Smalltalk block objects through the socket connections – the blocks are then evaluated when they are received.

The block that I sent for the test was:

[100 timesRepeat: [:x | (x * x) prn]. TicTacToeWindow open]

The block was sent from the desktop application and was executed in both browser windows almost immediately,

This is now available online at the main site: http://mysmalltalk.com.

1) open a workspace (right click on desktop for context menu).

2) X := Socket blockTest

3) X send: [‘Hello world’ prn]

You need to open separate browser windows, not tabs, for testing.

Sockets can now support channels (Socket.io namespaces) and I will be adding “rooms” in the next few days.

The socket communication system works across all instances of MySmalltalk – mobile, browser, and desktop applications.

There will be some user created online games available over the coming weeks.


Loading User Libraries

myst

Image above shows loading CalmoPuzzle

The MySmalltalk site now is capable of hosting user-owned libraries.

Over the next several days, I will be adding application management features as well to allow user-owned deployable applications from the site.

User libraries are owned by a single user but can be downloaded and shared in any web browser or desktop version of MySmalltalk.


User Library Browser

myst

Image above shows a simple user library browser.

On the server, I have added the ability to store “public user libraries”.

A public user library is owned by a single user but can be accessed by anyone on the site.

This will be mainly used for sharing class libraries (tools, games, etc) and documentation.

Also, I have added various additional Smalltalk methods to the Array, OrderedCollection, and Server classes. In particular, the “select:” and “collect:” methods for collections are very useful in transforming server data into building tables for browsing.

Yesterday, I managed to get Socket.io working with channels and rooms. So, by next week we may be able to set up some online games and chat windows.

Finally, I have added a bit more functionality to the HTML5 “Canvas” widget for graphics.

Since everything is an object (this is Smalltalk after all), it should be very easy to combine graphics, instant messaging with objects, and the various UI widgets into some interesting user experiences.


Styling and Context Menus

mysmalltalk

Above is an image showing two instances of MySmalltalk running side-by-side.

On the left is MySmalltalk running as a Chrome desktop application which was loaded from the local file system. On the right is MySmalltalk running in a Safari browser and was loaded from the MySmalltalk.com site. Both are running the exact same Smalltalk code.

In the past few days, there have been several updates:

  • the server now supports user login and registration
  • the server now support images owned by users
  • widgets can now be styled (desktop background above as an example)
  • widgets can now have context menus

The latest desktop version can be downloaded here:

https://s3.amazonaws.com/mysmalltalk/desktop/myst-latest.zip

This is the roadmap for the next couple of weeks:

  1. support for multiple images owned/shared by users
  2. real-time messaging (sending objects) using Socket.io
  3. mobile widgets and applications
  4. HTML editor

I will enable registration on the server later this week.


User Accounts

I have been working the past couple of days on adding user accounts to the server.

This will allow users to store custom images and applications under their own accounts.

Should be available online early next week.


New Widgets

myst

These are some new Qooxdoo widgets that are now available in MySmalltalk.

The “Canvas” widget encapsulates HTML5 canvas capabilities for drawing graphics.

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API

The “Table” widget displays tabular information with selectable rows and columns.

http://mysmalltalk.com/