Duke CPS 108 1. 1 CPS 108, Spring 1998 l Software Design and Implementation ä Object oriented programming and design ä good design helps do away with late.

Slides:



Advertisements
Similar presentations
1 Layers Data from IBM-Rational and Craig Larman’s text integrated into these slides. These are great references… Slides from these sources have been modified.
Advertisements

Plab – Tirgul 12 Design Patterns
Design and Programming Patterns Associated with Java Networking by Margaret Toews cs843, Spring 2003.
Reasons to study concepts of PL
Ralph Johnson - University of Illinois1 Patterns: What They Are, and How to Write Them Ralph Johnson University of Illinois at Urbana-Champaign
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
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.
CIT241 Prerequisite Knowledge ◦ Variables ◦ Operators ◦ C++ Syntax ◦ Program Structure ◦ Classes  Basic Structure of a class  Concept of Data Hiding.
CPS 108 : Spring What is Computer Science? What is it that distinguishes it from the separate subjects with which it is related? What is the linking.
Introduction to software design patterns For CSE 3902 By: Matt Boggus.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Duke CPS Why C++? l a better C ä type safe, e.g., I/O streams ä better support for ADTs, encapsulation l object-oriented programming ä add inheritance.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Design Patterns: Introduction. Creational Design Patterns General and reusable solutions to common problems in software design Software University
Chapter Five An Introduction to Design Patterns Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Design Patterns. Patterns “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Chapter 7 Applying UML and Patterns Craig Larman
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
Software Design 1.1 Tapestry classes -> STL l What’s the difference between tvector and vector  Safety and the kitchen sink What happens with t[21] on.
GRASP: Designing Objects with Responsibilities
Software Design 8.1 Compsci 108 l Object oriented design and programming of medium-sized projects in groups using modern tools and practices in meaningful.
Object-Oriented Analysis and Design. Lesson 1: Introduction to Software Engineering.
Software Design 1.1 CPS 108, Spring 2004 l Software Design and Implementation  Object oriented programming and design Language independent concepts including.
Design Patterns Introduction General and reusable solutions to common problems in software design SoftUni Team Software University
Frameworks & Patterns Use of Organized Classes. Frameworks vs Toolkits Framework Framework  Start with classes and interfaces that define a rudimentary.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
Object Oriented Design David Talby. Welcome! n Introduction n UML u Use Case Diagrams u Interaction Diagrams u Class Diagrams n Design Patterns u Composite.
ECE450S – Software Engineering II
Software Design 18.1 CPS 108 l Object oriented design and programming of medium-sized projects in groups using modern tools and practices in meaningful.
Part VII: Design Continuous
CSC 480 Software Engineering Design With Patterns.
Software Design 14.1 CPS 108 l Object oriented design and programming of medium-sized projects in groups using modern tools and practices in meaningful.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.
CPS Inheritance and the Yahtzee program l In version of Yahtzee given previously, scorecard.h held information about every score-card entry, e.g.,
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
Design Patterns Introduction
Software Design 1.1 CPS 108, Spring 2006 l Object oriented programming and design, we'll use Java and C++  Language independent concepts including design.
Design. Practices Principles Patterns What are the characteristics of good design? What are good solutions to common design problems? How do we go about.
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
Software Design Patterns in Test Automation
Object-Oriented Design Concepts University of Sunderland.
Duke CPS Programming Heuristics l Identify the aspects of your application that vary and separate them from what stays the same ä Take what varies.
Class Relationships Lecture Oo08 Polymorphism. References n Booch, et al, The Unified Modeling Language User Guide, Chapt 10 p.125 n Fowler & Scott, UML.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
Software Design 2.1 STL concepts l Container: stores objects, supports iteration over the objects  Containers may be accessible in different orders 
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Software Development.
GRASP – Designing Objects with Responsibilities
Design Patterns: MORE Examples
The Object-Oriented Thought Process Chapter 15
Software Design Patterns
Introduction to Design Patterns
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
Design Patterns.
CMPE 135: Object-Oriented Analysis and Design October 24 Class Meeting
1.1 Reasons to study concepts of PLs
Patterns.
CSC 480 Software Engineering
DESIGN PATTERNS : Introduction
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
CSC 480 Software Engineering
CSCE156: Introduction to Computer Science II
Presentation transcript:

Duke CPS CPS 108, Spring 1998 l Software Design and Implementation ä Object oriented programming and design ä good design helps do away with late night Teer-fests, but some late nights are inevitable ä your toolkit must include mastery of language/programming and design l What’s in the course? ä C++ and Java, team projects, mastery exams ä team projects can be more and less than the sum of their parts ä high-level abstractions, low-level details ä patterns, heuristics, and idioms

Duke CPS What’s ahead in programming and design l Language independent principles of design and programming ä design heuristics ä coupling, cohesion, small functions, small interfaces... ä design patterns ä factories, MVC aka observer/observable,... l Language specific: ä idioms ä smart pointers, vectors/arrays, overloaded operators... ä idiosyncracies, idiocies ä must define virtual constructor, comma operator...

Duke CPS Administrivia l check website and news regularly duke.cs.cps108 l Grading (see web pages) ä group projects: small, medium, large ä mastery programs (solo or semi-solo endeavors) ä readings and summaries ä tests l Evaluating team projects, role of TA, UTA, consultants ä face-to-face evaluation, early feedback l Compiling, tools, environments, Linux ä g released 11/14/98, read website

Duke CPS C++ idioms/general concepts l templates ä generic functions/container classes l inheritance ä design guidelines, benefits, drawbacks l low-level structures ä C-style arrays and strings compared to standard: STL, Tapestry l from C to C++ ä function pointers, function objects l build on generalities, transition to Java ä vectors, interfaces, stress general principles

Duke CPS Design Criteria Good design comes from experience, experience comes from bad design Fred Brooks (or Henry Petroski) l Design with goals: ä ease of use ä portability ä ease of re-use ä efficiency ä first to market ä ?????

Duke CPS How to code l Coding/Implementation goals: ä Make it run ä Make it right ä Make it fast ä Make it small l spiral design (or RAD or !waterfall or...) see DOOM specification design implementation

Duke CPS Design Heuristics: class and program rules-of-thumb (see text by Arthur Riel) l Coupling ä classes/modules are independent of each other ä goal: minimal, loose coupling ä do classes collaborate and/or communicate? l Cohesion ä classes/modules capture one abstraction/model ä keep things as simple as possible, but no simpler ä goal: strong cohesion (avoid kitchen sink) l The open/closed principle ä classes/programs: open to extensibility, closed to modification

Duke CPS Roulette: Classes, Responsibilities, Collaborators l Class diagram in UML ä unified modeling language (see class web page) ä system at a glance, relationships, heuristics, discussion l What does inheritance get us here? (see the non-OO version) ä l Why does a bet need a wheel? other issues? ä l What are responsibilities of bankroll? ä

Duke CPS Design patterns “... describes a problem which 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” Christopher Alexander, quoted in GOF l Example: iterator ä sequentially access elements of aggregate without exposing representation/implementation ä see DirEntry, List class, Map class ä heavily used in STL, with pointer like syntax l Factory ä virtual constructor, have system that doesn’t depend on how items are created

Duke CPS Pattern Essentials l Name ä good name provides a handle for the pattern, makes it easy to remember and use: vocabulary l Problem ä when the pattern is applicable, context, criteria to be met, design goals l Solution ä design, collaborations, responsibilities, and relationships of the classes/design elements l Consequences ä trade-offs, problems, results from applying pattern: help in evaluating applicability

Duke CPS hyperwag: Week-at-a-glance in hypertext l hypertext version of week-at-a-glance, see web page for complete details ä read file in wagalang (other languages too) # this is a fun week m9,12sleep th9,10cps 110 w9,10breakfast f9,10running mtwhf12,13lunch wf10,12cps 108 t10,12breakfast ä produce HTML table l classes? problems? issues? groups? ideas? l C++ questions, design questions

Duke CPS larger group/company issues see McCarthy, Dynamics of Software Development l establish a shared vision ä what is hyperwag? what can we add? ä harmonious sense of purpose l develop a creative environment ä the more ideas the better, ideas are infectious ä don’t flip the BOZO bit l scout the future ä what’s coming, what’s the next project ä what new technologies will affect this project