Object Orientation “Thinking” Object Oriented, Further Constraints, and Documentation.
Object Thinking
-
Upload
alan-dean -
Category
Technology
-
view
3.294 -
download
1
description
Transcript of Object Thinking
![Page 1: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/1.jpg)
Object Thinking
![Page 2: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/2.jpg)
![Page 3: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/3.jpg)
The Philosophy of Developmentformalism -vs- hermeneutics
From Philosophy to Culturementoring, metaphor &
vocabulary
From Culture to Practiceobject discovery & thinking
![Page 4: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/4.jpg)
Formalism/Determinism(software engineering)
uses traditional thinking
-vs-
Hermeneutics/Postmodernism(extreme programming)
uses object thinking
![Page 5: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/5.jpg)
The Object Thinking Manifesto
Advocacy of behavioralismAntagonistic towards formalism
Emphasis on analysis and conceptualization
Philosophy of extreme programming
Prefers the autonomous to the autocratic
![Page 6: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/6.jpg)
The Object Thinking Manifesto
Better people write better code
- not better tools
![Page 7: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/7.jpg)
“Let there be no doubt that object-oriented design is fundamentally
different than traditional structured design approaches:
it requires different ways of thinking about decomposition, and it produces software architectures that are largely outside the realm of the structured design culture.”
Grady Booch, 1991
![Page 8: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/8.jpg)
“Let there be no doubt that object-oriented design is fundamentally
different than traditional structured design approaches:
it requires different ways of thinking about decomposition, and it produces software architectures that are largely outside the realm of the structured design culture.”
Grady Booch, 1991
![Page 9: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/9.jpg)
Observing the Object Difference
Traditional thinking Object thinking
Data Structure
operationX
operationY
operationZ
![Page 10: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/10.jpg)
Anthropomorphizationis the attribution of human
characteristics to inanimate objects,
animals, forces of nature, the unseen author of things, and others.
![Page 11: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/11.jpg)
“… if the diagram is an accurate depiction of an object, what is
the difference between an object and a COBOL program?”
![Page 12: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/12.jpg)
“There is none. A COBOL program encapsulates data and operations and allows communication among programs. Object development –
using this model – will have a tough time being anything more than the creation of lots of tiny
COBOL programs.”
![Page 13: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/13.jpg)
Object Depictions
Entity UML
Customer
ID#dobgenderfname…
getID#setID#getDOB#setDOB#…
Customer
id#dobgenderfnamelnamemihonorificgenerational…
![Page 14: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/14.jpg)
Object Depictions
Object (Class-Responsibility-Collaboration)
Customer
ID selfdescribe selfindicate desiresmake decisionsconfirm information
![Page 15: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/15.jpg)
Encapsulation via Properties
public class Customer{ public string Name { get { return _name; } set { // validate here _name = value; } }
private string _name;}
• Known as information hiding
• Traditionally taught as a key precept of OO
• But many XP advocates say they should not be tested … why?
• Why do objects keep trying to change type?
• Is there a better way?
![Page 16: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/16.jpg)
Self-Describing Objectspublic class Customer : Dictionary<Uri,
Object>{ }
• Provides a property bucket
• Looks alien to traditional thinking
• Violates traditional encapsulation principles
• How is validation carried out?
![Page 17: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/17.jpg)
Self-Evaluating Rules
Evaluate self-describing objects at runtime
Promote type re-use via separation of concerns
Embody data validation rules, business rules, or any other constraint
![Page 18: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/18.jpg)
Demo
Self-Describing Objects & Self-Evaluating Rules
![Page 19: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/19.jpg)
So all my objects should be self-describing?
![Page 20: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/20.jpg)
Having a hammerdoes not make everything a nail
![Page 21: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/21.jpg)
Non-Self-Describing ObjectsPrimitives
bool, int, float, enum, etc.
Some Standardshtml elements, xpath predicates, industry,
etc.
Self-Describing Objects tend to be actors
![Page 22: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/22.jpg)
Issues
Currently no standard supporting frameworkI am considering a CodePlex or SourceForge
project
Limited knowledge, few publications, no examples
Just try googling for the key terms…
Steep learning curveHard to ‘unlearn’ traditional thinking
Few practitioners or evangelists
![Page 23: Object Thinking](https://reader036.fdocuments.net/reader036/viewer/2022081413/5479ae64b4af9fe2158b48e0/html5/thumbnails/23.jpg)
Linkshttp://del.icio.us/alan.dean/object-
thinking
http://thoughtpad.net/alan-dean
© MMVII