[Peter Fisk:VST] .NET, JSON Arrays and Smalltalk Messages

by M. David Peterson

Update: Firstly, Marcel Weiher gently reminds me of a fairly important point,

In regards to OOP -- Smalltalk is at the very foundation of classic Object Oriented Programming.

via [Vista:SmallTalk] On Alan Kay: It's *ALL* About Messaging

Smalltalk is not only NOT its syntax or the class library,
it is not even about classes. I'm sorry that I long ago
coined the term "objects" for this topic because it gets
many people to focus on the lesser idea.

The big idea is "messaging" -- that is what the kernal of
Smalltalk/Squeak is all about (and it's something that was
never quite completed in our Xerox PARC phase). The Japanese
have a small word -- ma -- for "that which is in between"
- perhaps the nearest English equivalent is "interstitial".

The key in making great and growable systems is much more to
design how its modules communicate rather than what their internal
properties and behaviors should be.

Think of the internet -- to live, it
(a) has to allow many different kinds of ideas and realizations
that are beyond any single standard and
(b) to allow varying degrees of safe interoperability between
these ideas.


Secondly, I think one of the O'Reilly servers needs a bit of a tune-up on the system clock -- Regardless of what it might seem, I promise, I didn't reply to Marcel *BEFORE* he made his original comment. ;)

None-the-less, thanks for the reminder, Marcel!

[Original Post]
As promised, Peter Fisk has followed up yesterdays post with an overview of using JSON Arrays together with Smalltalk messages,

JSON Arrays and Smalltalk Messages � Microsoft .Net and Smalltalk

JSON (Javascript Object Notation) is a simple, lightweight data-interchange format which has libraries available for most languages. Using JSON, simple arrays of objects can be sent between Vista Smalltalk sessions.

And this method in class Object can then execute the arrays as Smalltalk messages:
performArray: anArray
self perform: anArray first asSymbol withArguments: anArray withoutFirst

As an example, the TmsTicTacToe game sends two kinds of messages to the opposing player:
- a text message which appears in the chat window
- a "mark tile" message which marks a tile on the opposing player's board


For those of you who would rather chew on tinfoil than muck around with angle brackets, my guess is that this is something you will find most exciting. :)

Couple of things to note,

2 Comments

M. David Peterson
2006-11-05 22:32:19
@Marcel,


>> Welcome to Smalltalk!


Thanks! I've been a fan for a while, but the lure of Vista Smalltalk has me brushing up like there's no tomorrow :D


>> Incidentally, this is "classic" OOP...


That's actually a point well taken. Will bring this to the top of the post.


Thanks Marcel!

Marcel Weiher
2006-11-05 22:33:57
Welcome to Smalltalk!
Incidentally, this is "classic" OOP...