Download presentation
Presentation is loading. Please wait.
1
An Introduction to Patterns
Linda Rising
2
Patterns for Software Design Patterns - OOPSLA ’94 GoF – Gang of Four
23 patterns for object-oriented design Still the best place to start
3
Alexander’s Definition
Each pattern describes a problem that occurs over and over again in our environment and then describes the core of the solution to that problem in such a way that you can use this solution a million times over without ever doing it the same way twice. Alexander - building architect and author The Timeless Way of Building A Pattern Language
4
Small Meeting Rooms The larger meetings are, the less people get out of them. But institutions often put their money and attention into large meeting rooms and lecture halls. It has been shown that the number of people in a group influences both the number who never talk, and the number who feel they have ideas which they have not been able to express. There is no particularly natural threshold for group size; but it is clear that the number who never talk climbs very rapidly [with group size]. In a group of 12, one person never talks. In a group of 24, there are 6 people who never talk. Make at least 70% of all meeting rooms really small -- for 12 people or less. Locate them in the most public parts of the building, evenly scattered among the workplaces. See: Light on Two Sides of Every Room, Sitting Circle, Different Chairs, Pools of Light, The Shape of Indoor Space
5
Small Meeting Rooms DED 10/4/1999
6
The Quality without a Name
There is a central quality which is the root criterion of life and spirit in [all things]. This quality is objective and precise, but it cannot be named. ... The search which we make for this quality, in our own lives, is the central search of any person, It is the search for those moments and situations when we are most alive.
7
Why are Patterns Important?
Patterns provide an incredibly dense means of efficient and effective communication between those who know the language. Nate Kirby Human communication is the bottleneck in software development. If [patterns] can help [developers] communicate with their clients, their customers, and each other, then [patterns] help fill a crucial need in [our industry]. Jim Coplien Patterns don’t give you code you can drop into your application, they give you experience you can drop into your head. Patrick Logan Giving someone a piece of code is like giving him a fish; giving him a pattern is like teaching him to fish. Don Dwiggins
8
Reuse Benefits Mature engineering disciplines have handbooks of solutions to recurring problems. All certified professional engineers in these fields have been trained in the contents of these handbooks. In an experiment, teams of leading heart surgeons from five New England medical centers observed one another’s operating room practices and exchanged ideas about their most effective techniques. The result? A 24% drop in their overall mortality rate for coronary bypass surgery = 74 fewer deaths than predicted.
9
What I Used to Think In the beginning of the patterns movement (late 1994), I used to think that patterns would have impact because they would provide innovative, unusual solutions that would “solve all our problems” but now I see that patterns have impact because they capture what works and the pattern form helps us remember that. In many cases, the pattern that “solves all our problems” is something simple, like Mediator.
10
The Mediator Story We had a collection of classes. Each managed a connection with a process or device. Protocols for the connections varied. Before attempting a connection, some objects had to wait until other objects had established a connection. The interactions could be very complicated. A mediator object controls and coordinates the interactions. The mediator object prevents colleague objects from referring to each other explicitly. Colleagues communicate only with the mediator.
11
Mediator Define an object that encapsulates how a set of objects interact.
12
Mediator Example The control tower at an airport provides a central point of communication for aircraft in the terminal area. Constraints on terminal area airspace are maintained by the tower. With the centralized communication and constraint maintenance, the tower behaves as a mediator object. ATC Mediator Flight 111 Flight 1011 Flight 112 Flight 747
13
Now – Lots of Other Patterns
Patterns are not just: About architecture Object-Oriented About software Patterns are also about: System Test Customer Interaction Risk Management Organization and Process ...
14
Introducing New Ideas Mary Lynn Manns and Linda Rising
Important topics: food, fear, greed, … Book due out September 2004
15
More Pattern Information
Mike Duell’s non-software examples Patterns Listservers Wiki Wiki Web Home pages for Jim Coplien, Doug Schmidt, Doug Lea, and others Patterns for introducing patterns
16
More Pattern URLs Robert C. Martin’s Chess Analogy
John Vlissides' "Top 10 Misconceptions" Linda Rising's QWAN in software Seven Habits of Successful Pattern Writers Brad Appleton's "Patterns in a Nutshell"
17
What Patterns are About
Sharing experience. Everyone can contribute. Everyone can learn from others. Instead of inventing new ideas, patterns capture what has been successful in the past. Successful developers resolve challenges by applying patterns, whether they are aware of it or not. Traditionally, these patterns have been locked in the minds of experts. The primary contribution of the patterns community is to capture, document, and refine these patterns so we can all benefit. Doug Schmidt
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.