Learning Spec

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Learning Spec

Sven Van Caekenberghe-2
Hi,


From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.


There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):

  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG

The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).


This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:

  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html


Look in the image.

Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.

The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.


The cool Spec website:

  http://spec.st


Read some cool articles like:

https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999

See the section 'HP35CalculatorModel' for the Spec part.


The following papers (some older ones refer to API that has changed):

'Seamless Composition and Reuse of Customizable User Interfaces with Spec'

  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf

'Spec - A Framework for the Specification and Reuse of UIs and their Models'

  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf

'Spec – Technical Report'

  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf


Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.


Have fun !


Sven


PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.


--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sven Van Caekenberghe-2
Two more:

'Building a Simple Calculator with Spec'

  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoReadyForReviews/lastSuccessfulBuild/artifact/CalculatorTutorial/CalculatorTutorial.pier.html

'Dynamic Spec: Parties, a dynamic example'

https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/DynamicSpec/DynamicSpec.pier.html

And I am sure there are more.

> On 13 Feb 2015, at 10:12, Sven Van Caekenberghe <[hidden email]> wrote:
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
>  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
>  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
>  http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>
> 'Spec – Technical Report'
>
>  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

jfabry
In reply to this post by Sven Van Caekenberghe-2

Excellent mails, Sven. Thanks a lot for joining all the info in one place!

> On Feb 13, 2015, at 10:12, Sven Van Caekenberghe <[hidden email]> wrote:
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
>  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
>  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
>  http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>
> 'Spec – Technical Report'
>
>  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sebastian Heidbrink-2
In reply to this post by Sven Van Caekenberghe-2
Hallo Sven,

thank you for the video link, google linked me to a video from 2013 that
was not recorded in a way that once could follwo the presentation.
This one is super.

Well, I think I am slowly getting there and I can more and more provide
you with the uneccessary barries of Spec that I encountered.

In the talk at 15:35 min Johan mentions the need of a interpreter and
this method is mentionded several times during the talk.
Browse your Pharo image,.... there is none!
So what is misleading in the current Spec implementation and the
examples is the follwong fact.
The developer is confronted with Model classes that actually are
ViewModels.
Actions for buttons are implemented in Blocks which gives the developer
intially the feeling that Control Layer and Model/ViewModel layer are one.
The SpecDefinitions do not work properly in my case and Stephan just
found out some issues with font sizes,.... well I have Moose and Roassal
in my image and my fonts are no more default .... well my fault. I just
hope I will still be able to somehow find a solution for this issue.
And last but not least, the all examples have no interpreter/control or
real model layer....
This is why I think it would be very helpful for beginners to have one
example, like a sushi store, where one can actually see how an
application is built through all the layers....

Sushi store?! Well, That was an example for a demo that show cases a
whole technology.
And I meant exactly some thing like the HPCalculator!

Well, I need to do some tests based on what I 've learnt now,.... I have
no idea about adaptors, yet, but it seems they need to be understod a
little later....
Is there a project/repository where one could push code to give other
the chance to review and chance it before it is published as a "demo" or
example?

Sebastian



Am 13.02.2015 um 01:12 schrieb Sven Van Caekenberghe:

> Hi,
>
>
>  From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
>    http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
>    https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
>    http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
>    http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
>    http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>
> 'Spec – Technical Report'
>
>    http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sebastian Heidbrink-2
By the way,.... this is why I am pushing so hard.

https://makerspacenanaimo.org/software-smalltalk-night/

Sebastian



Am 13.02.2015 um 09:49 schrieb Sebastian Heidbrink:

> Hallo Sven,
>
> thank you for the video link, google linked me to a video from 2013
> that was not recorded in a way that once could follwo the presentation.
> This one is super.
>
> Well, I think I am slowly getting there and I can more and more
> provide you with the uneccessary barries of Spec that I encountered.
>
> In the talk at 15:35 min Johan mentions the need of a interpreter and
> this method is mentionded several times during the talk.
> Browse your Pharo image,.... there is none!
> So what is misleading in the current Spec implementation and the
> examples is the follwong fact.
> The developer is confronted with Model classes that actually are
> ViewModels.
> Actions for buttons are implemented in Blocks which gives the
> developer intially the feeling that Control Layer and Model/ViewModel
> layer are one.
> The SpecDefinitions do not work properly in my case and Stephan just
> found out some issues with font sizes,.... well I have Moose and
> Roassal in my image and my fonts are no more default .... well my
> fault. I just hope I will still be able to somehow find a solution for
> this issue.
> And last but not least, the all examples have no interpreter/control
> or real model layer....
> This is why I think it would be very helpful for beginners to have one
> example, like a sushi store, where one can actually see how an
> application is built through all the layers....
>
> Sushi store?! Well, That was an example for a demo that show cases a
> whole technology.
> And I meant exactly some thing like the HPCalculator!
>
> Well, I need to do some tests based on what I 've learnt now,.... I
> have no idea about adaptors, yet, but it seems they need to be
> understod a little later....
> Is there a project/repository where one could push code to give other
> the chance to review and chance it before it is published as a "demo"
> or example?
>
> Sebastian
>
>
>
> Am 13.02.2015 um 01:12 schrieb Sven Van Caekenberghe:
>> Hi,
>>
>>
>>  From now on it is forbidden to complain about Spec in general,
>> unspecific terms unless you have taken the time to learn about it.
>> Here is a guide to documentation about Spec, most recent first.
>>
>>
>> There is an excellent presentation by Johan Fabry did during the last
>> Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is
>> not yet fully public, but soon will be, the link should work though):
>>
>> http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>>
>> The slides are also not yet available, but soon will be (the talk is
>> much better that the slides on their own).
>>
>>
>> This draft chapter 'Spec: a framework for describing user interfaces'
>> for an upcoming book:
>>
>> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>>
>>
>> Look in the image.
>>
>> Browse the hierarchy below AbstractWidgetModel in the category
>> Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol'
>> & 'protocol-events' mainly. Look for references to each class. Trace
>> senders of methods until you arrive at examples. Study the examples,
>> play with them, change them.
>>
>> The UI of most tools in Pharo is also implemented using Spec. Browse
>> the hierarchy below ComposableModel to find them. (Komitter,
>> Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch
>> and learn.
>>
>>
>> The cool Spec website:
>>
>>    http://spec.st
>>
>>
>> Read some cool articles like:
>>
>> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999 
>>
>>
>> See the section 'HP35CalculatorModel' for the Spec part.
>>
>>
>> The following papers (some older ones refer to API that has changed):
>>
>> 'Seamless Composition and Reuse of Customizable User Interfaces with
>> Spec'
>>
>> http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>>
>> 'Spec - A Framework for the Specification and Reuse of UIs and their
>> Models'
>>
>> http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>>
>> 'Spec – Technical Report'
>>
>> http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>>
>>
>> Use the image to build a couple of simple UIs using Spec. You will be
>> surprised to learn that it is not that difficult. Just go with the
>> flow, don't try to enforce your world view on it, wait until you are
>> further along.
>>
>>
>> Have fun !
>>
>>
>> Sven
>>
>>
>> PS: Once you have done all the above, you are most welcome to help
>> improve Spec by discussing specific, concrete issues.
>>
>>
>> --
>> Sven Van Caekenberghe
>> Proudly supporting Pharo
>> http://pharo.org
>> http://association.pharo.org
>> http://consortium.pharo.org
>>
>>
>>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sven Van Caekenberghe-2

> On 13 Feb 2015, at 19:06, Sebastian Heidbrink <[hidden email]> wrote:
>
> By the way,.... this is why I am pushing so hard.
>
> https://makerspacenanaimo.org/software-smalltalk-night/
>
> Sebastian

Cool.

> Am 13.02.2015 um 09:49 schrieb Sebastian Heidbrink:
>> Hallo Sven,
>>
>> thank you for the video link, google linked me to a video from 2013 that was not recorded in a way that once could follwo the presentation.
>> This one is super.
>>
>> Well, I think I am slowly getting there and I can more and more provide you with the uneccessary barries of Spec that I encountered.
>>
>> In the talk at 15:35 min Johan mentions the need of a interpreter and this method is mentionded several times during the talk.
>> Browse your Pharo image,.... there is none!
>> So what is misleading in the current Spec implementation and the examples is the follwong fact.
>> The developer is confronted with Model classes that actually are ViewModels.
>> Actions for buttons are implemented in Blocks which gives the developer intially the feeling that Control Layer and Model/ViewModel layer are one.
>> The SpecDefinitions do not work properly in my case and Stephan just found out some issues with font sizes,.... well I have Moose and Roassal in my image and my fonts are no more default .... well my fault. I just hope I will still be able to somehow find a solution for this issue.
>> And last but not least, the all examples have no interpreter/control or real model layer....
>> This is why I think it would be very helpful for beginners to have one example, like a sushi store, where one can actually see how an application is built through all the layers....
>>
>> Sushi store?! Well, That was an example for a demo that show cases a whole technology.
>> And I meant exactly some thing like the HPCalculator!
>>
>> Well, I need to do some tests based on what I 've learnt now,.... I have no idea about adaptors, yet, but it seems they need to be understod a little later....
>> Is there a project/repository where one could push code to give other the chance to review and chance it before it is published as a "demo" or example?
>>
>> Sebastian
>>
>>
>>
>> Am 13.02.2015 um 01:12 schrieb Sven Van Caekenberghe:
>>> Hi,
>>>
>>>
>>> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>>>
>>>
>>> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>>>
>>> http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>>>
>>> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>>>
>>>
>>> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>>>
>>> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>>>
>>>
>>> Look in the image.
>>>
>>> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>>>
>>> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>>>
>>>
>>> The cool Spec website:
>>>
>>>   http://spec.st
>>>
>>>
>>> Read some cool articles like:
>>>
>>> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999 
>>>
>>> See the section 'HP35CalculatorModel' for the Spec part.
>>>
>>>
>>> The following papers (some older ones refer to API that has changed):
>>>
>>> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>>>
>>> http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>>>
>>> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>>>
>>> http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>>>
>>> 'Spec – Technical Report'
>>>
>>> http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>>>
>>>
>>> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>>>
>>>
>>> Have fun !
>>>
>>>
>>> Sven
>>>
>>>
>>> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>>>
>>>
>>> --
>>> Sven Van Caekenberghe
>>> Proudly supporting Pharo
>>> http://pharo.org
>>> http://association.pharo.org
>>> http://consortium.pharo.org
>>>
>>>
>>>
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sven Van Caekenberghe-2
In reply to this post by Sebastian Heidbrink-2

> On 13 Feb 2015, at 18:49, Sebastian Heidbrink <[hidden email]> wrote:
>
> Hallo Sven,
>
> thank you for the video link, google linked me to a video from 2013 that was not recorded in a way that once could follwo the presentation.
> This one is super.
>
> Well, I think I am slowly getting there and I can more and more provide you with the uneccessary barries of Spec that I encountered.
>
> In the talk at 15:35 min Johan mentions the need of a interpreter and this method is mentionded several times during the talk.
> Browse your Pharo image,.... there is none!

The class is called SpecInterpreter. But this is an implementation detail, not related to application logic.

> So what is misleading in the current Spec implementation and the examples is the follwong fact.
> The developer is confronted with Model classes that actually are ViewModels.
> Actions for buttons are implemented in Blocks which gives the developer intially the feeling that Control Layer and Model/ViewModel layer are one.
> The SpecDefinitions do not work properly in my case and Stephan just found out some issues with font sizes,.... well I have Moose and Roassal in my image and my fonts are no more default .... well my fault. I just hope I will still be able to somehow find a solution for this issue.

Specs certainly work. The font stuff also works, it is just not complete (enough) (yet), but it is good enough.

> And last but not least, the all examples have no interpreter/control or real model layer....

But you are looking too far: your domain model is just an object, its behaviour is the control layer, it uses announcements to signal changes.

> This is why I think it would be very helpful for beginners to have one example, like a sushi store, where one can actually see how an application is built through all the layers....

But again, there is no 'one' thing, there are many options, styles.

> Sushi store?! Well, That was an example for a demo that show cases a whole technology.
> And I meant exactly some thing like the HPCalculator!

I understand the need. I did my part with the HP35, with a clear model and 2 UI's sharing 1 specification as well as unit tests on 2 levels.

But like I said, there are lots of real world examples inside and outside the image.

> Well, I need to do some tests based on what I 've learnt now,.... I have no idea about adaptors, yet, but it seems they need to be understod a little later....
> Is there a project/repository where one could push code to give other the chance to review and chance it before it is published as a "demo" or example?

You could just start a new repo on smalltalkhub.com or even github.com

> Sebastian
>
>
> Am 13.02.2015 um 01:12 schrieb Sven Van Caekenberghe:
>> Hi,
>>
>>
>> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>>
>>
>> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>>
>>   http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>>
>> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>>
>>
>> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>>
>>   https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>>
>>
>> Look in the image.
>>
>> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>>
>> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>>
>>
>> The cool Spec website:
>>
>>   http://spec.st
>>
>>
>> Read some cool articles like:
>>
>> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>>
>> See the section 'HP35CalculatorModel' for the Spec part.
>>
>>
>> The following papers (some older ones refer to API that has changed):
>>
>> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>>
>>   http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>>
>> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>>
>>   http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>>
>> 'Spec – Technical Report'
>>
>>   http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>>
>>
>> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>>
>>
>> Have fun !
>>
>>
>> Sven
>>
>>
>> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>>
>>
>> --
>> Sven Van Caekenberghe
>> Proudly supporting Pharo
>> http://pharo.org
>> http://association.pharo.org
>> http://consortium.pharo.org
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sebastian Heidbrink-2
Hi Sven,

I am still a little confused about the terminologies so please give one
last kick into the right direction.
I have loaded the Calculator and try to map thingssaid to the
implementation.

Am 13.02.2015 um 11:04 schrieb Sven Van Caekenberghe:
>
>
> In the talk at 15:35 min Johan mentions the need of a interpreter and this method is mentionded several times during the talk.
> Browse your Pharo image,.... there is none!
> The class is called SpecInterpreter. But this is an implementation detail, not related to application logic.

Well, no he did not mean the SpecInterpreter he ment the
receiver/interpreter of an action like a mouse click here. And exactly
this link is missing through out the examples.... and makes SPEC so hrad
to understand.

>
>> And last but not least, the all examples have no interpreter/control or real model layer....
> But you are looking too far: your domain model is just an object, its behaviour is the control layer, it uses announcements to signal changes.

Looking at the HP35CalculatorModel implementation I think that is what
you mean. But I honestly would have expected a class naming like
HP35CalculatorApplicationFunction, HP35CalculatorController, or
HP35CalculatorComponent or just HP35Calculator instead of
HP35CalculatorModel...

For me a model is a stupid structure. Somehting that knows what it
contains and how to describe itself,... but has no real functionality or
mechnisms in it.
Extreem example is a DataModel,....

Now since Spec is more a MVVM framework, I assumed that I have to make
the distinction between Control/Businesslogic and Model on my own.
I prefer this distinction because once a project grows it is much eaiser
to navigate, maintian and even port to different architectures like
webclient, server app, desktop app....


>
> ing like the HPCalculator!
> I understand the need. I did my part with the HP35, with a clear model and 2 UI's sharing 1 specification as well as unit tests on 2 levels.
>
> But like I said, there are lots of real world examples inside and outside the image.

How can one find them? I was not aware of the fact that the spec example
HP53 was on smaltlakhub. Somehow it is very difficult to find projects
on Smalltakhub.... all the projects have tags, but somehow I can't find
a search or tool that allows me to search smalltalkhub for certain tags.

> You could just start a new repo on smalltalkhub.com or even github.com

Well, I would love, too once I know that I have somehow understood the
basics ;-)
I simply do not want to run into the wrong direction and realize that
all my efforts where for nothing.
And I, and that is even more importatn, do not want to tell newcomers
how to do it and send them into the wrong direction...


Give me some time and I'll try to come up with a little application that
we could use to discuss on.

sebastian



Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

jfabry
In reply to this post by Sebastian Heidbrink-2

To clarify: in my talk when I mention the interpreter, this has nothing to do with Spec. This is something specific to the example (= a complete IDE for a programming language for robots … with its interpreter), so I did not want to talk about because in the end it has no relevance to the story.

> On Feb 13, 2015, at 18:49, Sebastian Heidbrink <[hidden email]> wrote:
>
> In the talk at 15:35 min Johan mentions the need of a interpreter and this method is mentionded several times during the talk.
> Browse your Pharo image,.... there is none!



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

jfabry
In reply to this post by Sebastian Heidbrink-2

As I say in my talk, there are a bunch of completely working examples already in the image. Please have a look at the subclasses of ComposableModel I think that there should be enough examples there to help you understand how a full application is built.

> On Feb 13, 2015, at 18:49, Sebastian Heidbrink <[hidden email]> wrote:
>
> This is why I think it would be very helpful for beginners to have one example, like a sushi store, where one can actually see how an application is built through all the layers....



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sebastian Heidbrink-2
In reply to this post by jfabry
Thank for clarifiying this.

The the interpreter would be the arrow from the ViewModel (ComposableModel) to the Model...



So Spec is the Blue stuff and the HP35 example is including the orange part.

Is there already a framework available or somebody working on it to have a more detailed Model? A infrastructure that devides BusinessLogic and Data?

If so then I would try to built an example based on both. If not,,... well then I still need some time to dabble around...

Sebastian


Am 13.02.2015 um 13:01 schrieb Johan Fabry:
To clarify: in my talk when I mention the interpreter, this has nothing to do with Spec. This is something specific to the example (= a complete IDE for a programming language for robots … with its interpreter), so I did not want to talk about because in the end it has no relevance to the story. 

On Feb 13, 2015, at 18:49, Sebastian Heidbrink [hidden email] wrote:

In the talk at 15:35 min Johan mentions the need of a interpreter and this method is mentionded several times during the talk.
Browse your Pharo image,.... there is none!

---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Peter Uhnak
So Spec is the Blue stuff and the HP35 example is including the orange part.
 
Just the light blue, no? I thought the dark blue (VIew) is Morpic.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sebastian Heidbrink-2
I ment both blue parts

Sebastian

Am 14.02.2015 um 01:56 schrieb Peter Uhnák:
So Spec is the Blue stuff and the HP35 example is including the orange part.
 
Just the light blue, no? I thought the dark blue (VIew) is Morpic.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Adventurer
In reply to this post by Sven Van Caekenberghe-2
Hi Sven,

I count myself as a beginner with Pharo, although I've been dabbling with Pharo UI choices for a few months now.
Like Sebastian, I wrote Spec off as too immature for prime-time, but I too come from the commercial
world, so maybe my expectations were unrealistic.

So I took the time to learn Spec.  My very first requirement is to display some data in a grid or table like manner, so I took a look at the TreeModel, and tried to adapt one of the examples to fit.  However, whenever I try to add a third column to the model, I get a "Subscript Out of Bounds".
I also tried to change the oddRowColor, but it had no effect.

I hope that is specific enough for you.

Craig

-----Original Message-----
From: Pharo-users [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe
Sent: 13 February 2015 11:12 AM
To: Any question about pharo is welcome
Subject: [Pharo-users] Learning Spec

Hi,


From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.


There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):

  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG

The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).


This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:

  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html


Look in the image.

Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.

The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.


The cool Spec website:

  http://spec.st


Read some cool articles like:

https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999

See the section 'HP35CalculatorModel' for the Spec part.


The following papers (some older ones refer to API that has changed):

'Seamless Composition and Reuse of Customizable User Interfaces with Spec'

  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf

'Spec - A Framework for the Specification and Reuse of UIs and their Models'

  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf

'Spec – Technical Report'

  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf


Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.


Have fun !


Sven


PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.


--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org



Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Ben Coman
Thanks Craig.  Can you fileout a minimal code script to reproduce these errors in a fresh image? Either post here or even better, open an issue at https://pharo.fogbugz.com with the fileout attached at paste the link to the issue here.
cheers -ben

On Mon, Feb 16, 2015 at 5:36 AM, Craig <[hidden email]> wrote:
Hi Sven,

I count myself as a beginner with Pharo, although I've been dabbling with Pharo UI choices for a few months now.
Like Sebastian, I wrote Spec off as too immature for prime-time, but I too come from the commercial
world, so maybe my expectations were unrealistic.

So I took the time to learn Spec.  My very first requirement is to display some data in a grid or table like manner, so I took a look at the TreeModel, and tried to adapt one of the examples to fit.  However, whenever I try to add a third column to the model, I get a "Subscript Out of Bounds".
I also tried to change the oddRowColor, but it had no effect.

I hope that is specific enough for you.

Craig

-----Original Message-----
From: Pharo-users [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe
Sent: 13 February 2015 11:12 AM
To: Any question about pharo is welcome
Subject: [Pharo-users] Learning Spec

Hi,


From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.


There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):

  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG

The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).


This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:

  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html


Look in the image.

Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.

The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.


The cool Spec website:

  http://spec.st


Read some cool articles like:

https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999

See the section 'HP35CalculatorModel' for the Spec part.


The following papers (some older ones refer to API that has changed):

'Seamless Composition and Reuse of Customizable User Interfaces with Spec'

  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf

'Spec - A Framework for the Specification and Reuse of UIs and their Models'

  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf

'Spec – Technical Report'

  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf


Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.


Have fun !


Sven


PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.


--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org




Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Sven Van Caekenberghe-2
In reply to this post by Adventurer
This is the easiest way that I know to show a simple table.

MultiColumnListModel new
  items: #(('x coordinate' 'y coordinate' 'z coordinate')(1 2 3)(4 5 6)(7 8 9));
  displayBlock: [ :x | x collect: #asString ];
  setSelectedIndex: 2;
  title: 'My table';
  openWithSpec.

> On 15 Feb 2015, at 22:36, Craig <[hidden email]> wrote:
>
> Hi Sven,
>
> I count myself as a beginner with Pharo, although I've been dabbling with Pharo UI choices for a few months now.
> Like Sebastian, I wrote Spec off as too immature for prime-time, but I too come from the commercial
> world, so maybe my expectations were unrealistic.
>
> So I took the time to learn Spec.  My very first requirement is to display some data in a grid or table like manner, so I took a look at the TreeModel, and tried to adapt one of the examples to fit.  However, whenever I try to add a third column to the model, I get a "Subscript Out of Bounds".
> I also tried to change the oddRowColor, but it had no effect.
>
> I hope that is specific enough for you.
>
> Craig
>
> -----Original Message-----
> From: Pharo-users [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe
> Sent: 13 February 2015 11:12 AM
> To: Any question about pharo is welcome
> Subject: [Pharo-users] Learning Spec
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
>  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
>  https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
>  http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>
> 'Spec – Technical Report'
>
>  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Nicolai Hess
Another example, (modified TreeModel example)

|r m col1 col2 col3|
r := FileLocator vmDirectory.
    m := TreeModel new.
    m roots: r allFiles.
    m rootNodeHolder: [ :item |
        TreeNodeModel new
            content: item;
            icon: Smalltalk ui icons smallLeftFlushIcon
    ];
    title: r fullName.
    col1 := TreeColumnModel new
        displayBlock: [ :node | node content basename ];
        headerLabel:'Name'.       
    col2 := TreeColumnModel new
        displayBlock: [ :node | node content creationTime ];
        headerLabel:'Time'.
    col3 := TreeColumnModel new
        displayBlock: [ :node | node content permissions];
        headerLabel:'Permissions'.
    m columns: {col1. col2 . col3}.
    m openWithSpec.




2015-02-15 23:30 GMT+01:00 Sven Van Caekenberghe <[hidden email]>:
This is the easiest way that I know to show a simple table.

MultiColumnListModel new
  items: #(('x coordinate' 'y coordinate' 'z coordinate')(1 2 3)(4 5 6)(7 8 9));
  displayBlock: [ :x | x collect: #asString ];
  setSelectedIndex: 2;
  title: 'My table';
  openWithSpec.

> On 15 Feb 2015, at 22:36, Craig <[hidden email]> wrote:
>
> Hi Sven,
>
> I count myself as a beginner with Pharo, although I've been dabbling with Pharo UI choices for a few months now.
> Like Sebastian, I wrote Spec off as too immature for prime-time, but I too come from the commercial
> world, so maybe my expectations were unrealistic.
>
> So I took the time to learn Spec.  My very first requirement is to display some data in a grid or table like manner, so I took a look at the TreeModel, and tried to adapt one of the examples to fit.  However, whenever I try to add a third column to the model, I get a "Subscript Out of Bounds".
> I also tried to change the oddRowColor, but it had no effect.
>
> I hope that is specific enough for you.
>
> Craig
>
> -----Original Message-----
> From: Pharo-users [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe
> Sent: 13 February 2015 11:12 AM
> To: Any question about pharo is welcome
> Subject: [Pharo-users] Learning Spec
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>
> 'Spec – Technical Report'
>
http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Adventurer

Nicolai,

 

This code works perfectly.

 

This is pretty-much exactly what I did.  Except that I left the m openWithSpec message send where it was in the example, just before instantiating the columns.  (see below)

The example clearly needs updating.

 

The way that you did it makes perfect sense, thank you.

 

Craig

 

From: Pharo-users [mailto:[hidden email]] On Behalf Of Nicolai Hess
Sent: 16 February 2015 01:03 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Learning Spec

 

Another example, (modified TreeModel example)

|r m col1 col2 col3|
r := FileLocator vmDirectory.
    m := TreeModel new.
    m roots: r allFiles.
    m rootNodeHolder: [ :item |
        TreeNodeModel new
            content: item;
            icon: Smalltalk ui icons smallLeftFlushIcon
    ];
    title: r fullName.

  m openWithSpec.


    col1 := TreeColumnModel new
        displayBlock: [ :node | node content basename ];
        headerLabel:'Name'.       
    col2 := TreeColumnModel new
        displayBlock: [ :node | node content creationTime ];
        headerLabel:'Time'.
    col3 := TreeColumnModel new
        displayBlock: [ :node | node content permissions];
        headerLabel:'Permissions'.
    m columns: {col1. col2 . col3}.




2015-02-15 23:30 GMT+01:00 Sven Van Caekenberghe <[hidden email]>:

This is the easiest way that I know to show a simple table.

MultiColumnListModel new
  items: #(('x coordinate' 'y coordinate' 'z coordinate')(1 2 3)(4 5 6)(7 8 9));
  displayBlock: [ :x | x collect: #asString ];
  setSelectedIndex: 2;
  title: 'My table';
  openWithSpec.


> On 15 Feb 2015, at 22:36, Craig <[hidden email]> wrote:
>
> Hi Sven,
>
> I count myself as a beginner with Pharo, although I've been dabbling with Pharo UI choices for a few months now.
> Like Sebastian, I wrote Spec off as too immature for prime-time, but I too come from the commercial
> world, so maybe my expectations were unrealistic.
>
> So I took the time to learn Spec.  My very first requirement is to display some data in a grid or table like manner, so I took a look at the TreeModel, and tried to adapt one of the examples to fit.  However, whenever I try to add a third column to the model, I get a "Subscript Out of Bounds".
> I also tried to change the oddRowColor, but it had no effect.
>
> I hope that is specific enough for you.
>
> Craig
>
> -----Original Message-----
> From: Pharo-users [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe
> Sent: 13 February 2015 11:12 AM
> To: Any question about pharo is welcome
> Subject: [Pharo-users] Learning Spec
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf
>
> 'Spec – Technical Report'
>
http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>

 

Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

Adventurer
In reply to this post by Sven Van Caekenberghe-2
Sven,

Thanks for this, I was unaware of the MultiColumnListModel.  I notice that setting colors has no effect here either.
I remember from the video that overriding theme colors is still an issue in Spec, but I can move forward.

Craig

-----Original Message-----
From: Pharo-users [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe
Sent: 16 February 2015 12:30 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Learning Spec

This is the easiest way that I know to show a simple table.

MultiColumnListModel new
  items: #(('x coordinate' 'y coordinate' 'z coordinate')(1 2 3)(4 5 6)(7 8 9));
  displayBlock: [ :x | x collect: #asString ];
  setSelectedIndex: 2;
  title: 'My table';
  openWithSpec.

> On 15 Feb 2015, at 22:36, Craig <[hidden email]> wrote:
>
> Hi Sven,
>
> I count myself as a beginner with Pharo, although I've been dabbling with Pharo UI choices for a few months now.
> Like Sebastian, I wrote Spec off as too immature for prime-time, but I
> too come from the commercial world, so maybe my expectations were unrealistic.
>
> So I took the time to learn Spec.  My very first requirement is to display some data in a grid or table like manner, so I took a look at the TreeModel, and tried to adapt one of the examples to fit.  However, whenever I try to add a third column to the model, I get a "Subscript Out of Bounds".
> I also tried to change the oddRowColor, but it had no effect.
>
> I hope that is specific enough for you.
>
> Craig
>
> -----Original Message-----
> From: Pharo-users [mailto:[hidden email]] On
> Behalf Of Sven Van Caekenberghe
> Sent: 13 February 2015 11:12 AM
> To: Any question about pharo is welcome
> Subject: [Pharo-users] Learning Spec
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific terms unless you have taken the time to learn about it. Here is a guide to documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully public, but soon will be, the link should work though):
>
>  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an upcoming book:
>
>  
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInP
> rogress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 'protocol-events' mainly. Look for references to each class. Trace senders of methods until you arrive at examples. Study the examples, play with them, change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
>  http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legend
> ary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
>
>  
> http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.p
> df
>
> 'Spec – Technical Report'
>
>  
> http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
>
>
> Use the image to build a couple of simple UIs using Spec. You will be surprised to learn that it is not that difficult. Just go with the flow, don't try to enforce your world view on it, wait until you are further along.
>
>
> Have fun !
>
>
> Sven
>
>
> PS: Once you have done all the above, you are most welcome to help improve Spec by discussing specific, concrete issues.
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Learning Spec

blake watson
In reply to this post by Sven Van Caekenberghe-2
From now on it is forbidden to complain about Spec in general, unspecific terms 

As a rule, complaining about ANYTHING in general, unspecific terms is pretty useless, whether you've learned about it or not. =)

(Not that most of us don't do that from time-to-time. But it's a bad habit.)