Inproc development model – Pitney Bowes MapXtreme User Manual

Page 107

Advertising
background image

Chapter 6: Understanding State Management

InProc Development Model

MapXtreme v7.1

107

Developer Guide

<add key="MapInfo.Engine.Session.Workspace"
value="C:\MIDATA\EvalData\WorldDetail\World_Detail.mws" />
</appSettings>
</configuration>

This tag instructs the MapXtreme Session to load this workspace whenever a new instance of the
Session is created.

How Will Users be Allowed to Modify the Map?

Most web applications allow the user to click, drag, or perform other actions that modify the map in
some way. In your application, you might consider the following.

Will you allow your users to:

Zoom in or out or re-center the map?

Select some features on the map (perhaps by clicking directly on the map)?

Turn map elements on or off (such as clearing a checkbox to turn off street display)?

Create and/or modify thematic shading (such as color-coding on the map to show data)?

Place map annotations, such as symbol markers, on the map?

All of these operations can be supported in a mapping application. However, if you decide to
implement a web application using a pooled model, you should be aware that pooled applications
need to include code that carefully saves and restores all changes the user has made to the map.

For example, if your web application allows users to place annotations on the map, then you will
need to write code to save each user's custom annotations, and then write code to restore that
user's custom annotations with each subsequent request.

If your application uses the pooled model with manual state management, then your state
management code will grow more complex as you add more and more features that allow the user
to modify the map. As you consider features that allow the user to modify the map in various ways,
remember to set aside time for the development and testing of your state management code as well.

InProc Development Model

If you use the InProc development model, you code your application much like you would code a
desktop application. With the InProc model, there is one MapXtreme Session object for each user;
this means you will have the overhead of each user having their own process space, and resources
are not shared. (The MapXtreme Session is the holder of the Catalog, MapFactory,
CoordSysFactory, and other MapXtreme objects.)

The InProc model is a simple model for development purposes. Because each user has their own
MapXtreme Session, changes can be made within a Session without disrupting any other users'
Session.

For example, if the user clicks to zoom in on the map, your application code can simply modify the
map object's Zoom property, without worrying about whether the change in the zoom level will
adversely affect other users. Thus it is easy to code an InProc web application.

Advertising