about patterns n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
About patterns PowerPoint Presentation
Download Presentation
About patterns

Loading in 2 Seconds...

play fullscreen
1 / 13

About patterns - PowerPoint PPT Presentation


  • 53 Views
  • Uploaded on

About patterns. Outline What’s a pattern? An example from fast food Comments on the “definition” Patterns and software development culture Pattern definition exercises. What’s a pattern?. Alexander’s characterization (quoted by Fowler) Recurring problem Environment in which it occurs

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'About patterns' - samara


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
about patterns
About patterns

Outline

  • What’s a pattern?
  • An example from fast food
  • Comments on the “definition”
  • Patterns and software development culture
  • Pattern definition exercises

Pattern-Oriented Cluster: Comp 630/650/655

what s a pattern
What’s a pattern?

Alexander’s characterization

(quoted by Fowler)

  • Recurring problem
  • Environment in which it occurs
  • Core of a solution
    • Has been used successfully multiple times
    • Can be used many times without ever doing it the same way twice

Pattern-Oriented Cluster: Comp 630/650/655

example fast food pattern
Example: fast food pattern
  • Problem: people getting burned on hot drinks
  • Environment: fast food restaurants
  • Solution: print warnings on packaging
  • Name: Achtung - Heiss

Pattern-Oriented Cluster: Comp 630/650/655

other solutions
Other solutions
  • Solution: make in advance, heat to safe temperature when serving
  • Name: Heat-n-Serve
  • Solution: make drinks at safe temperatures
  • Name: Low-Temperature Recipe

Pattern-Oriented Cluster: Comp 630/650/655

what s the real problem
What’s the real problem?
  • Heat-n-Serve and Low-Temperature Recipe are about preventing burns
  • Achtung-Heiss is about preventing lawsuits

Pattern-Oriented Cluster: Comp 630/650/655

definition vs characterization
Definition vs Characterization

Definition: Duck

  • Any of numerous relatively small and short-necked web-footed swimming birds of the family Anatidae.

Characterization: Duck

  • Walk: waddle
  • Sound: quack

Patterns characterize more than they define

Pattern-Oriented Cluster: Comp 630/650/655

comments on the characterization
Comments on the characterization
  • Patterns have consequences
    • Some patterns go together

Class Table Inheritance (285) usually implies Domain Model (116)

    • Using a pattern can introduce other problems

Developers often have trouble getting comfortable with Domain Model (116)

  • Architecture patterns differ from GOF
  • It’s all Indirection …

Pattern-Oriented Cluster: Comp 630/650/655

patterns and software culture
Patterns and software culture
  • At best: gray heads use patterns to help younger people without being dogmatic
  • At worst: pattern writers kill lots of trees
  • At best: patterns make communication more efficient
    • Huffman codes for architecture/design descriptions
    • Can save effort in project design documentation
  • At worst: patterns add confusion
    • People may have different understandings of a pattern

Pattern-Oriented Cluster: Comp 630/650/655

more on patterns and culture
More on patterns and culture
  • Naming patterns is
    • Really important
    • Really hard
  • Patterns are owned by the community
    • Nobody invents patterns
    • You can’t patent a pattern
    • Patterns are “identified” or “discovered”
  • Pattern writers depend on feedback
    • Especially about naming, applicability, consequences

Pattern-Oriented Cluster: Comp 630/650/655

one more comment
One more comment …
  • The analogy between building architecture and software architecture
    • Can be helpful
    • Can be over-used

Pattern-Oriented Cluster: Comp 630/650/655

pattern definition exercises
Pattern definition exercises
  • Environment given, or picked as first step
  • Brainstorm recurring problems in the environment
  • Pick a recurring problem to work on
  • Identify the core of a solution
    • Not (on purpose) a Fowler pattern
  • Pick a name
  • Present to the class

Pattern-Oriented Cluster: Comp 630/650/655

pattern exercise 1
Pattern exercise 1
  • Environment: group project
  • Note: this is not necessarily a software project

Pattern-Oriented Cluster: Comp 630/650/655

pattern exercise 2
Pattern exercise 2
  • This one is about software
  • Environments to choose from:
    • Database
    • Web presentation
    • Performance/capacity
    • Source code control/configuration management
    • Or, brainstorm some other environment

Pattern-Oriented Cluster: Comp 630/650/655