First Pass Modeling Efforts (and Some Typical Modeling Mistakes)

During the prototyping release of the software, the team members began to get their feet wet with a little bit of modeling. Mostly they were figuring out how to program the new release of ArcGIS Server, but they also wanted to learn the Enterprise Architect (EA) modeling tool, and they generally tried to add a little bit of modeling into the mix. But at this point they weren’t “modeling like they meant it”—that is, they weren’t trying to drive the design and the code from the model. So, as you’ll see over the next few chapters, the initial models weren’t very “tight,” but they definitely got better over time.

For the first-cut modeling activity during the prototype release, the team just grabbed the domain model that was left over from the JumpStart workshop, which was discussed in the last chapter. They used this domain model to help build the prototype and to help focus on the end product that the customer ultimately wanted.

Release 1 had a set of deliverables associated with it (i.e., the minimum functionality that the customer would want to see in the first release). It had also been agreed, however, that this first release wouldn’t go into production—a second release would follow shortly afterward.

These functional requirements can come from a variety of sources: conversations with the customer, e-mails like the one shown in the previous section, and formal requirements specifications. Whatever the format of the requirements, the team needs to extract a useful domain model from them, and in so doing lay the groundwork for writing a set of use cases describing the system behavior.

Let’s zero in on the use case “Generate Hotel Map for AOI.”

Use Case: “Generate Hotel Map for AOI” (First Version) 

The user clicks a hyperlink for a predetermined AOI or an AOI is created via the “Generate AOI” use case. The system passes the geographic extent of the AOI to the Map Viewer. The Map Viewer queries ArcGIS Server for a base map within the geographic extent.

The Map Viewer queries ArcGIS Server again and asks for all hotel attributes and locations within the map extent.The Map Viewer gets the results and stores them in local memory.

The system shows the map on the screen and puts an icon on the map for each hotel. When the user moves the mouse over a hotel, the system shows the hotel name in a tip window.When the user clicks a hotel icon, the system calls the “Display Rollover Information” use case.When the user clicks the map, or when the user clicks the Zoom In button and drags a rectangle on the map, the system calls the “Pan/Zoom Map” use case. When the user clicks the hotel hyperlink on the rollover window, the system calls the “View Detailed Hotel Info” use case.

Although this use case looks fine, it should start a small alarm bell ringing somewhere in the back of your head. The text is fine, because it’s written in active voice, present tense, and generally uses “user action/system reaction” couplets. However, the use case shows only the basic course. The absence of any alternative courses is a useful warning sign that this use case and its associated sequence diagram need more work.

With the domain model and first use case description in place, the team next created a robustness diagram for the “Generate Hotel Map for AOI” use case (see Figure 6-2).

image from book
Figure 6-2: In-progress robustness diagram for the “Generate Hotel Map for AOI” use case

It’s worth noting a few modeling issues with this robustness diagram:

  • It isn’t drawn to the same level of detail as the use case text.

  • The use case text has “ArcGIS Server” whereas the robustness diagram has “Map Server.” These are ambiguously used names for the same thing (i.e., ArcGIS Server is the product name of the Map Server).

  • Neither ArcGIS Server nor the Map Server exists on the domain model.

  • Neither ArcGIS Server nor the Map Server appears on the sequence diagram (see Figure 6-3).

    image from book
    Figure 6-3: The “Generate Hotel Map for AOI” sequence diagram at an early stage

The use case text states

The Map Viewer queries ArcGIS Server again and asks for all hotel attributes and locations within the map extent. The Map Viewer gets the results and stores them in local memory.

What does this sentence imply on the sequence diagram (which we show later, in Figure 6-3)? It implies an operation called GetHotelsInExtent, which should be an operation of the Map Server. GetHotelsInExtent should also be a controller on the robustness diagram. Instead, we can see in Figure 6-3 that GetHotelsInExtent is (erroneously) an operation on the Hotel object.

It’s worth pausing to analyze exactly why this error occurred, because (as it turns out) it reveals a common modeling issue. Put simply, the various parts of this model that should be tightly coupled together are not. The use case text and robustness diagram don’t match, and (more important) the robustness diagram hasn’t been used to disambiguate the use case text and make it match the domain model. Since the robustness diagram wasn’t detailed enough, it wasn’t used to create the skeleton sequence diagram following the steps defined in ICONIX Process (i.e., copy the boundary and entity classes from the robustness diagram, etc., as described in 5.] These errors are tremendously easy to make! That’s why the step-by-step “cookbook” guidance exists.

Let’s feed this back into the diagrams that we have so far. First, we need to add “Map Server” to the domain model, and then stop using the term “ArcGIS Server.” Next, we rewrite the sentence from the use case as follows:

The Map Viewer queries the Map Server for all the hotels within the map extent; the result is returned in a Hotel Collection.

This disambiguated sentence results in a clear and explicit robustness diagram and a correct sequence diagram, where the FindHotelsInExtent operation will naturally get assigned to the Map Server, where it belongs.

We’ll revisit the “Generate Hotel Map for AOI” robustness diagram later in this chapter and see how this modeling feedback improves it.

Normally, we would aim to get the robustness diagrams to a level closer to completion before moving on to the sequence diagrams. However, this being a prototype release, the team was really focusing more on gaining an understanding of how to program the new server software and wasn’t paying too much attention to all of the modeling details, as the team wasn’t driving the design/code from the model. Using the robustness diagram in its current state (as shown in Figure 6-2), the team quickly moved on to the matching sequence diagram (see Figure 6-3). The result is obvious: the sequence diagram contains all the same ambiguities and “classic” modeling errors as the robustness diagram.

Iterating between diagrams can have its benefits, though. In this case, it was obvious that the sequence diagram in Figure 6-3 wasn’t sufficient to code from. So the team needed to take a couple of steps back and review what was going wrong. Sometimes venturing ahead slightly can provide useful warning signs that more preparatory work needs to be done first.

image from book
CUSTOMER REVIEW MEETING BETWEEN THE FIRST AND SECOND MODELING ITERATIONS

Before the second modeling pass began, Doug visited the ESRI offices to exercise his “agile stakeholder rights” to add new requirements in the middle of the release, and also to do a little modeling coaching.

The resultant notes from the project review meeting provide some insight into this role. In particular, they show how an off-site customer can overcome some of the hurdles that naturally stand in his way if he can’t be on-site with the project team 100% of the time (we discuss these hurdles in the section “Chapter 1).

- MEETING NOTES -

AMWIP PROTOTYPE AND MODEL REVIEW

ESRI ATTENDEES:

DAVID LEWIS, AMIR SOHEILI

ICONIX ATTENDEES:

DOUG ROSENBERG

Date:

11/11/03

1. Mapplet prototype review and feedback

Doug requested that display filters for AOI and Hotel Price Band should be part of the URL. The following name/value pair examples were discussed to define AOI:

AOI Name/Value Pairs

ZipCode=’92373’

HotelID=’123456’

StreetName=’380 New York Street’City=’&Redlands’&State=’CA’&ZipCode=’92373

X=’34.4567’&Y=’-117.1345’

X1=’34.4567’&Y1=’-117.1345’&X2=’36.4567’&Y1=’-118.1345’

Hotel Price Band Name/Value Pairs

PB=’L’ (Luxury)

PB=’UL’ (Upscale, Luxury)

PB=’MUL’ (Midrange, Upscale, Luxury)

PB=’EMUL’ (Economy, Midrange, Upscale, Luxury)

Preview JPEG on VResorts site will link to new web page of map viewer. Mapplet will display default settings based on name/value pairs above. Note: Mapplet should cache all hotel price bands locally on the client; however, it should only display by defaults defined in name/value pairs.

Map tips on mouse hover should be a little bigger.

Size of Hotel icon should reflect price band. Graduated circle symbols, as opposed to beds, may be used for display. Coloring should make Luxury stand out most, followed by Upscale, etc.

“Zoom to Zip Code” text box and “Click Here To Enter Address” link should be available below the mapplet.

Price Band legend should include a title and price band descriptions.

In the Hotel pop-up, three links will be provided (if available): “View hotel brochure”, “View hotel overview”, and “Check rates”. These links will be to the predefined URL appended with the HotelID and associated suffixes B, O, or R. The link will display only if these pages are available as defined in the hotel database.

Example URL: http://reservations.vresorts.com/hotel/10004663-102034663B.html

Overview Map at the bottom of the screen would be a nice-to-have; however, it is a low priority at this point.

2. Overview of current model

Revisited use case “Generate Hotel Map for AOI.” Rewrote use case, robustness, and sequence diagrams.

ESRI will provide a high-level architecture diagram of ArcGIS Server/.NET interaction for inclusion in the book.

ESRI to revisit remaining use cases and provide update before making further code changes.

3. Mapplet iteration 2

Was briefly discussed that the second iteration should focus on more sophisticated display filtering and saving personal profiles of users as a client-side cookie for default displays.

Mentioned the potential of also adding routing functionality.

ESRI may recommend some additional use cases/upgrades that may be applicable.

image from book

[5.]This type of error (a GetHotels method on a Hotel class) sometimes happens if the designer is thinking that Hotel represents a Hotel Table in a DBMS as opposed to a Java or C# class representing a single hotel. Getting the hotels out of a hotel table is a fairly typical occurrence. But it’s important to keep the distinction clear between classes and tables, as they aren’t the same thing.



Agile Development with ICONIX Process. People, Process, and Pragmatism
Agile Development with ICONIX Process: People, Process, and Pragmatism
ISBN: 1590594649
EAN: 2147483647
Year: 2005
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net