Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Defining persistent data stores, example Päivi Ovaska.

Similar presentations


Presentation on theme: "Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Defining persistent data stores, example Päivi Ovaska."— Presentation transcript:

1 Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Defining persistent data stores, example Päivi Ovaska

2 Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 2 Defining persistent data stores in MyTrip RoutingSubsystem  Store the current Trip in a file on a small removable disk in order to allow the recovery of the Trip in case the driver shuts off the car before reaching the final Destination  Simplest and most efficient solution  RoutingSystem will only store complete trips to the file before shutdown and load the file at start-up PlanningSubsystem  Trips will be stored in a database  This subsystem can then be used to manage all Trips form many drivers as well as the maps needed to generate the trips  Allows to perform complex queries on these data -> Two new subsystems: TripFileStoreSubsystem, MapDBStoreSubsystem

3 Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 3 TripFileStoreSubsystem The TripFilesStoreSubsystem is responsible for storing trips in files on the onboard computer. Because this functionality is only used for storing trips when the car shuts down, this subsystem only supports the fast storage and loading of whole trips MapDBStoreSubsystem The MapDBStoreSubsystem is responsible for storing maps and trips in a database for the PlanninSubsystem. This subsystem support multiple concurrent drivers and planning agents

4 Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 4 Trip database design Relational database tables: Trip, Destination, Direction, Crossing, Segment Each attribute is mapped To the column of database Associations mapping See lecturers

5 Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 5 Encapsulating data stores  Once we select a storage mechanism, for example relational database, we can encapsulate it into a subsystem and define a high level interface that is vendor independent  Bridge pattern allows the interface and the implementation of a class to be decoubled  ODBC class defines the interface visible to the client  ODBC Implementation class is an abstract class that defines the lower level methods available for ODBC  ODBC instance maintains a reference to its corresponding ODBC Implementation instance.

6 Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 6 Component Diagram of MyTrip


Download ppt "Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Defining persistent data stores, example Päivi Ovaska."

Similar presentations


Ads by Google