[ Follow Ups ] [ Post Followup ] [ Discussions at the Paneris system node ]

suggestion for post-iglu

Posted by Myles (pp WilliamC) on Mon Oct 5 18:50:15 1998

Distribution: paneris@i-way.co.uk
As an experiment in managing collaboratively developed software using
CVS and some sort of virtual paperwork, we should spec, develop and
maintain an enhanced version of the template/database utilities we
have done for iglu.

I think there are three things it needs to support:

Templates) The ability to use the same file as a mockup and as an
online page with some logic behind it (or at least as near as
possible). Most of the logic is kept in the script but designer- or
customer-friendly placeholders and simple instructions can be put in
the page.

Database integration) Knowing about the structure of the database, so
that you can use notations similar to $property.skiresort.skidomain,
or just $skidomain or whatever, in the script and on the page.

Site structure) Going beyond what we have,


Site structure
--------------

It would be nice to be turn the logic of the site structure inside
out, and turn it from being event-driven to being loop-driven.
Make CGI scripting look like GUI database scripting.
(Analogous to the difference between writing event-driven GUI programs
and writing with threads.)

For instance, maybe it would look something like this:


page ChaletSearchResults {
property: Iglu.Property;

# this makes available in the template

action addToShortlist {
# do what is necessary to get a booking, including displaying
# login screens if necessary, then display shortlist
shortlistAdd(booking(), property);
# redisplay current scren
}
}


Iglu.Booking booking () =
if (there is a cookie) then
iglu.booking (cookie contents)
else {
while not found {
let loginInfo = display LoginRequest;
if loginInfo == null then
display LoginRequestLoginAbsent;
...
}
...
display LoginConfirm (customer = customer, booking = booking)
...


shortlistAdd (booking: Iglu.Booking, property: Iglu.Property) {
# do something with the DB
...
# display the shortlist
display chaletShortlist (properties = ...)
}

The system has a simple little scripting language (probably simpler
than sketched above), which is allowed to call Perl or whatever when
you need the power of a proper language. In each page it sends out it
stores the complete state of the virtual machine executing the script
which implements the logic of the site. Effectively it includes a
stack/program counter in the page so that when the page comes back it
can continue executing from where it left off until it reaches the
point at which it next needs to send out a page.

I think all this together is within reasonable reach, it would be fun
and we could definitely "sell" it in the free software sense!


Thoughts?





Follow Ups: