A Few Design Patterns<br />Strategy, Template, Factory<br />
Strategy<br />Let client and algorithm change independently<br />
Strategy<br />Let client and algorithm change independently<br />
Template Method<br />Define algorithm skeleton, defer some steps to subclasses<br />
Template Method<br />Define algorithm skeleton, defer some steps to subclasses<br />run(data):<br />	format()	-> common<br...
Factory Method<br />Define an interface to create different algorithms<br />Separate object definition, creation and use.<...
Upcoming SlideShare
Loading in …5
×

A few design patterns

554 views
499 views

Published on

A few design patterns that seem to crop up in small scientific programming tasks, for a non-programmer audience.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
554
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Initiative for Innovative Computing
  • A few design patterns

    1. 1. A Few Design Patterns<br />Strategy, Template, Factory<br />
    2. 2. Strategy<br />Let client and algorithm change independently<br />
    3. 3. Strategy<br />Let client and algorithm change independently<br />
    4. 4. Template Method<br />Define algorithm skeleton, defer some steps to subclasses<br />
    5. 5. Template Method<br />Define algorithm skeleton, defer some steps to subclasses<br />run(data):<br /> format() -> common<br />runFFT() -> template<br /> decode() -> common<br />
    6. 6. Factory Method<br />Define an interface to create different algorithms<br />Separate object definition, creation and use.<br />

    ×