際際滷

際際滷Share a Scribd company logo
Design
PatternsClaudio Lassala
Jonathan Birkholz
Houston Techfest 2010
http://tinyurl.com/htf2010-patterns
Claudio
Lassala
Jonathan
Birkholzclaudio@eps-software.com
ClaudioLassala.workpress.com
@claudiolassala
EPS Software Corp
jb@chaione.com
theabsentmindedcoder.com
@rookieone
wizardsofsmart.net
github.com/RookieOne
bitbucket.org/rookieone
Chaione
EPS
As an attendee to this session, you are entitled to a free CODE subscription! 
www.codemag.com/subscribe/htf10
Software Projects
Consulting
Training
Publishers of CODE Magazine
The .Net Knowledge Powerho
Chaione
Strategy and Planning
User Experience Design
Mobile Solutions
Web Solutions
:url => snipr.com/virtualaltnet
:website => www.virtualbrownbag.com
:when => every Thursday from 12pm  1pm
Where everyone can come talk and learn
about software development
Learnsomething about design patterns
Apply
Teach
your knowledge at your day job
others what you have learned
Different Backgrounds
Same Problem
is the only constant in
software development
Change
change in software is
time consuming
expensive
fail
and is why projects
successful
best practicif only there were some
on how to manage change so that our software projects can
be
Design
Patternsdescribe a concept
or process on an
abstract level.
These patterns arose
from repeated
successful
applications on how
to design software to
adapt to change
Design patterns also provide a conciseform of communication among professionals
Every song has
structure
Intros
Verses
Bridges
Choruses
Interludes
Ok so. Im going to pretend to
hand off the ball but really I am going to
pass it. The hope is the defense will be
confused for a few seconds so that can
create an opening and one of you guys
can get open
Play Action Pass?
meanwhile a well organized team is
already running their play
More effective commu
If design patterns are known best
practices why are there no
frameworks or libraries for design
patterns?
more about
form and
context than
code
allegory of the cave
Object Oriented
Programming
Abstraction
Encapsulation
Polymorphism
Inheritance
Princip
lesProgram to interface, not to implementation
Strive for loosely coupled designs between objects
that interact
Favor composition over inheritance
SOLID
Principles => form => design pattern
Cash
Register
Learning through code is best
LOOK AT CODE
REFACTOR
Command Pattern
is a design pattern in which an object is
used to represent and encapsulate all the
information needed to execute an operation
at a later time
with commands you can also
Queue
Log
Undo
commands in the form of a macro command
thereby handling complexity through composition
command execution for future
diagnosis of problems and bugs
more easily support
Experiences with
Command Pattern
Where the Command
Pattern can be found in
.Net
REFACTOR
Fa巽ade Pattern
provides a unified interface to a set of
interfaces in a subsystem. To put it simply, it
makes the complex easy.
inside Claudios house
Too many remotes! Ugh!
subsystems facade
Ah one remote to ru
Experiences with Fa巽ade
Pattern
Where the Fa巽ade
Pattern can be found in
.Net
REFACTOR
Observer Pattern
defines a dependency between objects so
that when one object changes, dependent
objects can be notified
Publishers + Subscribers = Observer Pattern
Stop Pestering
Let subject call
observers
actively
querying state
on subject
passi
ve
Hollywood
PrincipleDont call us, well call you.
Register
Scanner
add item item scanned
Experiences with
Observer Pattern
Where the Observer
Pattern can be found in
.Net
REFACTOR
Adapter Pattern
converts the interface of a class into another
interface the clients expect
Experiences with Adapter
Pattern
Where the Adapter
Pattern can be found in
.Net
Facade Adapteversus
Proxy Pattern
provides a surrogate or placeholder for
another object to control access to it.
Proxy Real
REFACTOR
Strategy Pattern
defines a family of algorithms, encapsulates
each one, and makes them interchangeable.
This lets the algorithm vary independently
from clients that use it.
Texas
Lousiana
Oklahoma
Default
Switch
Texas
Lousiana
Oklahoma
Default
Strategies
King Queen Bishop Rook Knight Pawn
how are they different?
Experiences with Strategy
Pattern
Where the Strategy
Pattern can be found in
.Net
REFACTOR
Factory Pattern
provides an interface for creating families of
related or dependent objects
Types of
Factories
Factory Method
Factory Class
Abstract Factory
Experiences with Factory
Pattern
Where the Factory
Pattern can be found in
.Net
Other Patterns
 Decorator
 Mediator
 Iterator
 Builder
 Composition
 Visitor
 Chain of Responsibility
Presentation Patterns
 MVC
 MVVM
 MVP
Bookshelf
Questions
http://tinyurl.com/htf2010-patterns
claudio@eps-software.com
ClaudioLassala.workpress.com
@claudiolassala
EPS Software Corp
jb@chaione.com
theabsentmindedcoder.com
@rookieone
wizardsofsmart.net
github.com/RookieOne
bitbucket.org/rookieone
Chaione
Join us at www.VirtualBrownBag.com every Thursday 12pm -1pm

More Related Content

Techfest design patterns