Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the most important structured software design principles? [closed]

Today I saw a job description that requires "significant experience coding in C++ and a thorough grounding in structured design principles", so I thought about what these principles are. First I felt it was a little odd to see C++ and "structured design" in one sentence, then I thought, OK C++ is a multi-paradigm programming language, so perhaps it's used like C. I also looked up the Wikipedia page and read about exception handling and state machines are anti structured design (no surprise), but I still feel like many things are missing. So I'm asking you, what are the most important structured software design principles?

like image 254
grokus Avatar asked Dec 29 '22 04:12

grokus


1 Answers

Structured programming and structured design wouldn't necessarily be the same thing. Structured design in general is going to focus on breaking things down into structured elements. There are a bunch of approaches that are equally valid here, but I would say that most of them focus on information hiding.

  • Object Oriented Design obviously breaks things down into objects with operations and data held together in tightly bound classes related in hierarchies
  • Abstract Data Types are essentially non-OO equivalents where the data and operations are held together but are not bound in quite the same sense as in object oriented design. Hierarchy and inheritance don't play a role with ADTs, at least not in those that I've seen.
  • Metaprogramming focuses on building generic types and then specializing them appropriately for specific data types
  • Programming to a contract focuses on avoiding direct inheritance. Typically it combines Contract Interfaces with implementation by composition of multiple classes.
  • Design Patterns focus on high-level meta-designs (patterns) that can be implemented in almost any context, although they are most commonly seen in discussions of OO design.

Knowing how to structure programs in multiple paradigms is always going to be valuable knowledge. Knowing how to talk about the structure of a design is more finicky but ultimately even more valuable.

like image 83
Mike Burton Avatar answered May 03 '23 19:05

Mike Burton