[Pharo-project] Spec questions

Goubier Thierry thierry.goubier at cea.fr
Mon Jul 16 07:14:45 EDT 2012

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:
* 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).
* I haven't found a declarative way of setting up relations between models.
* The spec and instantiateModels syntax isn't detailed.
* I don't know how to integrate a non-spec morph and model.
* The level of customization is frightening (TreeModel defaultSpec) but 
this seems to be a Morphic problem overall.
* Exploring the generated morph hierarchy doesn't help much, due to the 
complexity linked with each morph object.
* Why isn't there is a bit of info in the HelpBrowser ? It's easier to 
read the doc this way instead of toggling between a Pharo window and a 
pdf reader.

I'll show you soon my results with spec!


Le 11/07/2012 16:25, Benjamin a écrit :
> To participate, you can:
> 	- take a random tool and rewrite it using Spec :)
> 	- read the tech report, and tell where it's clear/unclear :)
> 	- write comments ^^
> 	- just use it, and share your feedback. Then all together we can improve Spec
> 	- try to convince other people to participate :D
> Thank you in advance,
> Ben
> On Jul 11, 2012, at 4:22 PM, Goubier Thierry wrote:
>> How to participate then ?
>> Will it be possible to do maybe a simple, but "live" painter ?
>> My first contact with Morphic to do a few gui elements (such as rewritting the Nautilus GUI :-P) found the interface to be on the confusing side (multiple morphs doing the same thing, complex instantiation interface on average).
>> Thierry
>> Le 11/07/2012 14:58, Stéphane Ducasse a écrit :
>>> The plan is the following:
>>> 	- focus on really added value:
>>> 		- dynamic spec (and ben did it already). We should be able to build mac os x like finder engine
>>> 		- focus on four/five items (buttons, list, trees, text area)
>>> 			- build a first complete UIPainter something that can be used to
>>> 			place widgets on the screen and wire them.
>>> 			- we started to look again at UIBuilder in 1.0 to get what could be reused
>>> 			(for now we will probably drop the event aspect)
>>> 			- ideally the panes for widgets settings should be generated automatically
>>> 			based on some kind of meta description or spec of the widgets so that we can
>>> 			move faster
>>> 		- continue to rewrite all the tools with Spec. ChangeSorter and dualChangeSorter got into
>>> 		production.
>>> 	- continue the chapter.
>>> 	- probably some videos.
>>> Now if people want to help, there are welcome.
>>> I think that we need more users. A typical task would be to rewrite the MC tools.
>>>> Do we have Spec examples for
>>>> - menues
>>>> - lists with icons
>>>> - trees
>>>> already? What is the state and overall
>>>> plan for the near future.
>>>> Thx
>>>> T.
>> --
>> Thierry Goubier
>> CEA list
>> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
>> 91191 Gif sur Yvette Cedex
>> France
>> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

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