Software Engineering Fundamentals (SEF): MS.NET Design Patterns

Содержание

Слайд 2

Origin and history

Book about architectural patterns by Christopher Alexander (1977)
Kent Beck’s and

Origin and history Book about architectural patterns by Christopher Alexander (1977) Kent
Ward Cunningham’s presentation at OOPSLA (1987)
Book about software design patterns by gang of four (1994)

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 3

What they are?

Reusable templates for solving recurring software design problems.

© Accenture. By

What they are? Reusable templates for solving recurring software design problems. ©
Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 4

Why they matter?

No need to discover (productivity)
Solution verified over time (reliability)
Common language

Why they matter? No need to discover (productivity) Solution verified over time
for developers

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 5

Use and misuse

Apply design patterns only when needed and only those which

Use and misuse Apply design patterns only when needed and only those
give benefit in your context.

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 6

Classification

Creational (Builder, Singleton, Factory, …)
Structural (Facade, Decorator, Composite, …)
Behavioral (Strategy, Chain of

Classification Creational (Builder, Singleton, Factory, …) Structural (Facade, Decorator, Composite, …) Behavioral
responsibility, …)

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 7

Simple factory

Class which defines a method for creating instances of other classes.
Not

Simple factory Class which defines a method for creating instances of other
actually a pattern.
Advantages?
Construction logic is separated
Dependent object can be easier switched (unit testing, …)

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 8

Facade

Provide a unified interface to a set of interfaces in a subsystem.

Facade Provide a unified interface to a set of interfaces in a
Facade defines a higher-level interface that makes the subsystem easier to use.
Advantages?
Client code is decoupled from subsystem
Interaction with subsystem in single place
Simplified interface to set of classes

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 9

Repository

Mediates between the domain and data mapping layers using a collection-like interface

Repository Mediates between the domain and data mapping layers using a collection-like
for accessing domain objects.
Advantages?
Centralized data access
Business logic is decoupled from data access

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 10

Decorator

Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative

Decorator Attach additional responsibilities to an object dynamically. Decorators provide a flexible
to subclassing for extending functionality.
Advantages?
Helps avoid class explosion
Behavior can be added\changed dynamically

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 11

Template method

Define the skeleton of an algorithm in an operation, deferring some

Template method Define the skeleton of an algorithm in an operation, deferring
steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
Advantages?
Facilitates code reuse
Algorithm structure in single place

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 12

Summary

Avoid POTY (Pattern Of The Year) syndrome

© Accenture. By Maksims Ahadovs, Dmitri

Summary Avoid POTY (Pattern Of The Year) syndrome © Accenture. By Maksims
Kartashov-Gawski & Artem Slobolinskyi.

Слайд 13

References

GoF design patterns (dofactory)
Pattern classification (gofpatterns)
Head First Design Patterns book

© Accenture. By

References GoF design patterns (dofactory) Pattern classification (gofpatterns) Head First Design Patterns
Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 14

Video Tutorials

Factory - https://www.youtube.com/watch?v=ub0DXaeV6hA
Facade - https://www.youtube.com/watch?v=B1Y8fcYrz5o
repository - https://www.youtube.com/watch?v=rtXpYpZdOzM
decorator - https://www.youtube.com/watch?v=j40kRwSm4VE
template - https://www.youtube.com/watch?v=aR1B8MlwbRI
Full

Video Tutorials Factory - https://www.youtube.com/watch?v=ub0DXaeV6hA Facade - https://www.youtube.com/watch?v=B1Y8fcYrz5o repository - https://www.youtube.com/watch?v=rtXpYpZdOzM decorator
PlayList with aditional patterns :
https://www.youtube.com/watch?v=vNHpsC5ng_E&list=PLF206E906175C7E07

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Слайд 15

Code examples

https://github.com/maksims-ahadovs/Design-Patterns

© Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.

Code examples https://github.com/maksims-ahadovs/Design-Patterns © Accenture. By Maksims Ahadovs, Dmitri Kartashov-Gawski & Artem Slobolinskyi.
Имя файла: Software-Engineering-Fundamentals-(SEF):-MS.NET-Design-Patterns.pptx
Количество просмотров: 34
Количество скачиваний: 0