MIST1 - kurze zusammenfassung PDF

Title MIST1 - kurze zusammenfassung
Author cribb Bb
Course Muster in der Softwaretechnik
Institution Technische Universität München
Pages 3
File Size 216.3 KB
File Type PDF
Total Downloads 22
Total Views 131

Summary

kurze zusammenfassung...


Description

Patterns in the Software Engineering -Wintersemester 2017Introduction Patterns (PT) Help to build complex software systems in the context of frequent change by reducing complexity and isolating the change. SD & SEK Software Development (SD) - Is problem solving; is about dealing with complexity; creating abstraction with models. Is knowledge management ; is rationale management. Software Engineering Knowledge (SEK) Is not only a set of algorithms, it also contains a catalog of patterns describing generic solutions for recurring problems. Algorithm A method for solving a problem using a finite sequence of well-defined instructions for solving a problem. Starting from an initial state, proceeds through a series of successive states and eventually terminating in a final state. Patterns Describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem in such a way that you can use this solution a million times over, without ever doing the same way twice.  a three-part rule, which expresses a relation between a certain context, a problem and a solution. (Christopher Alexander) Categorization of Patterns Pattern Language A collection of patterns that forms a vocabulary for understanding and communicating ideas. - Describes software frameworks or families of related systems. Pattern Catalog a collection of related patterns - Typically subdivides the patterns into at least a small number of broad categories and may include some amount of cross referencing between patterns. Categorization of Patterns (Buschmann et al) Architectural Pattern Design Pattern - Expresses a fundamental - Provides a schema for the structural organization for subsystems of a software system software systems. and the relationship between them. - Provides a set of predefined - Describes commonly structures subsystems, specifies of communicating components responsibilities and includes that solves a general problem guidelines for organizing the within a particular context. relationships between them.

Alternative Categorization Conceptual Pattern - a pattern whose form is described by means of terms and concepts from an application domain.

Design Pattern - a pattern whose form is describes by means of software design constructs, f.e. objects, classes, inheritance, aggregation and use-relationship.

Idiom (Coding Pattern) - A low-level pattern specific to a programming language - Describes how to implement particular aspects of components or the relationships between them using the features of the given language.

Programming Pattern - a pattern whose form is described by means of programming language constructs.

Patterns Address Nonfunctional Requirements

Petrovski: “Success in Engineering is defined by its failures” Object-Oriented Programming and Basics Abstraction Creating a model of the problem in terms of classes and the relationships between them

Encapsulation - objects are self-contained set of data and behavior. - an object can determine which part of its data and behavior is exposed to the outer world (with access modifiers public, private, protected) - what an object exposes to the outer world is called its public interface Information Hiding - a calling module (class, subsystem)does not need to know anything about the internals of the called module (principle od information hiding – David Parnas) - good object design heuristic: make all attributes of a class private, make all operations of a class private, only public methods can be used to modify a classes attributes

Coupling - measures the dependencies between subsystems

Cohesion

- measures the dependencies among classes within a subsystem What makes a good design? (reduced complexity, prepared for change, low coupling, high cohesion, extensibility)

Low coupling (LC)- the subsystem should be as independent of each other as possible - a change in one subsystem should not affect any other subsystem High cohesion (HC)- a subsystem should only contain classes which depend heavily on each other Law of Demeter (LoD) To achieve LC and HC => Principle of Least Knowledge. Polymorphism : The ability of an object to assume different forms or shapes  the ability of an abstraction/interface to be realized in multiple way  the dynamic treatment of objects based on their type

Polymorphism –A Taxonomy Polymorphism

Universal Polymorphism

Parametr ic Polymorphism

Generics

Inclusion Polymorphism

Subtyping

Ad-Hoc Polymorphism

Overloading

Coercion

Subclassing

Inclusion Polymorphism  Subtyping – based on the subset metaphor Subclassing – based on the inheritance metaphor Binding - establishes the mapping between names and data objects and their descriptions Early Binding (Static binding, at compile time)- the premature choice of operation variant, resulting in possibly wrong results and run-time system crashes Late Binding (Dynamic binding, at run time)- the guarantee that every execution of an operation will select the correct version of the operation, based on the type of the operation’s target

Delegation = a mechanism for code reuse in which an operation resends a message to another class to accomplish the desired behaviour.

Delegation (BETTER!) -a class catches an operation and sends it to another class Subclassing - a subclass extends a super class with new operations or overrides existing operations...


Similar Free PDFs