OOSE (1)
OOSE (1)
System design involves transforming an analysis model into a system design model. It focuses
on defining design goals and breaking the system into smaller, manageable subsystems. Key
points include:
○ Decompose the system into subsystems using use case and analysis models.
● Strategies Considered:
○ Hardware/software decisions.
This chapter focuses on identifying design goals and initial subsystem decomposition, with
further refinement in the next chapter through the ARENA case study.
1. The house should have two bedrooms, a study, a kitchen, and a living room.
2. Minimize the walking distance for daily activities (e.g., from the entrance to the kitchen).
1. Initial Design: The dining room is too far from the kitchen.
○ Solution: Swap the dining room with bedroom 2, improving access and
increasing sunlight in the living room.
2. Second Revision: The kitchen and stairs are too far from the entrance.
○ Solution: Move the entrance to the north wall, reorient bedroom 2, and bring
the bathroom closer to both bedrooms.
✅ Outcome: The revised plan meets all original constraints by improving efficiency and
space utilization.
6.2 An Overview of System Design
System design is the first step in realizing the system by transforming analysis results into a
structured implementation plan.
Products of Analysis:
2. Use Case Model – Describes system functionality from the actors' perspective.
4. Sequence Diagrams – Shows object interactions for each use case.
1. Design Goals – Derived from nonfunctional requirements and guide trade-offs.
3. Boundary Use Cases – Handles system-level operations (e.g., configuration, startup,
shutdown, error handling).
Subsystem Decomposition:
● Divides the system into manageable parts, each assigned to a team for independent
development.
● Considers system-wide issues to maintain consistency and integration.
✅ Next Steps:
● This chapter focuses on subsystem decomposition and architectural styles.
● The next chapter refines the system design to meet specific goals.
● Subsystem: A part of the system with well-defined boundaries that provides specific
functionality.
● Purpose of Decomposition:
● What is a Subsystem?
● Characteristics of Subsystems:
● Service Definition:
■ Sending notifications.
● Subsystem Interface:
○ Includes:
■ Operation names.
■ Return values.
○ FieldOfficerInterface:
○ DispatcherInterface:
■ Requires ResourceAllocationService to allocate resources for
incidents.
○ ResourceManagement:
○ Early Stage: Use dashed arrows (when the subsystem allocation is not fixed).
○ This ensures:
1. Coupling:
○ Changes to the database only affect the Storage subsystem, reducing the impact
on other subsystems.
Trade-off Consideration:
2. Cohesion:
● Definition: Describes how closely related the elements within a subsystem are.
● Heuristic:
○ Avoid excessive layering; three layers often provide an effective design balance.
● Outcome:
○ Aim for low coupling and high cohesion to improve system flexibility and
maintainability while minimizing unnecessary complexity.
○ Advantages:
○ Control Flow:
○ Advantages:
○ Disadvantages:
○ Advantages:
○ Disadvantages:
○ Advantages:
○ Disadvantages:
○ System Overview: MyTrip is a route-planning system for car drivers that allows
planning via a web service and provides directions through an onboard assistant.
○ Use Cases:
○ Balancing technical goals (e.g., reliability) with managerial goals (e.g., delivery
time).
This process transforms the analysis model into a detailed design model that aligns with user
needs and nonfunctional requirements.
● While cohesion encourages breaking down a system into smaller, more focused
subsystems, coupling encourages minimizing the number of interfaces and
interdependencies between them to reduce complexity and improve maintainability.
Striking a balance between cohesion and low coupling is crucial to achieving an efficient
system architecture.
1. Users must be given feedback within one second after they issue any command:
2. The TicketDistributor must be able to issue train tickets, even in the event of a
network failure:
3. The housing of the TicketDistributor must allow for new buttons to be installed in
case the number of fares increases:
● Proposal:
1. Create a File System Abstraction Layer (FSAL) to handle all file operations.
3. Ensure all data storage operations use the FSAL interface to maintain
portability.
1. Efficiency: Shared data allows faster access without repetitive file parsing.
4. Interactivity: Supports real-time updates for modern IDEs and debugging.
● Convert the message flow in Figure 6-17 into a sequential representation, showing
interactions between Model, View, and Controller with lifelines and method calls.
b. MVC Design Goals Analysis:
1. Extensibility:
○ Helps: New views can be added without changing the model or controller.
3. Modifiability:
System design focuses on translating high-level requirements into an architecture that meets
specific design goals. This process involves balancing trade-offs between performance, cost,
and quality while ensuring the system's structure can support future modifications. Key activities
include:
● Purpose:
● Trade-offs:
● Purpose:
● Considerations:
● Strategies:
○ Use databases for structured data, file systems for large, unstructured data.
● Purpose:
● Approaches:
● Purpose:
● Models:
● Purpose:
● Challenges:
○ Design decisions are guided by goals like performance, reliability, and cost.
○ Specifies who can access which data and whether access control changes
dynamically.
○ Visualize how system components interact and are distributed across physical
devices.
○ Two web browsers (Safari on Mac and Internet Explorer on PC) access a web
server.
○ Components (e.g., the Web server) can be expanded to show their internal
structure, including:
This section describes the activities required to ensure subsystem decomposition meets
nonfunctional requirements and implementation constraints. Key steps in refining subsystem
decomposition include:
○ Example (MyTrip):
○ Persistent Data: Data that outlives system execution (e.g., files, databases).
○ MyTrip Strategy:
○ Storage Options:
These design activities ensure efficient system performance, data integrity, and effective
communication across distributed environments.
**Example (MyTrip):**
For complex systems, access rights are defined per actor per shared object (e.g., bank tellers
can post small transactions, managers approve large ones). This is modeled using an **access
matrix**:
- **Rows:** Actors
**Representation Approaches:**
1. **Global Access Table:** Explicitly lists all `(actor, class, operation)` tuples.
2. **Access Control List (ACL):** Each class has a list of `(actor, operation)` pairs (e.g., a party
guest list).
3. **Capabilities:** Each actor holds `(class, operation)` permissions (e.g., an invitation card).
**Trade-offs:**
When access rights change dynamically (e.g., brokers managing portfolios), the **Protection
Proxy** pattern can enforce checks before delegating operations.
- **Best Practice:** Use established security standards rather than custom solutions.
---
Control flow determines the sequencing of system actions. Three mechanisms exist:
2. **Event-Driven Control:** A central loop dispatches events to appropriate objects (simpler but
harder for multi-step sequences).
**Recommendation:** Prefer event-driven control for stability, but threads may become more
viable with better tooling.
**Control Objects:** Centralize sequencing logic for a use case to improve maintainability.
---
**Benefits:**
---
Address system startup, shutdown, and failure handling via **boundary use cases**:
**Example (MyTrip):**
**Exception Sources:**
**Handling:** Either tolerate failures (e.g., retry network requests) or notify users.
---
**Review Methods:**
- Cross-project evaluations.
**Key Questions:**
- Can every subsystem be traced to a use case or nonfunctional requirement?
UNIT 2
Object design is the phase where the abstract concepts from system design are translated into
a more detailed and practical form by defining and refining objects. It bridges the gap between
application-specific needs and existing reusable components.
1. Reuse:
○ Modify the object design model to meet performance goals such as response
time and memory utilization.
○ Balances system efficiency with scalability.
By focusing on reuse, object design ensures faster, more reliable, and more maintainable
software development.
○ Deadlines for movie releases or software launches create pressure during the
final editing and integration phases.
○ Harry is shot in the right leg but limps on the left throughout the film.
○ Han Solo is frozen in carbonite wearing a jacket but is thawed in a white shirt.
○ Jack has no spit on his face when turning to meet Rose’s mother, but it suddenly
appears mid-turn.
○ Just as actors' positions and props must align across scenes, object states must
remain consistent across modules.
In the following sections, object design concepts, processes, and management practices are
explored to minimize inconsistencies and enhance system reliability.
○ Reuse:
○ Interface Specification:
○ Restructuring:
○ Optimization:
○ Order of Focus: Start with interfaces, components, and patterns for flexibility,
and tackle optimizations later to avoid creating rigid models.
Hhh
Summary of Key Concepts in Object Design: Reuse through Solution
Objects, Inheritance, and Design Patterns
1. Application Objects and Solution Objects (Section 8.3.1)
● Solution Objects: Components not present in the real world but essential for system
function (e.g., user interfaces, databases).
● Process:
○ During object design, refine and add new solution objects to bridge design gaps.
● Implementation Inheritance:
○ Benefits:
● Definition: If a program works with a superclass, it should also work with its subclasses
without modification.
● Application: Ensures objects of a subclass can be substituted for the superclass without
breaking the system.
○ New Views: Addressing usability issues by creating new ways to present data.
○ New Complexity: Expanding the system to handle more complex business logic.
○ Example: In the ARENA system, League data can be stored using stubs, XML
files, or relational databases.
○ Structure:
○ Key Benefits:
○ Structure:
○ Key Benefits:
The Strategy pattern is used to dynamically switch between different network protocols in a
mobile application running on a wearable computer. This design approach separates the logic
for handling various network types and allows future protocol updates without recompiling the
application.
Key Components:
○ Defines a common interface for all network protocols (e.g., local wireless, UMTS,
Ethernet).
Workflow:
1. The LocationManager detects the current location and identifies the best available
network.
3. The NetworkConnection object seamlessly shuts down the current network and
initializes the new one without affecting the main application.
● Decoupling: Isolates network logic from the main application for better maintainability
and testing.
● ********************************************************************************
During object design, the focus shifts from broad system-level tasks to refining individual
objects and their interactions. This stage emphasizes clarity, precision, and
communication to prevent errors while multiple developers work on different parts of the
system simultaneously.
○ Define method parameters, return types, and access control (public, private,
protected) to enforce encapsulation.
○ Define conditions that must always hold true for the object throughout its lifecycle
(e.g., "Account balance cannot be negative").
1. Invariant:
context BankAccount inv: balance >= 0
(Balance cannot be negative)
● Consistency: Follow a uniform style for method names and access levels.
The Stuttgart light rail system transition highlights the challenges of evolving infrastructure,
similar to how software interfaces evolve. By drawing parallels between railroads and object
interfaces, we understand how changes in an interface impact the entire system.
1. Streetcars were slow, shared streets with cars, and had limited passenger
capacity.
2. Light rail offered faster, larger cars on dedicated tracks, providing increased
capacity and predictable schedules.
■ Solution: Platforms were raised on one end and kept low on the other,
resulting in longer platforms.
■ Solution: Made the new signaling compatible with both systems during
the transition.
Outcome: The dual-gauge system allowed uninterrupted public transport during the 31-year
conversion, completing in December 2007.
Like rail systems, software objects interact through well-defined interfaces. Changes in these
interfaces disrupt services unless the connected systems adapt.
1. Define Clear Boundaries: Ensure each object clearly specifies its services (methods)
and assumptions (preconditions).
2. Plan for Evolution: Like Stuttgart’s dual-compatibility approach, design flexible
interfaces that support future growth.
3. Maintain Consistency: Keep all interacting systems synchronized when interfaces
change.
Would you like a deeper dive into UML Object Constraint Language (OCL) or how this applies
to modern software design?
At this stage in system development, various models guide the structure and behavior of the
system. However, these models only provide partial views—object design integrates them into
a coherent and precise framework. The primary objective of interface specification is to
clearly define how objects interact to ensure seamless integration among developers.
○ Identifies system components forming the virtual machine (e.g., classes and
APIs).
○ Enhance the object design model by adding these attributes and operations.
○ Define which operations are accessible to other objects (public) and which are
internal (private).
Would you like a breakdown of UML Object Constraint Language (OCL) or real-world
examples of interface design?
○ Class Implementor: Designs and implements the internal structure and methods
of the class.
○ Class User: Invokes public methods of a class while developing another class
(client class).
○ Class Extender: Creates specialized versions of the class while accessing
protected methods and attributes.
○ Precondition: Must be true before method execution (e.g., a player must not be
already accepted).
These concepts ensure clarity and consistency in class design across different developer roles.
Here’s a more detailed version of the 15 versatile terms and definitions, giving you deeper
insights and flexibility to use them across technical, academic, and professional settings:
1. Algorithm:
A finite, well-defined sequence of instructions designed to perform a specific task or
solve a problem. Algorithms are the building blocks of computer programs and can
range from simple (sorting) to complex (machine learning models). They focus on
efficiency, accuracy, and scalability.
✅ Use it when: Describing how to enhance performance, reduce waste, or improve results.
4. Abstraction:
A conceptual model that hides unnecessary complexity and exposes only the
essential features. In coding, it refers to simplifying implementation by focusing on
what a system does rather than how it works.
6. Interoperability:
The ability of different systems, devices, or platforms to communicate, exchange,
and use information seamlessly. It’s vital in complex ecosystems like IoT, healthcare,
and software integrations.
11.Normalization:
A process in database management that organizes data to reduce redundancy and
inconsistency by breaking data into smaller tables and establishing relationships.
12.Encapsulation:
A fundamental concept in object-oriented programming where data and methods are
bundled together. It protects internal object details and restricts direct access, enhancing
security and modularity.
✅ Bonus Tip: If you’re ever stuck, start by defining one of these terms and then relate it to the
context of your question. Most technical concepts fit into at least one of these categories!