Previous Topic: Understanding the Sample ApplicationNext Topic: Sample Application Recommendations


Sample Application Components

Sample Application constitutes the following:

These Sample Application components are organized in a model-view-controller (MVC) framework, which separates the user interface of your application from the underlying business logic. As a result, it is much easier to modify either the user interface of the application or the business rules or both without affecting the other.

The following figure illustrates the interaction between the components of Sample Application (after a user is successfully authenticated by your application.)

As illustrated in the preceding figure, the flow of information between the various components of Sample Application is as follows:

  1. User initiates a transaction using the browser window.

    Note: This step assumes that the end user is already successfully logged in after being authenticated by your application.

  2. The servlet processes the request and invokes the corresponding helper function so that it can, in turn, invoke the required RiskMinder SDK.
  3. The helper function calls the appropriate API to interact with RiskMinder Server by passing the inputs forwarded by the servlet in the preceding step.
  4. RiskMinder Server assesses the input and returns a risk score and an advice. In each case, an object of the relevant type is returned.

    If the assessment failed, an exception is generated.

  5. The helper function returns the object created by RiskMinder SDK along with the response to the corresponding servlet.

    In case of a failure, the helper function catches all exceptions and displays a meaningful error message.

  6. The servlet receives the response from the helper function, sets the corresponding values in request attribute, and forwards it to a JSP.
  7. The JSP parses the request attribute set by the servlet, generates an HTTP response, and forwards it to the browser.

    This response is then displayed to the user.