1.4.1 Webroutines

A WAM may contain one or more Webroutines. These contain your Application Logic. They can be thought of in much the same way as subroutines. Indeed, a Webroutine is defined in a similar manner to a subroutine, using the Webroutine/Endroutine command combination, as follows:

To execute this Webroutine from a browser (i.e. to initiate this Webroutine), a user would enter a URL that looks something like this:


Note that, when the Endroutine statement is reached, control is passed back to the Presentation Layer.

What the Presentation Layer shows is the web page associated with that Webroutine. Yes, each Webroutine is capable of having its own web page that it shows to the user. More about this in 1.5 The Presentation Layer.

Of course, you will often want to pass data back and forth between the Application Logic Layer and the Presentation Layer. This is done with 1.4.2 Web Maps.