20.11 Different Types of SRVROUTINE
The definition and command used to invoke a SRVROUTINE in a Server Module have a common format and look something like:
Define_Com Class(#MyServerRoutine.GetData) Name(#GetData)
# GetData.ExecuteAsync EmployeeID(#Empno) EmployeeDetails(#MyEmployee) status(#io$sts)
or
# GetData.Execute(#EmployeeID #MyEmployee #io$sts)
However, when you look more closely at the actual SRVROUTINE definitions there are three different classes of SRVROUTINE and it is important to understand the difference when you are coding a call to the routine and handling responses from the routine. What distinguishes them is type of data exchanged and how the request is processed. When you examine the methods, events and properties supported by the explicit DEFINE_COM (use F2) you will see the relationship more clearly.
Data Request
The most common type of SRVROUTINE call is a Data Request. A Data Request processes a request from the client, optionally accompanied by data, and fires a status event on completion, as well as optionally returning data in JSON format to the client.
Characteristics of a Data Request:
Web Page Request
Request to transfer to another Web Page.
Characteristics of a Web Page Request
Resource Request
A Resource Request is used to a return file, such as an image or PDF from the database or application server. This is not commonly used as files can be accessed directly from the Web Server if they are stored there instead.
Characteristics of a Response Resource: