<Examples>

[ Hello World! | Page Counter | Enter Data | Format | Question Poll | Guessing Game | Guessing Game II | Genealogy | Email Service | Guestbook | Chat Room | Calendar | Htaccess | Webboard ]


Below is a wide range of small but interesting <bigwig> services. They can all be tried out by clicking on the appropriate session links. Also, the source pretty-print (as auto-generated by <bigwig>) and the original source code is available for each of them.

Most of the services below use the standard macro library std.wigmac (and some also use the SQL macro library sql.wigmac) and will not compile without. Note that the macros do not get pretty printed along with the rest of the code, so if you want to recompile and play with the services, take the original source codes. The pretty printed outputs are mostly intended for browsing.

The purpose of these examples is to show how Web services can be written in the <bigwig> language. We have intentionally kept the design and layout of the HTML documents in the services below very simple.

  Hello World
This is the ubiquitous "hello world!" program. It has one session, Hello that simply generates the text "hello world!" on the screen.

  Page Counter
This service will count the number of hits.

  Enter Data
This tiny service will show how dynamic information is communicated to and from the client.

  • Sessions
    • Enter - prompts the client for his name and age which are subsequently displayed.
  • Pretty print: [ html | ascii ]
  • Source: [ enterdata.wig ]

  Format
This service shows how <bigwig>'s regular expression formats have been attached to the input fields in the Enter Data service above. This ensures that client-side form input validation is performed guaranteeing that the data entered complies with the specified formats.

  • Sessions
    • Enter - prompts the client for his name and age which are subsequently displayed.
  • Pretty print: [ html | ascii ]
  • Source: [ format.wig ]

  Question Poll
This service allows one to put forward a question for vote. Answers are then polled and displayed graphically.

  • Sessions
    • Display the results of the current poll.
    • Vote in the current poll.
    • New - will start a new poll.
  • Pretty print: [ html | ascii ]
  • Source: [ poll.wig ]

  Guessing Game
This is the old number guessing game where you are required to guess a number between 0 and 99, using as few guesses as possible. The service will also keep track of the record, allowing you to enter your name when you beat the current record.

  Guessing Game II
The same game as above only slightly harder :)

  Genealogy
Shows how a recursive function can dynamically and efficiently build large html documents.

  Email Service
This service allows you to send an email.

  Guestbook
This service is a guestbook. You can sign the guestbook or see who has signed it thus far.

  Chat Room
Here is a simple chat room. You initially select your online name after which you can write messages to the other people in the chat room.

  Calendar
Here is a simple calendar that allows you to scroll through the years and months.

  Htaccess
This service demonstrates how HTTP Authentication is integrated in <bigwig>

  Webboard
A Webboard is a Web-based discussion forum where clients can post, read, and reply to messages. The center of a Web board service is the "message list", which is a hierarchical list showing the titles, authors, etc. of the available messages and their relations.


bigwig@brics.dk
Last updated: November 1, 2001
Valid HTML 4.01!