Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.

Similar presentations


Presentation on theme: "Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles."— Presentation transcript:

1 Design Patterns OOD

2 Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples)

3 Stages of Learning Learn the Rules! –algorithms, data structures and languages of software –write programs, although not good ones Learn the Principles! –software design –programming paradigms with pros and cons Learn the Patterns! –study the "design of masters" –Understand! Memorize! Apply! Learn the Rules! –algorithms, data structures and languages of software –write programs, although not good ones Learn the Principles! –software design –programming paradigms with pros and cons Learn the Patterns! –study the "design of masters" –Understand! Memorize! Apply!

4 Goals of Design Decompose system into components Determine relationships between components –identify component dependencies –determine inter-component communication mechanisms Specify component interfaces –Interfaces should be well defined Describe component functionality – informally or formally Decompose system into components Determine relationships between components –identify component dependencies –determine inter-component communication mechanisms Specify component interfaces –Interfaces should be well defined Describe component functionality – informally or formally

5 Decomposition Motivation: handle complexity by splitting large problems into smaller problems, i.e. "divide and conquer" methodology 1.Select a piece of the problem (initially, the whole problem) 2. Determine the components in this piece using a design paradigm –e.g. functional, structured, object-oriented, generic, etc. 3. Describe the components interactions Repeat steps 1 through 3 until some termination criteria is met –e.g., customer is satisfied, run out of money, etc. Motivation: handle complexity by splitting large problems into smaller problems, i.e. "divide and conquer" methodology 1.Select a piece of the problem (initially, the whole problem) 2. Determine the components in this piece using a design paradigm –e.g. functional, structured, object-oriented, generic, etc. 3. Describe the components interactions Repeat steps 1 through 3 until some termination criteria is met –e.g., customer is satisfied, run out of money, etc.

6 Component a software entity encapsulating the representation of an abstraction a vehicle for hiding at least one design decision a "work" assignment for a programmer or group of programmers a unit of code that has one or more names has identifiable boundaries can be (re-)used by other components encapsulates data hides unnecessary details can be separately compiled (if supported) a software entity encapsulating the representation of an abstraction a vehicle for hiding at least one design decision a "work" assignment for a programmer or group of programmers a unit of code that has one or more names has identifiable boundaries can be (re-)used by other components encapsulates data hides unnecessary details can be separately compiled (if supported)

7 Component Interface A component interface consists of several sections: Imports –services required from other components Exports –services provided to other components Access Control –e.g. protected/private/public A component interface consists of several sections: Imports –services required from other components Exports –services provided to other components Access Control –e.g. protected/private/public

8 Modularity A modular system is one that's structured into identifiable components Modularity is important for both design and implementation phases Modularity facilitates software quality factors, e.g.: –Extensibility –Reusability –Portability A modular system is one that's structured into identifiable components Modularity is important for both design and implementation phases Modularity facilitates software quality factors, e.g.: –Extensibility –Reusability –Portability

9 Information Hiding Motivation: design decisions that are subject to change should be hidden behind abstract interfaces, i.e. components Components should communicate only through well- defined interfaces Each component is specified by as little information as possible If internal details change, client components should be minimally affected –not even recompiling or linking Information hiding is one means to enhance abstraction! Motivation: design decisions that are subject to change should be hidden behind abstract interfaces, i.e. components Components should communicate only through well- defined interfaces Each component is specified by as little information as possible If internal details change, client components should be minimally affected –not even recompiling or linking Information hiding is one means to enhance abstraction!

10 OO Design vs. OO Programming Object-Oriented Design –a method for decomposing software architectures –based on the objects every system or subsystem manipulates –relatively independent of the programming language used Object-Oriented Programming –construction of software systems as Structured collection of Abstract Data Types (ADT) Inheritance Polymorphism –concerned with programming languages and implementation issues Object-Oriented Design –a method for decomposing software architectures –based on the objects every system or subsystem manipulates –relatively independent of the programming language used Object-Oriented Programming –construction of software systems as Structured collection of Abstract Data Types (ADT) Inheritance Polymorphism –concerned with programming languages and implementation issues


Download ppt "Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles."

Similar presentations


Ads by Google