Atrieflimmer sett fra fastlegens ståsted, av Trygve kongshavn
© Trygve Reenskaug 2008UMLChina Slide 1 20 November 2015 The Common Sense of Object Oriented...
-
Upload
clare-sims -
Category
Documents
-
view
216 -
download
0
Transcript of © Trygve Reenskaug 2008UMLChina Slide 1 20 November 2015 The Common Sense of Object Oriented...
© Trygve Reenskaug 2008UMLChina Slide 1April 20, 2023
The Common SenseThe Common Senseof of Object Oriented ProgrammingObject Oriented Programming
Trygve ReenskaugDepartment of InformaticsUniversity of Oslo
UMLChina, December, 2008
http://folk.uio.no/trygver/
© Trygve Reenskaug 2008UMLChina Slide 2April 20, 2023
Plan for talkPlan for talk1958- My first programs
Software engineering in focus
1960- Ship CAD/CAMShip designer in focus
1970- Distributed computingBusiness organization in focus
1978- MVCUser experience i focus
1980- Role modelingModeling processes in focus
1997- BabyUML- DCI paradigmObject oriented programming in focus
2008- BabyIDEHabitable programming tools in focus
© Trygve Reenskaug 2008UMLChina Slide 3April 20, 2023
Autokon Autokon (1960 -)(1960 -)
Ship Design and ManufactureShip Design and ManufactureMental model
Flame cutter
Computer
http://heim.ifi.uio.no/~trygver/2003/HiNC/hinc-18final.pdf
© Trygve Reenskaug 2008UMLChina Slide 4April 20, 2023
What it is All AboutWhat it is All AboutBuild Tools for the End UsersBuild Tools for the End Users
Program
mentalmodel
magic
commands
presentations
© Trygve Reenskaug 2008UMLChina Slide 5April 20, 2023
System DistributionSystem Distributionreflects organization structure reflects organization structure
http://heim.ifi.uio.no/~trygver/1973/iccas/1973-08-ICCAS.pdf
© Trygve Reenskaug 2008UMLChina Slide 6April 20, 2023
View
MVCMVCModel – View – Model – View – ControllerController (1 of 2)(1 of 2)
Model
User
magicmentalmodel
Illusion of magic:User works with own Mental Model
© Trygve Reenskaug 2008UMLChina Slide 7April 20, 2023
MVC makes a ToolMVC makes a ToolController Coordinates ViewsController Coordinates Views
Model
User View
Controller
*1
magicmentalmodel
Illusion of magic:User works with own Mental Model
© Trygve Reenskaug 2008UMLChina Slide 8April 20, 2023
Modeling Use Case with RolesModeling Use Case with Rolesa business organizationa business organization
Ruth(President)
Ann(Consultant)
Bill(Dispatcher)
Joyce(Sales clerk)
Douglas(Marketing manager)
Kim(Methodologist)
Peter(Technical author)
Elsie(Programmer)
Eve(Software Manager)
John(Cashier)
Bill(Bookkeeper)
Joe(Paymaster)
Adam(Chief Accountant)
© Trygve Reenskaug 2008UMLChina Slide 9April 20, 2023
Modeling Use Case with RolesModeling Use Case with Rolessample expense account processsample expense account process
Ruth(President)
Ann(Consultant)
Bill(Dispatcher)
Joyce(Sales clerk)
Douglas(Marketing manager)
Kim(Methodologist)
Peter(Technical author)
Elsie(Programmer)
Eve(Software Manager)
John(Cashier)
Bill(Bookkeeper)
Joe(Paymaster)
Adam(Chief Accountant)
6:5:
4:3: 2: 1:
© Trygve Reenskaug 2008UMLChina Slide 10April 20, 2023
Modeling with RolesModeling with Rolesthe role abstractionthe role abstraction
Ruth(President)
Ann(Consultant)
Bill(Dispatcher)
Joyce(Sales clerk)
Douglas(Marketing manager)
Kim(Methodologist)
Peter(Technical author)
Elsie(Programmer)
Eve(Software Manager)
John(Cashier)
Bill(Bookkeeper)
Joe(Paymaster)
Adam(Chief Accountant)
6:5:
4:3: 2: 1:
Cashier
Bookkeeper Traveler
Authorizer
Reenskaug et.al.: Working with objects. The OOram Software Engineering Method.Manning 1996; ISBN 1-884777-10-4.
6:5:
4: 3:2: 1:
Interaction
Context
Data
© Trygve Reenskaug 2008UMLChina Slide 11April 20, 2023
Gamma, Helm, Johnson, Vlissides:Gamma, Helm, Johnson, Vlissides:Design PatternsDesign Patterns
An object-oriented program's run-time structure often bears little resemblance to its code structure.
• The code structure is frozen at compile-time; it consists of classes in fixed inheritance relationships.
• The run-time structure consists of rapidly changing networks of communicating objects.
…, it's clear that code won't reveal everything about how a system will work.
[GOF] Gamma, E; Helm, R; Johonson, R; Vlissides, J: Design Patterns; ISBN 0-201-63361-; Addison-Wesley, Reading, MA. 1995. p.22, 23
© Trygve Reenskaug 2008UMLChina Slide 12April 20, 2023
The DCI ParadigmThe DCI ParadigmSystem state and System behaviorSystem state and System behavior
D ata The data classes- What the system IS
C ontextThe roles and their connectors- The stage where things happen
I nteractionThe players interact to achieve a use case- What the system DOES and how it does it
© Trygve Reenskaug 2008UMLChina Slide 13April 20, 2023
““Rapidly changing networks of Rapidly changing networks of communicating objects”communicating objects”
ID=442
ID=993
ID=784
ID=351ID=436
http://heim.ifi.uio.no/~trygver/assets/animate-arrows.mpeg
© Trygve Reenskaug 2008UMLChina Slide 14April 20, 2023
Edsger W. DijkstraEdsger W. Dijkstrafrom “GOTO considered harmful”from “GOTO considered harmful”
• our powers to visualize processes evolving in time are relatively poorly developed.
• shorten the conceptual gap between the static program and the dynamic process,
• make the correspondence between the program (spread out in text space) and the process (spread out in time) as trivial as possible.
© Trygve Reenskaug 2008UMLChina Slide 15April 20, 2023
magic
Programmer Centered Programmer Centered ProgrammingProgramming
Program
mentalDCI
model
BabyIDE
Programmer Computer
© Trygve Reenskaug 2008UMLChina Slide 16April 20, 2023
BabyIDE screendumpBabyIDE screendumpInteraction perspectiveInteraction perspective
A B
C D
© Trygve Reenskaug 2008UMLChina Slide 17April 20, 2023
ConclusionConclusionDCI = Readable CodeDCI = Readable Code
The DCI paradigm:Work with program in different perspectives
• D ata Classes for what the system IS
• C ontext for seeing the Roles and Objects
• I nteraction for what the system DOES
Dijkstra’s ideal:make the correspondence between
the program (spread out in text space) and
the process (spread out in time) as trivial as possible.
© Trygve Reenskaug 2008UMLChina Slide 18April 20, 2023
State of BabyIDE ProjectState of BabyIDE ProjectDCI
Squeak mechanism readyImplementations in C++, Ruby, Scala, Python in progress. Java is difficult.
BabyIDESqueak Demo version availableSqueak Alpha version soon
Professional IDEBasic technology is open, I hope professional toolmakers will pick it up.
For now:No general tools availableThink about the reader of your codeTry Mediator pattern!
© Trygve Reenskaug 2008UMLChina Slide 19April 20, 2023
That’s all.
Thank you for listening.
Comments, Questions?
http://heim.ifi.uio.no/~trygver/
© Trygve Reenskaug 2008UMLChina Slide 20April 20, 2023
Legal NoticeLegal Notice
This presentation is copyright ©2008 Trygve Reenskaug
Oslo, Norway.
All rights reserved.
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee
provided that the copies are not made for profit or commercial advantage and that copies bear this notice and
full citation on the first page.