[Pharo-project] Spec questions

Goubier Thierry thierry.goubier at cea.fr
Fri Jul 20 03:50:53 EDT 2012

Le 18/07/2012 07:26, Stéphane Ducasse a écrit :
> this is a good summary
> Ben willcertainly comment it.

Thanks. My small attempt at documenting it :-)

>> Here I come with somme feedback on Spec.
>> I tried to rebuilt an example using a tree view using spec this week-end, and it went fairly well (after a few misunderstandings).
>> So, if I summarize what Spec is :
>> * A herarchical view of models (a model is composed of submodels, where submodels may themselves be composite), up to elementary models provided by Spec.
>> * A related hierarchy of views, which are created by specs.
>> * Each model provides a defaultSpec to create the display.
>> * Each model, even a composite, must implement the following methods : initializePresenter, initializeWidgets. And use instantiateModels:!
>> * Models are linked to one another by appropriate "trigger" blocks.
>> Good points :
>> * Creating a window is very easy; just call openWithSpec.
>> * The declarative aspect of Spec methods seems nice for a GUI painter.
>> * There are enough models for a good start.
>> A bit confusing so far with Spec:
>> * Some examples have twice the submodels initialization (ClassMethodBrowser, in initialize and initializeWidgets)
>> * Two syntaxes are available in xSpec methods
>> * Two syntaxes are available in calls to instantiateModels:
> this will be fixed.

Maybe documenting both is enough; the array-based one is good for future 
tools (easy to manipulate), the code-based one is better for programmers 
(especially since the RB formatter doesn't do well, IMO, with dynamic 

>> * I don't know yet how an existing application would connect to a Spec-based GUI (i.e. I don't know how to do a M-MVC app with it).
> indeed for now not clear if we will handle that


>> * I haven't found a declarative way of setting up relations between models.
> How would it be possible?

A few objects defining more or less standard interactions (share, 
transform two-ways), with a bit of customisation and a painter for 
composite views... no ?

In it's current state, Spec is already interesting. Good work !

Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

More information about the Pharo-dev mailing list