Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Pattern Zoology

Code samples for "Design Pattern Zoology" presentation

sample-1

Basic classes. All logic in the base class. Use overwritten inherited properties to differentiate subclasses.

sample-2

Logic moved into strategy classes. Base class delegates all logic to strategy class.

sample-3

Descriptors moved to decorators to aid in re-use. More animals and strategies easily added via code re-use.

sample-4

User interface and control. All logic inside an if-elseif-else wrapped in a loop

sample-5

Command loop split into individual command handlers and chained together. Main script sets up chain and listens for input to dispatch commands.

sample-6

Events added to some commands.

About

Design Pattern Zoology sample code

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages