Coding Idioms
Redesign Home Design Patterns Coding Idioms Classes

XSPEC12's design attempts to make full use of the wisdom amassed by experience in C++, programming large scale projects, and idioms for effective and robust coding. At the same time, it's hard to apply all of the ideas rigorously (well, at least not at the initial release...). Some of the important ideas are:

  • Loose coupling: having objects relating to each other by well-defined minimal interfaces that hide the implementation details so that they may be maintained independently.
  • Standard Library: the library, comprising algorithms and containers that were formerly referred to as the Standard Template Library but incorporated into the language standard, gives a rich vocabulary of data structure that are well-exercised, mathematically elegant, and robust in the sense defined below.
  • Physical Layout: techniques exist to reduce the coupling between different parts of the code to expedite compilation (C++ compilers do far more work than fortran or C compilers and compilation is relatively CPU intensive).
  • Extensibility I: the ability to have new functionality added to objects through adopting specific patterns.
  • Extensibility II: the ability to add new types of objects at runtime that perform similar tasks with different implementation
  • Modularity in development: separating interface from implementation allows development to proceed without different parts of the problem impeding one another.
  • Maintainability: runtime loading implies that the core implementation of the program does not need to be changed to add functionality, so that older code need not be opened to the possibility of inadvertently adding new problems in the process of extending the program
  • Robustness: Exception safety guarantees can be enforced so that the program's state is never put in an undefined state during its execution, or better, returns exactly to an earlier state if an error is encountered.

[Redesign Home]
[Design]
[Problem]
[Scripting]
[Compatibility]

Xspec Xspec Home Page


HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 27-Jun-2018 10:04:03 EDT