Learning Spec UI

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): Check the talk on Spec!

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:

View story at Medium.com

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

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.
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.

Advertisements

One thought on “Learning Spec UI

  1. […] Maîtriser et apprendre Spec : tout est ici! […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: