Upload
andra-hunt
View
214
Download
0
Embed Size (px)
Citation preview
Com S 362: Object-Oriented Analysis and Design
From Design To Code
2 Com S 362: Object-Oriented Analysis and Design
2
Com S 362: Object-Oriented Analysis and Design
Recap: Class Diagrams Class diagrams represent design structure Three parts: name, attribute, operations Visibility, attribute type, multiplicity Association, association multiplicity Generalization i.e. interface impl, subclassing Composition i.e. class A contains class B Applied information hiding, DSM, layering
3 Com S 362: Object-Oriented Analysis and Design
3
Com S 362: Object-Oriented Analysis and Design
Recap: Interaction Diagrams Represent functionality Two major parts:
Life line boxes (represent life time of an object) Messages between objects (instances)
Also looked at some special case notations Instances: parameterized instances, singleton instances,
array elements Messages: creation, destruction, conditional messages,
mutually exclusive conditional messages, asynchronous messages, polymorphic messages
Abstractions: looping, iteration over collection, nesting of frames, decomposition
4 Com S 362: Object-Oriented Analysis and Design
4
Com S 362: Object-Oriented Analysis and Design
Recap: Responsibility Assignment Information Expert Creator Controller Polymorphism Pure Fabrication Indirection Protected Variations
5 Com S 362: Object-Oriented Analysis and Design
5
Com S 362: Object-Oriented Analysis and Design
Today’s Lecture Code generation
From class and interaction diagrams ArgoUML
Drawing package, class, and interaction diagrams
Generating code from these diagrams
6 Com S 362: Object-Oriented Analysis and Design
6
Com S 362: Object-Oriented Analysis and Design
ArgoUML Open source design tool
Available for free: http://argouml.tigris.org/ Use case, class, sequence diagrams Collaboration, statechart, activity diagrams
Auto-generate Code Skeleton
7 Com S 362: Object-Oriented Analysis and Design
7
Com S 362: Object-Oriented Analysis and Design
Installing ArgoUML Get latest release from:
http://argouml-downloads.tigris.org/argouml-0.23.1 also from: http://www.cs.iastate.edu/~cs362/tools/ArgoUML.zip
Unzip the distribution Run argouml.jar ArgoUML Demo…
Class diagrams in ArgoUML Associations in ArgoUML Generating code from class diagram in ArgoUML
8 Com S 362: Object-Oriented Analysis and Design
8
Com S 362: Object-Oriented Analysis and Design
Poseidon: Commercial variant of ArgoUML Community edition available for free (after registration)
http://www.cs.iastate.edu/~cs362/tools/poseidonCE-4.2.1.zip
9 Com S 362: Object-Oriented Analysis and Design
9
Com S 362: Object-Oriented Analysis and Design
Rational Modeler Available on CS machines
csts2.cs.iastate.edu
csts4.cs.iastate.edu
10 Com S 362: Object-Oriented Analysis and Design
10
Com S 362: Object-Oriented Analysis and Design
Discussion Tools such as ArgoUML show that –
Significant portion of code can be auto-generated
Only the intellectually challenging part of coding left for developer
“It pays to design”
11 Com S 362: Object-Oriented Analysis and Design
11
Com S 362: Object-Oriented Analysis and Design
What about UI Design? Tools such as Visual Studio
Automate code generation from GUI design
Tools such as Dreamweaver Automate HTML (again some form of code) from
the web-page design Artist can focus on domain concepts such as
layout and content
12 Com S 362: Object-Oriented Analysis and Design
12
Com S 362: Object-Oriented Analysis and Design
Additional Exercise Look up: Generative programming
A whole new research area about auto-generation of source code
Also, program transformation
The holy grail is to allow developers to program in terms of domain concepts
13 Com S 362: Object-Oriented Analysis and Design
13
Com S 362: Object-Oriented Analysis and Design