FM

Chapter 7

Chapter 7 of the textbook covers the software engineering stage of design and implementation. This stage is where the executable software system is developed, and it involves interleaved activities of designing components and relationships, and realizing them in code.

Object-oriented design using UML is a major topic. Object-oriented design includes creating system models such as context models, interaction models, and use case models. These are essential for understanding how a system interacts with its environment and for setting system boundaries. Models are especially useful in large systems with multiple development teams, as they serve as a communication tool.

A significant choice in implementation is "build or buy". In many domains, it is more efficient to buy commercial off-the-shelf (COTS) systems and configure them, instead of developing systems from scratch. This impacts the design process, shifting focus to configuring existing tools to meet requirements.

The object-oriented design process typically includes defining system context and usage modes, designing architecture, identifying system objects, developing models, and specifying interfaces. System context models show external systems involved, while interaction models show runtime behavior.

For example, in a wilderness weather station system, the weather station collects and summarizes data like temperature, pressure, wind speed and direction, and rainfall. These data are reported hourly, usually through satellite communication. The system consists of subsystems that broadcast messages across a shared infrastructure. The architecture follows a loosely coupled design.

Object class identification is a central task. There is no automatic method—it depends on designer experience and domain knowledge. It can be done by analyzing system descriptions grammatically, identifying tangible domain entities, or using behavior and scenario-based methods. In the weather station example, classes include tangible instruments (thermometer, barometer), the weather station interface, and the weather data container.

Design models include static models (class diagrams, relationships) and dynamic models (interactions and behavior over time). Subsystem models group objects logically. Sequence models show object interactions over time, and state machine models describe object state transitions in response to events.

Interfaces must be well-defined to allow parallel development. Interfaces should not expose internal object details and may provide multiple viewpoints. UML class diagrams or programming languages like Java are used to define interfaces.

Design patterns are another important concept. A design pattern is a reusable solution to a common design problem. Patterns abstract a problem and solution in a way that they can be reused in various settings. Each pattern includes a name, problem, solution, and consequences. An example is the Observer pattern, used when multiple displays of an object’s state are needed. The pattern defines abstract Subject and Observer classes and concrete implementations that maintain and reflect state changes across displays with minimal coupling.

Other patterns mentioned include Façade (simplify interfaces to complex systems), Iterator (access elements of collections), and Decorator (extend class functionality at runtime).

Implementation issues include software reuse, configuration management, and host-target development. Software reuse can occur at various levels:

  • Abstraction level: reuse ideas, not code

  • Object level: reuse library classes

  • Component level: reuse sets of related objects

  • System level: reuse entire systems

Reuse comes with costs, including time spent finding and evaluating reusable components, purchasing licenses, adapting software, and integrating components.

Configuration management is vital to control changes in evolving systems. It includes version management (tracking changes and coordinating teams), system integration (automated builds of system versions), and problem tracking (managing bug reports and fixes).

Host-target development means software is developed on one platform (host) and executed on another (target). These platforms differ in software and hardware. Tools in development platforms include compilers, debuggers, UML editors, testing tools like Junit, and project organization tools. These are often combined into Integrated Development Environments (IDEs), tailored to specific programming languages.

Deployment considerations include compatibility with hardware/software platforms, the need for redundancy in high availability systems, and minimizing communication delays between components by co-locating them.

Open source development is another approach where the source code is publicly available. It started from the Free Software Foundation's ideas and expanded through internet-based collaboration. Examples of open source software include Linux, Apache, Java, and MySQL.

Open source raises key questions such as whether to use open source components, or whether to develop software as open source. Many companies now use open source development to build software faster and cheaper, earning revenue by offering support rather than selling the software.

Licensing is a key issue in open source. Common licenses include:

  • GNU General Public License (GPL): reciprocal, requires derivative works to also be open source.

  • GNU Lesser GPL (LGPL): allows linking with proprietary code without open-sourcing the proprietary parts.

  • BSD License: non-reciprocal, allows integration with proprietary software without sharing modifications.

Proper license management is necessary. Organizations must track open-source components, understand license terms, plan for component evolution, educate developers, audit usage, and participate in the open source community.

Final key points:

  • Design and implementation are closely related.

  • Object-oriented design uses various models and interface specifications.

  • Patterns help solve common design problems.

  • Reuse is essential to modern development.

  • Configuration management ensures consistency and collaboration.

  • Host-target development is standard in most software projects.

  • Open source offers powerful collaboration but must be managed carefully through licensing and policy.