This post originated from an RSS feed registered with Ruby Buzz
by David Naseby.
Original Post: Structure of a Borges Application
Feed Title: naseby + ruby + stuff
Feed URL: http://homepages.ihug.com.au/~naseby/rss.xml
Feed Description: Random wanderings through Ruby.
I’ve been wondering about the shape of a Borges application. The best example that comes with the distro is SushiNet, so I cracked it open and had a peek.
The highest level description of the application flow in SushiNet is in SushiNet::StoreTask, which is a subclass of Borges::TaskFrame. The application flow is described in the #go method of the task frame, and this is also where the whole application is registered with register_application 'store', SushiNet::StoreSession. Control is shuffled to other controllers with the #call method.
After reading on a bit, and abandoning my stream of consciousness for a few minutes, and then jumping across to the Seaside version, its pretty clear that the Borges sample is not quite up to the same state of development as the Squeak version. This is to be expected, of course. The shape of the two are however, comparable, and the naming conventions are the same, so I can better understand the Squeak code with reference to the Ruby. Compare the Ruby SushiNet::StoreTask#go:
def go
browse
until checkout_successful do
browse
end
say_goodbye
end