Page 298 -
P. 298

chaPter 10  •  object-oriented systems analysis and design Using Uml     265



                                                COnsULting OppOrtUnity 10.2



                                           Recycling the Programming Environment



                   “I feel like I’m writing the same code over and over again,” says   four-wheel electric cart, similar to a golf cart except that it has
                   Benito Pérez, a programmer working on a new automated ware-  no seats. Flatbed robot trolleys have a flat 6´ × 4´ cargo sur-
                   house design. “I have written so many programs lately that deal   face about 3´ above ground level. These trolleys have a radio
                   with robotic-type things that control themselves: automated mail-  communications device that provides a real-time data link to
                   room trolleys, building surveillance robots, automatic pool clean-  a central warehouse computer. Flatbed trolleys have two sen-
                   ers, automatic lawn mowers, monorail trains, and now warehouse   sors: a path sensor that detects a special type of paint and a
                   trolleys. They are all variations on a theme.”          motion sensor that detects movement. These trolleys follow
                      Lisa Bernoulli, the project manager, has heard this sort of   painted paths around the factory floor. Special paint codes
                   complaint for years. She replies, “Oh, come on, Ben. These things   mark forks and branches in the paths, trolley start and stop
                   aren’t really that close. How can you compare a mailroom robot,   points, and general location points.
                   an automated warehouse, and a monorail train? I’ll bet less than 10   The facility includes three loading dock stations and 10
                   percent of the code is the same.”                       workstations. Each station has a video terminal or computer
                      “Look,” says Benito. “All three involve machines that have to   connected to the central computer. When products are needed
                   find a starting point, follow a circuitous route, make stops for load-  or are ready to be collected from a workstation, the central
                   ing and unloading, and eventually go to a stopping point. All three   computer is informed by the worker at the station. The central
                   have to make decisions at branches in their routes. All three have   computer then dispatches trolleys accordingly. Each station
                   to avoid colliding with things. I’m tired of redesigning code that is   has a drop point and a pickup point. Flatbed trolleys move
                   largely familiar to me.”                                about the factory picking up work at pickup points and drop-
                      “Hmmm,” Lisa muses as she looks over the basic requirements   ping off work at drop points. The program that will run the
                   for the warehouse system and remembers the monorail system she   trolleys must interact heavily with the existing job-scheduling
                   and Benito had worked on last year. The requirements regarded a   program that helps schedule workstation tasks.
                   small-lot electronics manufacturing firm that was automating its   How should Lisa go about reusing Benito Pérez’s work on
                   warehouse and product movement system. The warehouse con-  the monorail in their current task of creating a trolley object?
                   tains incoming parts, work in progress, and finished goods. The   Explain in two paragraphs.
                   automated warehouse uses a flatbed robot trolley. This robot is a




                 large organizations exists on mainframe databases, and an enormous number of mainframe pro-
                 grams are in existence.
                     When an event crosses the swimlane from the server to the mainframe computer, there must
                 be a mechanism for transmitting the event data between the two platforms. Servers use a dif-
                 ferent format to represent data (ASCII) than do mainframe computers (EBCDIC). Middleware
                 must be present to take care of the conversion. IBM computers often use an mqueue (for mes-
                 sage queue). The mqueue receives data from the server programs, places it in a holding area, and
                 calls a mainframe program, usually written in a language called CICS. This program retrieves or
                 updates the data, and sends the results back to the mqueue.
                     In the activity diagram shown in Figure 10.9, the decision below the Get Student Record
                 state is made on the mainframe computer. This means that the message queue receives either a
                 “Not Found” message or the database record for the student. If the mainframe simply placed the
                 Record Status Received in the message queue and the decision was evaluated on the server, the
                 server would have to call the mainframe again to obtain the valid data. This would slow down
                 the response to the person waiting at the browser.
                     Swimlanes also help to divide up the tasks in a team. Web designers would be needed for
                 the web pages displayed on the client browser. Other members would work with programming
                 languages, such as Java, PHP, Ruby on Rails, Perl, or .NET, on the server. Mainframe CICS
                 programmers would write programs that would work with the message queue. An analyst must
                 ensure that the data that the various team members need are available and correctly defined.
                 Sometimes the data in the message queue are contained in an XML document. If an outside orga-
                 nization is involved, the data also might be an XML document.
                     The activity diagram provides a map of a use case and allows an analyst to experiment
                 with moving portions of the design to different platforms and ask “What if?” for a variety of
   293   294   295   296   297   298   299   300   301   302   303