1 / 17

An Introduction to Patterns

An Introduction to Patterns. Linda Rising risingl@acm.org www.lindarising.org. Patterns for Software. Design Patterns - OOPSLA ’94 GoF – Gang of Four 23 patterns for object-oriented design Still the best place to start. Alexander’s Definition.

geoff
Download Presentation

An Introduction to Patterns

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to Patterns Linda Rising risingl@acm.org www.lindarising.org

  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

  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. http://www.math.utsa.edu/sphere/salingar/NatureofOrder.html http://www.sunlighthomes.com/t.patlang.html

  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. ATC Mediator Flight 111 Flight 1011 Flight 112 Flight 747 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 amediator object.

  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 • www.cs.unca.edu/~manns/intropatterns.html • Important topics: food, fear, greed, … • Book due out September 2004

  15. More Pattern Information • Mike Duell’s non-software examples http://www.agcs.com/supportv2/techpapers/patterns/papers • Patterns Listservers http://hillside.net/patterns/mailing.htm • Wiki Wiki Web http://c2.com/cgi/wiki • Home pages for Jim Coplien, Doug Schmidt, Doug Lea, and others http://www.agcs.com/supportv2/techpapers/patterns/ • Patterns for introducing patterns http://www.cs.unca.edu/~manns/intropatterns.html

  16. More Pattern URLs Robert C. Martin’s Chess Analogy http://www.cs.wustl.edu/~schmidt/cs242/learning.html John Vlissides' "Top 10 Misconceptions" http://www.research.ibm.com/designpatterns/pubs/top10misc.html Linda Rising's QWAN in software http://members.home.net/risingl1/risingl1/articles/goodsoft.htm Seven Habits of Successful Pattern Writers http://hillside.net/patterns/papers/7habits.html Brad Appleton's "Patterns in a Nutshell" http://www.enteract.com/~bradapp/docs/patterns-nutshell.html

  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

More Related