Cf.OBJECTIVE (ANZ) Design Patterns and Form Processing Jaime Metcher Software Architect, Centre for Innovation in Professional Learning, University of.

Slides:



Advertisements
Similar presentations
Design Patterns based on book of Gang of Four (GoF) Erich Gamma, Richard Helm, Ralph Johnson, and John VlissidesGang of Four (GoF) Elements of Reusable.
Advertisements

Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
Lecture 9 Design Patterns CSCI – 3350 Software Engineering II Fall 2014 Bill Pine.
ANU COMP2110 Software Design in 2003 Lecture 16Slide 1 Lecture 16: Introduction to design patterns 1What are they? 2Where do they come from? 3Why study.
Design Patterns Section 7.1 (JIA’s) Section (till page 259) (JIA’s) Section 7.2.2(JIA’s) Section (JIA’s)
© Keith Vander Linden, Dilbert © United Feature Syndicate, Inc.
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Design Patterns Yes, they are important Robert Cotton April 23, 2009.
CS427 Topics in Software Engineering
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
Fundamentals of Software Development 1Slide 1 Gang of Four The beginnings… The original “patterns” idea was from architecture – there are repeatable patterns.
(c) 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 21:42:16 Informatics 122 Software Design II Lecture 8 André van der Hoek.
Design Patterns In OPM Presented by: Galia Shlezinger Instructors: Prop. Dov Dori, Dr. Iris Berger.
Design Patterns CS is not simply about programming
Design Patterns Daniel McClain. Background What are they?  Way of recording solutions to recurring design problems History  “A Pattern Language: Towns,
March Ron McFadyen1 Design Patterns In software engineering, a design pattern is a generally repeatable solution to a commonly-occurring problem.
Fall 2009ACS-3913 Ron McFadyen1 idea was first put forth by Christopher Alexander (1977) in his work on architectural design principles a pattern is a.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Design Patterns William A. Hoffman NYU OOP Class.
Adapters Presented By Zachary Dea. Definition A pattern found in class diagrams in which you are able to reuse an ‘adaptee’ class by providing a class,
(c) 2010 University of California, Irvine – André van der Hoek1June 29, 2015 – 08:55:05 Informatics 122 Software Design II Lecture 8 André van der Hoek.
1 Foundations of Software Design Fall 2002 Marti Hearst Guest Lecture: Good Programming Practices Marat Boshernitsan Computer Science Division, EECS University.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
1 PH Chapter 1 (pp. 1-10) GoF Composite Pattern (pp ) PH Ch 2 through Fundamentals (pp ) Presentation by Julie Betlach 5/28/2009.
Design Patterns Trends and Case Study John Hurst June 2005.
Processes, Tools, & Best Practices. My Background Lexmark Software Development for 15 years (‘93 – ‘08) – Multi-tier Java application servers – Window.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
Advanced topics in software engineering CSC532 Term Paper Design Patterns Harpreet Singh Submitted By:-
ISP666 MVC & Design Patterns. Outline Review Event Programming Model Model-View-Controller Revisit Simple Calculator Break Design Patterns Exercise.
DaveAndAl.net Do Application Design Patterns Make Sense in ASP.NET? Alex Homer You may like to write these down now...
Aniruddha Chakrabarti
Copyright © 2002, Systems and Computer Engineering, Carleton University Patterns.ppt * Object-Oriented Software Development Part 11.
BTS430 Systems Analysis and Design using UML Design Patterns.
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
11 Partnership for Performance How to hear this lecture Click on the icon: to hear the narration for each slide.
CSE 403 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
ECE450S – Software Engineering II
1 A Brief Introduction to Design Patterns Based on materials from Doug Schmidt 1.
05/26/2004www.indyjug.net1 Indy Java User’s Group May Knowledge Services, Inc.
CS 160: Software Engineering October 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CPSC 871 John D. McGregor Module 5 Session 1 Design Patterns.
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
An Introduction To Design Patterns Jean-Paul S. Boodhoo Independent Consultant
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 و ابتغ فيما آتاك الله الدار.
Patterns Composite Pattern. Patterns All designers use patterns. Patterns in solutions come from patterns in problems. "A pattern is a solution to a problem.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
A proposal to support the extreme programming development methodology from the quality assurance point of view Authors: Calin Jebelean –
Software Design Patterns in Test Automation
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Design Patterns: MORE Examples
The Object-Oriented Thought Process Chapter 15
Advanced Programming Dr. Sadi Seker.
Chapter 10 Design Patterns.
Introduction to Design Patterns
Introduction to Design Patterns
Design Patterns Introduction
Informatics 122 Software Design II
DESIGN PATTERNS : Introduction
Introduction to Design Patterns
Design Patterns Imran Rashid CTO at ManiWeber Technologies.
Informatics 122 Software Design II
Composite Design Pattern By Aravind Reddy Patlola.
Presentation transcript:

cf.OBJECTIVE (ANZ) Design Patterns and Form Processing Jaime Metcher Software Architect, Centre for Innovation in Professional Learning, University of Queensland

About me B.Sc (maths) Aerial survey software (in the 80's!) Kids LAN wrangler at UQ Coldfusioneer at Med-E-Serv Archi-thingie back at UQ B.Sc (maths) Aerial survey software (in the 80's!) Kids LAN wrangler at UQ Coldfusioneer at Med-E-Serv Archi-thingie back at UQ OUTPUT 2500AD ORG 2000H MOV DX,0FFE6H MOV AX,82H OUT DX,AL NEXT:MOV AX,3000H MOV BX,0000H CALL DISP NOT AL MOV 3001H,AL MOV BX,0100H CALL DISP JMP SHORT NEXT DISP:PUSH AX MOV CX,1 CALL FAR 0FF00:0B12H POP AX RET END

About you Your team lead is bugging you You are the team lead and you want to bug your juniors: What do you do that's so great? How do you teach that? You want to pad your CV You know all about patterns and you're here to heckle You thought this was the Railo talk

Outline Design Patterns by Example Template method Composite Design Patterns World Tour Architecture Software engineering Education Conclusion Motherhood statements Resources Questions

Example – form processing Simple See code sample - simple

Example – form processing Let's componentize a bit... See code sample - simple.cfc

Example – form processing Add some functionality: Support multiple forms on a page Detect incomplete form transmission See code sample - bettercfc

Example – form processing Now refactor out some common functionality: See code sample - bettercfcrefactored

Example – form processing A little less procedural, just for fun: See code sample - templatemethod

Template method if (isSubmitted() and validated()) { commit(); } Other ways to do this? Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure. - Design Patterns: Gamma et al. (aka GoF)

Example – form processing OK, let's separate some concerns: See code sample - templatemethodrefactored

Example – form processing More guts, more glory See code sample – composite

Composite Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly - Design Patterns: Gamma et al. (aka GoF) myCompositeFormGuts = CreateObject("component", "compositeFormGuts").init("puttin_it_togetha"); myCompositeFormGuts.addChild(myFormGuts1); myCompositeFormGuts.addChild(myFormGuts2);

What's a pattern? Name Intent Context How it works Trade-offs

And why should I care? Prevent 'defactoring' “Hey, I noticed there was this totally unnecessary inheritance lying around so I refactored it out” Communication “Why do we have this one crazy class that has the same interface as all the others but is completely different under the hood?” Education

World tour - architecture Alexander's “A Pattern Language” - read it! Light on two sides: When they have a choice, people will always gravitate to those rooms which have light on two sides, and leave the rooms which are lit only from one side unused and empty. Therefore: Locate each room so that it has outdoor space outside it on at least two sides, and then place windows in these outdoor walls so that natural light falls into every room from more than one direction.

World Tour – Software Engineering GoF – Design Patterns Singleton Iterator Decorator Martin Fowler – PoEAA Front Controller Gateway Single Table Inheritance Gregor Hohpe – Enterprise Integration Patterns Message Endpoint Publish-Subscribe Channel Guaranteed Delivery

World tour - education CIPL (my lot) Chunking & toggling Peer leader Hypothetical professionals E-LEN project Coherence principle Provide personal identity information

Motherhood statements Patterns are primarily about communication Patterns are not templates or rules Pattern use is all about professional judgement A pattern by definition is not new

Resources Books A Pattern Language: Towns, Buildings, Construction Christopher Alexander, Sara Ishikawa, Murry Silverstein ISBN Design Patterns: Elements of Reusable Object-Oriented Software Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides ISBN Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions Gregor Hohpe & Bobby Woolf ISBN Patterns of Enterprise Application Architecture Martin Fowler ISBN Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development Craig Larman ISBN Websites E-LEN Some patterns in the education field CIPL No patterns here yet :( Article by Aino Corry on patterns vs language constructs. See also her talk on patterns in functional languages on InfoQ.

Argue!