http://ss3.gemstone.com/ss/Oakville/AL-Examples-chc.13.mcz
I've taken the Seaside JSON example from Seaside 3.0.6 and put it into Altitude. Load AL-Eamples-chc.13.mcz into a working Altitude image (load script at the bottom of this post). The example loads a bunch of pictures from Flickr's Seaside (as in pictures of the beach) account.
Then:
server := ALServer on: 8624 application: ALExampleApplication new. server start
Go to http://localhost:8624
In Seaside it's mainly pure JavaScript. Not a lot of abstraction over the JavaScript there. It's an interesting question what the sweet spot of abstracting over JavaScript really is. Altitude has none. Seaside has lots. For this JSON example it sort of looks the same on both frameworks.
Chris
| oldPref oldAuth|
oldPref := Scanner prefAllowUnderscoreSelectors.
oldAuth := Utilities authorInitialsPerSe.
Scanner prefAllowUnderscoreSelectors: true.
Utilities setAuthorInitials: 'al-loader'.
$_ tokenish ifFalse: [
Character
compile: 'tokenish
"Answer whether the receiver is a valid token-character--letter, digit, or
colon."
^self == $_ or: [self == $: or: [self isLetter or: [self isDigit]]]'
classified: 'testing'.
String initialize ].
(Installer repository: 'http://source.squeak.org/FFI')
install: 'FFI-Pools';
install: 'FFI-Kernel';
install: 'FFI-Tests';
install: 'FFI-Win32';
install: 'FFI-MacOS';
install: 'FFI-Unix'.
(Installer wiresong project: 'al')
addPackage: 'Xtreams-Support';
addPackage: 'Xtreams-CoreTests';
addPackage: 'Xtreams-Core';
addPackage: 'Xtreams-Substreams';
addPackage: 'Xtreams-Terminals';
addPackage: 'Xtreams-Parsing';
addPackage: 'Xtreams-Http';
addPackage: 'Xtreams-Xtras';
addPackage: 'Xtreams-ParsingTests';
addPackage: 'Xtreams-TerminalsTests';
addPackage: 'Xtreams-XtrasTests';
addPackage: 'Xtreams-SubstreamsTests';
addPackage: 'Xtreams-TransformsTests';
addPackage: 'Xtreams-Transforms';
addPackage: 'Xtreams-HttpTests';
install.
Scanner prefAllowUnderscoreSelectors: oldPref.
Utilities setAuthorInitials: oldAuth.
(Installer wiresong project: 'mc')
addPackage: 'FS-Core';
addPackage: 'FS-Disk';
addPackage: 'FS-Memory';
addPackage: 'FS-AnsiStreams';
addPackage: 'FS-Zip';
addPackage: 'FS-Xtreams';
addPackage: 'FS-FileStream';
addPackage: 'FS-Tests-Core';
addPackage: 'FS-Tests-AnsiStreams';
addPackage: 'FS-Tests-Xtreams';
addPackage: 'FS-Tests-Zip';
addPackage: 'FS-Tests-Disk';
addPackage: 'FS-Tests-FileStream';
install.
(Installer wiresong project: 'al')
addPackage: 'AL-Rendering';
addPackage: 'AL-Http';
addPackage: 'AL-Application';
addPackage: 'AL-Serialization';
addPackage: 'AL-Json';
addPackage: 'AL-Html5';
addPackage: 'AL-HtmlApp';
addPackage: 'AL-User'; addPackage: 'AL-Examples';
addPackage: 'AL-Tests-Json';
addPackage: 'AL-Tests-Html5';
addPackage: 'AL-Tests-User';
addPackage: 'AL-Tests-Serialization';
addPackage: 'AL-Tests-Http';
addPackage: 'AL-Tests-Application';
install.