Structural and Behavioral Design Patterns in Software Development

Classified in Computers

Written at on English with a size of 2.12 KB.

Structural Design Patterns

Decorator - Adds additional functionality to a class

Adapter - 'adapts' one interface for a class into one that the client expects

Façade - creates a simplified interface from an existing one

Flyweight - A high quantity of objects share common properties to save space.

Bridge - decouples an abstraction from its implementation so that the two can vary independently.

Behavioral Design Patterns

Chain of Responsibility - Linked list of handlers

Command - Enables all the info for a request to be contained within a single object.

Interpreter - Developing domain specific languages

Iterator - Sequentially access elements of an aggregate object.

Mediator - Removes the need for classes to communicate with each other directly.

Observer - Allows objects to be linked. Changed ones are auto reflected in others.

State - Allows objects to change their behavior

Strategy - Similar algorithms are defined in their own class.

Template - Defines a group of interchangeable similarly structured algorithms

Visitor - Separates structured data from the functionality that may be performed upon

Memento Pattern - Used in undo frameworks to bring object back to previous state.

UML Diagram - Aggregation (HAS - A)

Inheritance - (IS - A)

Diamond = aggregation = Denote multiplicity = Can survive individually.

Composition - cannot survive individually

Reflection - Gives program ability to manipulate values, metadata in runtime.

Test Driven Development

Top Down - Emphasize on planning complete overall understanding of system

Bottom Up - Emphasize coding and testing

Test Driven - Design modular classes and decide what needs to be coded or tested.

Levels of testing

Unit Testing - Testing each module

Integration Testing - Tests the interfaces between modules. Hard AF

Regression Testing - Done after modification to ensure that the correct behavior of the original program is preserved.

System testing tests overall behavior in an integrated environment.

Entradas relacionadas: