Versions Compared

Key

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

...

LANSA's Reusable Parts can provide the necessary level of modularity. Simply use the Define_com command to declare the appropriate parts and use them for the Application Logic. Here's an example:

Image Modified

The Logon Webroutine accepts a user id and password from some other Webroutine that is displayed at the Presentation Layer. An instance of the Reusable Part ADHLOGON comes alive and its ValidateLogOnDetails method is used to validate the user id and password. If successful, the #LOGGEDON field (declared as persistent session data) is set to True and control is transferred to the LogOnSuccessful Webroutine. If logon is unsuccessful, control is transferred to the LogOnFailed Webroutine.

As you can see, this is a great technique to ensure your Application Logic is encapsulated in a single place so that it can be used over and over by other WAMs.