Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design Patterns in Education Josh Steele Matt Aguirre April 8, 2002.

Similar presentations


Presentation on theme: "Design Patterns in Education Josh Steele Matt Aguirre April 8, 2002."— Presentation transcript:

1 Design Patterns in Education Josh Steele Matt Aguirre April 8, 2002

2 Outline Josh  What is a Design Pattern? Difficulty in teaching DPs Timing your introduction  Elementary Design Patterns Matt  Brute Force Patterns (think GoF)  Pedagogical Design Patterns Class  Discussion

3 What is a Design Pattern? Originally envisioned at the 1987 OOPSLA conference (at least in a SW context) “Organizational concepts for designing quality object oriented software” [Gelfand]  Concise, correct, reusable “Embodiment of a template for the solution to a recurring problem” [Shaffer] “Descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context” [GoF]

4 In Layman’s Terms Design Patterns are:  Tools to help teach OOP and OOD  Concepts to help improve quality of OOP  Used to promote reuse  Help problem solving ability (“have I seen that problem before?”)  Tools to help communicate ideas  Other definitions?

5 Why are they difficult to teach? Shift in paradigm from Procedural to OOP  Often a major hurdle for most students  OOP hard enough to comprehend, DPs at the same time even worse OO background needed to fully appreciate their use  Data Structures class may not be enough experience Level of granularity to present is open question

6 Where to Start? Data Structures Class  Pros: Start of OO Education, can start DP exposure early  Cons: Programming experience limited, GoF too complex  Common text: DS Book with Decorators, Singletons, etc CS 6704  Pros: Much OO experience under belt, many DPs seen (maybe not realized though)  Cons: No formal DP education yet – teaching old dog new tricks (or the formality of those tricks) difficult; only graduate exposure!  Common text: GoF Middle of the Road  3000 level? 4000 level?  Is there a good class at this level to introduce Design Patterns?

7 Elementary Design Patterns Intended for novices Simpler standard Design Patterns Begin DP education early by (what else?) focusing on good design More effective teaching (from the level the students are at) and learning (efficiency when solving recurring problems)

8 How to use Elementary Patterns Not as an exam question  Minimizes the impact! As Tools to read, write and organize code Vocabulary between students Benchmark for code quality

9 Some Elementary DP Examples Selection  Whether or not (i.e. IF)  Alternative Action (i.e. IF/ELSE)  Unrelated choice (i.e. sequence of IFs) Repetition  Counted Repetition  Iterator Process All Items  Extreme Values (find min/max in selection)

10 More Elementary Design Patterns Client/Server  No networking needed – as simple as calling a method on an object  Essentially getting someone else to do work for you Linked Lists  Fixed, Expandable, etc.  Can be used to create other more complex patterns (i.e. data structures)

11 Even More Elementary Patterns Stylistic Patterns  Braces – to line up or not?  One-liners If (a > 0) {flag = true;} else {flag = false;} Declare-Construct-Initialize  Declare type, Construct variable (type-name combo, ala C/C++)  Initialize the variable Declare-Define-Use  Function prototype, definition, function call Tons more!

12 “Too Simple!” Primary Objectives:  Introduce the principles of design early into a programmer’s train of thought, starting from initial “problem to code” transition  Aid in the discovery of more complex patterns by drawing upon these design principles and putting patterns together  Help the novice student to learn!

13 To find out more… The Elementary Patterns Homepage  http://www.cs.uni.edu/~wallingf/patterns/elementary/ http://www.cs.uni.edu/~wallingf/patterns/elementary/ Joseph Bergin’s Homepage  http://csis.pace.edu/~bergin/ http://csis.pace.edu/~bergin/ Some other elementary patterns listings  http://max.cs.kzoo.edu/~abrady/patterns/ProgrammingPatternsList.html http://max.cs.kzoo.edu/~abrady/patterns/ProgrammingPatternsList.html  http://csis.pace.edu/~bergin/papers/SimpleDesignPatterns.html http://csis.pace.edu/~bergin/papers/SimpleDesignPatterns.html Teaching DS DPs [Gelfand]  http://www.cs.brown.edu/cgc/jdsl/papers/patterns.pdf http://www.cs.brown.edu/cgc/jdsl/papers/patterns.pdf Design Patterns [TheGangOfFour/GoF]


Download ppt "Design Patterns in Education Josh Steele Matt Aguirre April 8, 2002."

Similar presentations


Ads by Google