Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Sails
Last updated at 5:45 pm UTC on 18 July 2007
Sails uses describe-and-generate pattern. I.e. you must describe your application via different commands and then send #generate to Sails - and Sails make some WAComponents (and maybe other objects) in some category (which will be your application's category), marking one of them as root and registering thee as seaside application.

Hot: Sails Tutorial

First step

First step is decreasing of 'Blog At 15 Minutes' to 'Blog At 5 Minutes' :)

So, we need something for converting couple of maggritte-described classes to ready seaside-application. This application will have no mapping to database yet, nor special forms, but it shall works!

So, Sails-code of Blog will look something like
sails:=Sails newFor:'BlogExample'.
sails addModel: #(Blog BlogPost BlogComment);
      generate.

BlogView, BlogPost, BlogComments and BlogComment is model objects, first object in the list will be used as root copmponent.
Of course, this objects must be Magritte-described before executing this code (and maybe we'll need some new descriptive hierarchy for this, I don't know yet).
WABlogView, WABlogPost, WABlogComments and WABlogComment will be made in BlogExample category, and WABlogView will be marked as root component of BlogExample application.