Portal UI Architecture

MVC Architecture

The architecture of the portal UI is based on the Model-View-Control (MVC) design pattern. The MVC paradigm allows you to separate the code that handles business logic from the code that controls presentation and event handling. Each page in the portal is made up of a combination of at least one Model and View, and one or more Controls.

Example: Login MVC Pattern

The diagram below shows a simplified version of how the classes used for the Login page interact with each other using the Model-View-Control (MVC) pattern.

  1. When the user clicks Log In on the login page, a request is sent to the portal. The Interpreter Servlet / Handler handles all requests.

  2. The Interpreter dispatches the request to the appropriate Control class; in this case, the Login Control.

  3. The Control performs the action requested by the user on the Model; in this case the Login Model.

  4. The Model returns a response; in this example, a successful login message.

  1. The Control either redirects to another page or returns to the same page with new data since the Model has been updated. In this case, the Control redirects to the MyPage.

  2. The Interpreter gets the HTML for the page requested by the Control from the appropriate View, in this case the MyPage View.

  3. The View returns the HTML for the page.

  4. The Interpreter sends the HTML for the page back to the browser.

Note that the redirect from the Login page to the MyPage occurred without returning to the client. These Server Redirects are handled by the Interpreter. The portal favors server redirects over regular redirects (i.e., Response.redirect) because they avoid unnecessary roundtrips to the client. Regular redirects are used in a few cases; for example, some Security Modes require a redirect to switch between HTTP and HTTPS pages.

Next: Activity Spaces