Cgictrl is a CGI framework for Ruby. It allows you to use the structure of a mainframe program (like on IBM's CICS) with CGI. Programs are selected by transaction codes, and the CGI program indicates the next transaction code to continue the conversation process. Basically, one CGI program sends only one kind of view, and processes input data from only this view. Each program can store internal data in a SPA (Scratch Pad Area) on the server, which is allocated uniquely per session.