Back in the old days of programming, there was structure code.
Then someone decided to have reusable code.
So they put the logic into a sub-routine.
And if the routine returned a value, it was a function.
And that function was moved to a Class.
And then the Class was moved to a DLL.
And then the DLL was moved to a consolidated server which pooled processes COM+.
And then the COM+ was moved to the web as Web Services transmitted through SOAP.
So we have moved the logic as far away as humanly possible.
But it's still just a function, a snippet of logic that performs a task / routine based on parameters.
Nothing really changed.