Seaside Tutorials

There is a Seaside tutorial, it is a little dated, but quite useful. A copy of the code updated to work with Pharo is available at!/~JohnCBorden/SeasideTutorial. Steps for loading:

  1. Download a stable Pier 3 image
  2. Load SandstoneDb from gnaritas in Smalltalkhub
  3. Load the seaside tutorial code. Save the image and close it.
  4. Re-open the image and run the STTutTodoApp-Tests
  5. In http://localhost:8080/config/todo remove the two nil libraries, add JQDevelopmentLibrary and JQDUievelopmentLibrary
  6. Goto http://localhost:8080/todo and register yourself, create some tasks
  7. Find evidence that the new user is stored in files.

Several improvements:

  • After having issues with a first implementation, when loading the code an error was raised for nil libraries - remove these in http://localhost:8080/config/todo resolved the issues and brought up the login component. From the code, it is useful to know which database technique is being used - check StSession>>initialize for this.
  • In the section Gluing Components Together, the method #sortBy: does not exist in Pharo, #sortBlock: should be used instead in StRootComponent>>#initializeListComponent.
  • The code available 2014-Dec has the method #hashPassword on the class side of StUser and it uses GRPlatform current secureHashFor:; while the source MCZ file has it on the instance side and using SecureHashAlgorithm new hashMessage:. Using the code listed in the tutorial works better for Pier.
  • From the External Resources section, not sure where #mainJs is created.
  • Persistence - SandstoneDB for Pharo can be found on Smalltalkhub, older Squeak code can be found here.

    Sandstone is also described by the author, the updated tutorial listed above has the SandstoneDB set in the session (as well as the other StUser changes). The original example code had StImageDatabase set, however this caused disconnections when the image saved.

    Once the code was loaded, to get it working required running the tests (#bigsave was unsuccessful) and executing in a workspace:

    SDActiveRecord warmUpAllClasses.

    Note: SandstoneDb doesn't support saving blocks.

  • Ajax - The link http://localhost:8080/javascript/scriptaculous doesn't resolve in a Pier image, current options from http://localhost:8080/browse/javascript are JQuery and JQuery-ui as of 2015-Jan.