[Pharo-project] little challenge for sven and us

Janko Mivšek janko.mivsek at eranova.si
Thu Jun 30 15:24:44 EDT 2011

S, Sven Van Caekenberghe piše:
> On 30 Jun 2011, at 17:53, Janko Mivšek wrote:
>> Because I'm just working on asynchronous no-blocking node.js like
>> control flow in Aida, I can say that this is really natural to Smalltalk
>> with its closures, much more than so called callbacks in JavaScript. In
>> Smalltalk it is more readable and you hardly notice the difference to
>> the normal Smalltalk code, while in JavaScript those callbacks are a bit
>> hard to grasp and understand. From non seasoned programmer perspective,
>> that is.
> Janko, that sounds promising, I would really love to learn more about your efforts.
> How do you do async IO without the select() system call ? As far as I know, that is not available as a VM primitive.

Currently I'm introducing those techniques in Aida not for I/O but for
tree-like control flow. One snippet from the forthcoming ToDo list
example to confirm the delete of ToDo task (see attached screenshot):

  link := e addNilLinkText: 'Delete this task'.
  link onClickPopup:
    (WebDialog newConfirm
        text: 'Do you really want to delete that task?';
	   [self observee deleteTask: aToDoTask.
	    aListElement update]).		

This is typical tree-like control flow scenario. When clicking on the
link, a popup with Yes/No confirmation appear. If Yes is clicked, true
is returned and ifTrue: block executed.

Whole point is that this is a non-blocking code, in contrast to
continuation based approach like in Seaside, where similar code would
block and wait until dialog component returns answer.

Here need to be mentioned that Iliad also use non-blocking tree-like
control flow.

Best regards

Janko Mivšek
Smalltalk Web Application Server
-------------- next part --------------
A non-text attachment was scrubbed...
Name: todo-delete.png
Type: image/png
Size: 17896 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20110630/94b31c8c/attachment.png>

More information about the Pharo-dev mailing list