Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The other big change has to do with the way the RunHTTPService application service is called. The original version of this service had three arguments: NextServiceHandler, NextService, and NextURL. While these arguments were useful, we found that after building more web services, the meaning of the arguments would become unclear. For instance, what exactly is the different between the NextServiceHandler and the NextService? How did this relate to the current service being executed? What is contained in the NextURL? Now, obviously these are documented, but it still seemed as if these arguments could at times be confusingOver time it became apparent that these could be reduced to just two arguments, which are now named HTTPService and RemainingURL. This allowed us to refactor the HTTP_Service_Setup insert, reducing its line count by half, and making it much simpler to follow.

This invariable affected the signature and internal variables used by the actual web service routines. Previously, these routines used a generic service signature, even though only the first two arguments were ever populated. Now they only accept one argument, which is named RemainingURL to correspond with the same argument being passed to the RunHTTPService application service. The new sample HTTP service routines (HTTP_Entry_Point_Services, HTTP_Users_Services, and HTTP_Contact_Services) have updated comments blocks that clearly documents all of the variables that are populated by the HTTP_Service_Setup insert. This will help the developer understand what information is available so that API logic can be written much easier.