A stateless interface is an interface that handles a request without regard to what has happened before the current request. Modern applications generally require stateless
interfaces to support event-driven, highly scalable applications. Stateless interfaces allow access to business functions to be easily rearranged and allow for a single job to handle requests for multiple sessions.
For an interface to be stateless, it must receive all information that is necessary to process a request as input parameters and must return all of the required response information. The request and response information can include key values that were obtained from earlier interface calls or that can be used in subsequent interface calls.
There are two different meanings of the word “state” that can cause confusion when discussing stateless interfaces. Stateless interfaces avoid modal state, in which certain operations must be done in a certain order before any other operations can be performed. However, stateless interfaces can use accumulated state, such as a web shopping cart, in which information is accumulated through multiple interface calls and the accumulated information is accessible through key values.
The fact that interfaces are designed to avoid modal state is one of the fundamental issues that cause problems with modernization technologies that attempt to access information through “screen scraping” techniques. Most traditional 5250 applications have some form of modal state that is deeply embedded in the programs. The programs require that screens be processed in a specific order even though other interfaces or workflows require a different order of operations. One simple example is an order entry application that requires customer information before the customer enters the order items. That order of operations is not the accepted standard for web-based applications, which generally allow the order items to be entered before the customer information. Another deep problem when using a modal state program behind a web interface occurs when a user opens multiple tabs to the application. Because the request can be made in any order from any tab, the modal state program might not be on the same “screen” as the user.