Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Trygve Reenskaug 2008UMLChina Slide 1 20 November 2015 The Common Sense of Object Oriented Programming Trygve Reenskaug Department of Informatics University.

Similar presentations


Presentation on theme: "© Trygve Reenskaug 2008UMLChina Slide 1 20 November 2015 The Common Sense of Object Oriented Programming Trygve Reenskaug Department of Informatics University."— Presentation transcript:

1 © Trygve Reenskaug 2008UMLChina Slide 1 20 November 2015 The Common Sense of Object Oriented Programming Trygve Reenskaug Department of Informatics University of Oslo UMLChina, December, 2008 http://folk.uio.no/trygver/

2 © Trygve Reenskaug 2008UMLChina Slide 2 20 November 2015 Plan for talk 1958-My first programs Software engineering in focus 1960-Ship CAD/CAM Ship designer in focus 1970-Distributed computing Business organization in focus 1978-MVC User experience i focus 1980-Role modeling Modeling processes in focus 1997-BabyUML- DCI paradigm Object oriented programming in focus 2008-BabyIDE Habitable programming tools in focus

3 © Trygve Reenskaug 2008UMLChina Slide 3 20 November 2015 Autokon (1960 -) Ship Design and Manufacture Mental model Flame cutter Computer http://heim.ifi.uio.no/~trygver/2003/HiNC/hinc-18final.pdf

4 © Trygve Reenskaug 2008UMLChina Slide 4 20 November 2015 What it is All About Build Tools for the End Users Program mental model magic commands   presentations

5 © Trygve Reenskaug 2008UMLChina Slide 5 20 November 2015 System Distribution reflects organization structure http://heim.ifi.uio.no/~trygver/1973/iccas/1973-08-ICCAS.pdf

6 © Trygve Reenskaug 2008UMLChina Slide 6 20 November 2015 View MVC Model – View – Controller (1 of 2) Model User magic mental model Illusion of magic: User works with own Mental Model

7 © Trygve Reenskaug 2008UMLChina Slide 7 20 November 2015 MVC makes a Tool Controller Coordinates Views Model User View Controller * 1 magic mental model Illusion of magic: User works with own Mental Model

8 © Trygve Reenskaug 2008UMLChina Slide 8 20 November 2015 Modeling Use Case with Roles a 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)

9 © Trygve Reenskaug 2008UMLChina Slide 9 20 November 2015 Modeling Use Case with Roles sample 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:

10 © Trygve Reenskaug 2008UMLChina Slide 10 20 November 2015 Modeling with Roles the 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

11 © Trygve Reenskaug 2008UMLChina Slide 11 20 November 2015 Gamma, Helm, Johnson, Vlissides: Design 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

12 © Trygve Reenskaug 2008UMLChina Slide 12 20 November 2015 The DCI Paradigm System state and System behavior D ata The data classes - What the system IS C ontext The roles and their connectors - The stage where things happen I nteraction The players interact to achieve a use case - What the system DOES and how it does it

13 © Trygve Reenskaug 2008UMLChina Slide 13 20 November 2015 “Rapidly changing networks of communicating objects” ID=442 ID=993 ID=784 ID=351 ID=436 http://heim.ifi.uio.no/~trygver/assets/animate-arrows.mpeg

14 © Trygve Reenskaug 2008UMLChina Slide 14 20 November 2015 Edsger W. Dijkstra 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.

15 © Trygve Reenskaug 2008UMLChina Slide 15 20 November 2015 magic Programmer Centered Programming Program mental DCI model BabyIDE Programmer Computer

16 © Trygve Reenskaug 2008UMLChina Slide 16 20 November 2015 BabyIDE screendump Interaction perspective A B C D

17 © Trygve Reenskaug 2008UMLChina Slide 17 20 November 2015 Conclusion DCI = 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.

18 © Trygve Reenskaug 2008UMLChina Slide 18 20 November 2015 State of BabyIDE Project DCI Squeak mechanism ready Implementations in C++, Ruby, Scala, Python in progress. Java is difficult. BabyIDE Squeak Demo version available Squeak Alpha version soon Professional IDE Basic technology is open, I hope professional toolmakers will pick it up. For now: No general tools available Think about the reader of your code Try Mediator pattern!

19 © Trygve Reenskaug 2008UMLChina Slide 19 20 November 2015 That’s all. Thank you for listening. Comments, Questions? http://heim.ifi.uio.no/~trygver/

20 © Trygve Reenskaug 2008UMLChina Slide 20 20 November 2015 Legal 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.


Download ppt "© Trygve Reenskaug 2008UMLChina Slide 1 20 November 2015 The Common Sense of Object Oriented Programming Trygve Reenskaug Department of Informatics University."

Similar presentations


Ads by Google