hands on pier
DESCRIPTION
Hands on Pier. Tudor Girba, ESUG 2008, AmsterdamTRANSCRIPT
![Page 2: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/2.jpg)
ESUG 2008© Tudor Gîrba
Roadmap
•About Pier
•Pier is not just a wiki, it is a content management system (CMS) based on Magritte and Seaside
•Pier is open source under the MIT license
•Pier from the outside
•Demos
•Pier from the inside
•Architecture
•Extensions
2
![Page 3: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/3.jpg)
CMS, easy, cool, free
![Page 4: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/4.jpg)
?Who builds
![Page 5: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/5.jpg)
Lukas RenggliMichel BanyMatthias BerthDamien CassouTudor GîrbaDale HenrichsKeith HodgesRamon LeonNik LutzPhilippe MarshallDamien PolletNiall Ross
![Page 6: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/6.jpg)
Lukas RenggliMichel BanyMatthias BerthDamien CassouTudor GîrbaDale HenrichsKeith HodgesRamon LeonNik LutzPhilippe MarshallDamien PolletNiall Ross
![Page 7: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/7.jpg)
Why do I present it?
![Page 8: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/8.jpg)
CMS, easy, cool, free
![Page 9: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/9.jpg)
1from the outside
![Page 10: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/10.jpg)
= CMS
![Page 11: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/11.jpg)
?How mature is
![Page 12: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/12.jpg)
www.seaside.st
![Page 13: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/13.jpg)
choose.s-i.ch
![Page 14: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/14.jpg)
moose.unibe.ch
![Page 15: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/15.jpg)
www.esug.org
![Page 16: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/16.jpg)
www.lukas-renggli.ch
![Page 17: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/17.jpg)
www.tudorgirba.com
![Page 18: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/18.jpg)
?How extensible is
![Page 19: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/19.jpg)
Citezen
LightBox
Poll
Post ticker
Randomizer
Search
StehlDichEin
Top Feeder
![Page 20: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/20.jpg)
?How to customizethe look of
![Page 21: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/21.jpg)
![Page 22: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/22.jpg)
2from the inside
![Page 23: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/23.jpg)
Structure
![Page 24: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/24.jpg)
Structure*
children
![Page 25: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/25.jpg)
Structure
Page File
*
children
![Page 26: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/26.jpg)
Structure
Page File
Blog
*
children
![Page 27: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/27.jpg)
Structure
Page File
Blog
Context*
children
*
![Page 28: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/28.jpg)
Structure
Page File
Blog
Context Command
Edit Login
*
children
*
![Page 29: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/29.jpg)
Kernel
Structure
Page File
Blog
Context Command
Edit Login
*
children
*
![Page 30: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/30.jpg)
Kernel
Structure
Page File
Blog
Context Command
Edit Login
Persistency
*
children
**
![Page 31: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/31.jpg)
Kernel
Structure
Page File
Blog
Context Command
Edit Login
Persistency
*
children
**
environment
![Page 32: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/32.jpg)
Kernel
Structure
Page File
Blog
Context Command
Edit Login
Persistency
*
childrenroot
**
environment
View
Browse Changes
![Page 33: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/33.jpg)
Kernel
Structure
Page File
Blog
Context Command
Edit Login
Persistency
*
childrenroot
**
Component
environment
View
Browse Changes
PostTicker
![Page 34: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/34.jpg)
is based on
Magritte
describe once, get everywhere
![Page 35: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/35.jpg)
Any Seaside application can be a widget
![Page 36: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/36.jpg)
Persistency: Gemstone, image
![Page 37: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/37.jpg)
CMS, easy, cool, free
![Page 38: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/38.jpg)
3from the ...
![Page 39: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/39.jpg)
![Page 40: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/40.jpg)
'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 27 August 2008 at 10:18:30 am'!
ISComponent subclass: #ISPier
instanceVariableNames: 'context'
classVariableNames: ''
poolDictionaries: ''
category: 'ISea-Tests'!
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 07:30'!
renderCommand: aString on: html
self
renderHeading: [ self renderCommandHeadingOn: html ]
contents: [ self renderCommandBodyOn: html ]
animation: aString
on: html! !
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 07:32'!
renderCommandBodyOn: html
context command isView
ifTrue: [ ^ self renderViewOn: html ].
html form: [
ISMagritte new
start: context command description
object: context command
on: html ]! !
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 09:36'!
renderCommandHeadingOn: html
html isea button
beBack; beLeft; beCancel;
callback: [ context := context structure: context structure ];
response: [ :renderer | self renderChildren: 'push_left_to_right' on: renderer ];
with: (context command isView
ifTrue: [ 'Up' ]
ifFalse: [ context command cancelButton value ]).
html heading: context command label.
context command isView ifFalse: [
html isea button
beBlue; beRight;
callback: [ self execute ];
response: [ :renderer |
context command isView
ifTrue: [ self renderChildren: 'push_left_to_right' on: renderer ]
ifFalse: [ self renderCommand: 'push_right_to_left' on: renderer ] ];
with: context command saveButton value ]! !
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 09:41'!
renderViewOn: html
PRCurrentContext use: self during: [
html div style: 'padding: 10px; background: #fff; height: 100%'; with: [
ISRenderer new
start: context structure
in: self on: html ] ]! !
!ISPier methodsFor: 'initialization' stamp: 'tg 8/14/2008 14:54'!
initialize
super initialize.
context := PRContext kernel: PRKernel instances anyOne! !
!ISPier methodsFor: 'rendering' stamp: 'lr 8/27/2008 07:31'!
renderContentOn: html
self renderChildren: nil on: html! !
!ISPier methodsFor: 'rendering-children' stamp: 'lr 8/27/2008 00:23'!
renderChildren: aString on: html
self
renderHeading: [ self renderChildrenHeadingOn: html ]
contents: [ self renderChildrenBodyOn: html ]
animation: aString
on: html! !
!ISPier methodsFor: 'rendering-children' stamp: 'lr 8/27/2008 09:08'!
renderChildrenBodyOn: html
html isea list
list: context enumerator contents;
labels: [ :each | each title ];
callback: [ :value | context := context structure: value ];
response: [ :renderer | self renderChildren: 'push_right_to_left' on: renderer ].
context commands do: [ :each |
html isea action
class: 'tallButton black right';
callback: [ context := context command: each new ];
response: [ :renderer |
context command isQuick
ifTrue: [
self execute.
self renderChildren: 'push_left_to_right' on: renderer ]
ifFalse: [ self renderCommand: 'push_right_to_left' on: renderer ] ];
with: each label ]! !
!ISPier methodsFor: 'rendering-children' stamp: 'lr 8/27/2008 07:32'!
renderChildrenHeadingOn: html
context structure parent notNil ifTrue: [
html isea button
beBack; beLeft; beCancel;
callback: [ context := context structure: context structure parent ];
response: [ :renderer | self renderChildren: 'push_left_to_right' on: renderer ];
with: 'Up' ].
html heading: context structure title.
(PREditCommand isValidIn: self context)
ifTrue: [
html isea button
beRight; beCancel;
callback: [ context := context command: PREditCommand new ];
response: [ :renderer | self renderCommand: 'push_right_to_left' on: renderer ];
with: 'Edit' ]
ifFalse: [
html isea button
beRight; beCancel;
callback: [ context := context command: PULogin new ];
response: [ :renderer | self renderCommand: 'push_right_to_left' on: renderer ];
with: 'Login' ]! !
!ISPier methodsFor: 'accessing' stamp: 'lr 8/27/2008 07:33'!
context
^ context! !
!ISPier methodsFor: 'accessing' stamp: 'lr 8/27/2008 09:18'!
context: aContext
context := aContext! !
!ISPier methodsFor: 'actions' stamp: 'lr 8/27/2008 09:12'!
execute
PRCurrentContext use: self during: [
[ context command execute ]
on: Error
do: [ :err |
Transcript show: err description; cr.
^ context := context structure: context structure ].
context := context command answer ]! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
ISPier class
instanceVariableNames: ''!
!ISPier class methodsFor: 'initialization' stamp: 'lr 8/27/2008 00:12'!
initialize
| application |
application := self registerAsApplication: 'isea/pier'.
application libraries do: [ :each | application removeLibrary: each ].
application preferenceAt: #deploymentMode put: true.
application addLibrary: ISLibrary! !
ISPier initialize!
![Page 41: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/41.jpg)
'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 27 August 2008 at 10:18:30 am'!
ISComponent subclass: #ISPier
instanceVariableNames: 'context'
classVariableNames: ''
poolDictionaries: ''
category: 'ISea-Tests'!
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 07:30'!
renderCommand: aString on: html
self
renderHeading: [ self renderCommandHeadingOn: html ]
contents: [ self renderCommandBodyOn: html ]
animation: aString
on: html! !
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 07:32'!
renderCommandBodyOn: html
context command isView
ifTrue: [ ^ self renderViewOn: html ].
html form: [
ISMagritte new
start: context command description
object: context command
on: html ]! !
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 09:36'!
renderCommandHeadingOn: html
html isea button
beBack; beLeft; beCancel;
callback: [ context := context structure: context structure ];
response: [ :renderer | self renderChildren: 'push_left_to_right' on: renderer ];
with: (context command isView
ifTrue: [ 'Up' ]
ifFalse: [ context command cancelButton value ]).
html heading: context command label.
context command isView ifFalse: [
html isea button
beBlue; beRight;
callback: [ self execute ];
response: [ :renderer |
context command isView
ifTrue: [ self renderChildren: 'push_left_to_right' on: renderer ]
ifFalse: [ self renderCommand: 'push_right_to_left' on: renderer ] ];
with: context command saveButton value ]! !
!ISPier methodsFor: 'rendering-command' stamp: 'lr 8/27/2008 09:41'!
renderViewOn: html
PRCurrentContext use: self during: [
html div style: 'padding: 10px; background: #fff; height: 100%'; with: [
ISRenderer new
start: context structure
in: self on: html ] ]! !
!ISPier methodsFor: 'initialization' stamp: 'tg 8/14/2008 14:54'!
initialize
super initialize.
context := PRContext kernel: PRKernel instances anyOne! !
!ISPier methodsFor: 'rendering' stamp: 'lr 8/27/2008 07:31'!
renderContentOn: html
self renderChildren: nil on: html! !
!ISPier methodsFor: 'rendering-children' stamp: 'lr 8/27/2008 00:23'!
renderChildren: aString on: html
self
renderHeading: [ self renderChildrenHeadingOn: html ]
contents: [ self renderChildrenBodyOn: html ]
animation: aString
on: html! !
!ISPier methodsFor: 'rendering-children' stamp: 'lr 8/27/2008 09:08'!
renderChildrenBodyOn: html
html isea list
list: context enumerator contents;
labels: [ :each | each title ];
callback: [ :value | context := context structure: value ];
response: [ :renderer | self renderChildren: 'push_right_to_left' on: renderer ].
context commands do: [ :each |
html isea action
class: 'tallButton black right';
callback: [ context := context command: each new ];
response: [ :renderer |
context command isQuick
ifTrue: [
self execute.
self renderChildren: 'push_left_to_right' on: renderer ]
ifFalse: [ self renderCommand: 'push_right_to_left' on: renderer ] ];
with: each label ]! !
!ISPier methodsFor: 'rendering-children' stamp: 'lr 8/27/2008 07:32'!
renderChildrenHeadingOn: html
context structure parent notNil ifTrue: [
html isea button
beBack; beLeft; beCancel;
callback: [ context := context structure: context structure parent ];
response: [ :renderer | self renderChildren: 'push_left_to_right' on: renderer ];
with: 'Up' ].
html heading: context structure title.
(PREditCommand isValidIn: self context)
ifTrue: [
html isea button
beRight; beCancel;
callback: [ context := context command: PREditCommand new ];
response: [ :renderer | self renderCommand: 'push_right_to_left' on: renderer ];
with: 'Edit' ]
ifFalse: [
html isea button
beRight; beCancel;
callback: [ context := context command: PULogin new ];
response: [ :renderer | self renderCommand: 'push_right_to_left' on: renderer ];
with: 'Login' ]! !
!ISPier methodsFor: 'accessing' stamp: 'lr 8/27/2008 07:33'!
context
^ context! !
!ISPier methodsFor: 'accessing' stamp: 'lr 8/27/2008 09:18'!
context: aContext
context := aContext! !
!ISPier methodsFor: 'actions' stamp: 'lr 8/27/2008 09:12'!
execute
PRCurrentContext use: self during: [
[ context command execute ]
on: Error
do: [ :err |
Transcript show: err description; cr.
^ context := context structure: context structure ].
context := context command answer ]! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
ISPier class
instanceVariableNames: ''!
!ISPier class methodsFor: 'initialization' stamp: 'lr 8/27/2008 00:12'!
initialize
| application |
application := self registerAsApplication: 'isea/pier'.
application libraries do: [ :each | application removeLibrary: each ].
application preferenceAt: #deploymentMode put: true.
application addLibrary: ISLibrary! !
ISPier initialize!
~100 lines o
f code
![Page 42: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/42.jpg)
CMS, easy, cool, free
www.lukas-renggli.ch/smalltalk/pier
![Page 43: Hands on Pier](https://reader033.vdocuments.site/reader033/viewer/2022052321/555a70b1d8b42a972b8b4f7a/html5/thumbnails/43.jpg)
Tudor Gîrbawww.tudorgirba.com
creativecommons.org/licenses/by/3.0/