Most MSPs follow a similar processing flow. First, they create a connection with the site server. Then they open connections to any needed site services. The exact services required depend on the MSP function. For example, a page that deals with map feature data requires a feature service connection.
Once the site connection and any other service connections are open, the page can use MapGuide Web API calls to retrieve and process data. Output goes to the task pane or back to the Viewer. See MapGuide Viewer API for details about sending data to the Viewer.
When a user first connects to a MapGuide site, the site creates a session for that user. If you use a MapGuide Viewer to display your map, the session is created automatically. This also generates a unique session ID, which the Viewer uses to manage the run-time map state. This keeps the state consistent between the viewer and the server across multiple HTTP requests.