[Seaside] CampSmalltalk London tutorial

Nick Ager nick.ager at gmail.com
Sun Aug 1 23:01:45 UTC 2010


Hi

Though it's been a couple of weeks since CampSmalltalk London, I've only
just got round to creating a ConfigurationOfCampSmalltalkLondon which can be
used to download the beginners tutorial Tim Mackinnon and I created.

First some context. The beginners tutorial ran on the first day. We had 9
developers with a mixed background in Ruby/Java/C#/PHP etc. We started by
going through the excellent ProfStef tutorial which we used as jump off
point for frequent asides into the tools and code in Pharo.

Next we gave them a simple exercise. You can download the code by grabbing
ConfigurationOfCampSmalltalkLondon from
http://www.squeaksource.com/MetacelloRepository.html and executing:

(ConfigurationOfCampSmalltalkLondon project version: '1.0') load.

The aim was to put into practice some of the concepts they'd learnt in the
ProfStef tutorial - initially focusing on loops. The tutorial grabs live
traffic information from the SE of the UK. Initially there is only one entry
in the list viewable from their image at:
http://localhost:8080/camp-smalltalk-london

The first task was to change the code in CSLTransportInfo>>renderPage: to
loop over the results and pass them to a custom renderer. Note we wanted to
pass-on the joy of developing a web app in Smalltalk - the liveliness of the
environment, code editing in the debugger etc - without first having to
learn Seaside. So we hid the Seaside code behind some custom renderers.

The second task was the change the renderer in
CSLTransportInfo>>modelRenderer to be a CSLListItemRenderer. The task here
was to notice the signature of the addItem method had changed and use the
inspector and the browser to discover the relevant accessors on the result
items.

Finally they changed the renderer again for a CSLMapRenderer and went
through a similar routine to step two, though this time the result of their
labours was to transform a boring list into an impressive map - graphically
 showing traffic incidents.

Those who were more advanced could then filter the results to look at say
only incidents along particular roads etc.

The tutorial session seemed to be well received. I don't know if anyone out
there is planning to run an introduction to Smalltalk - if so they are more
than welcome to use the code.

All feedback gratefully received.

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100802/3e1132ee/attachment.htm


More information about the seaside mailing list