220 likes | 377 Views
The BabyUML Discipline of Programming where A Program = Communication + Data Structures + Algorithms. Trygve Reenskaug University of Oslo. ECMDA 2005. Project Planning with Activity Networks. Project resources. User tools. Project activities. actA. actC. actB. actD. Class. Class.
E N D
The BabyUML Discipline of Programmingwhere A Program = Communication + Data Structures + Algorithms Trygve Reenskaug University of Oslo ECMDA 2005 BabyUML-ECMDA
Project Planning withActivity Networks BabyUML-ECMDA
Project resources User tools Project activities actA actC actB actD Class Class Class The Problem Undisciplined communication →Spaghetti Class, superclasses, methods →Noodles BabyUML-ECMDA
resources «Component» gui «Component» activityNetwork «Component» The BabyComponent BabyUML-ECMDA
BabyUML LaboratoryOverview Partition Object Space intoBabyComponents Encapsulates member objects • Data Structures • declare Member Objects • defines Universe of Discourse • Communication • BabyCollaboration • operations as Interacting Roles • Algorithms • classes, superclasses, methods BabyUML-ECMDA
Conventional Activity class (pseudocode fragment) Define class Activity subclass of Object with attributes name, duration, earlyStart,Activity [ ] preds, succs method addSuccessor (anActivity) add anActivity to succs. method addPredecessor (anActivity) add anActivity to preds. BabyUML-ECMDA
Code that Declaresthe Universe of Discourse 3-schemaarchitecture External Conceptual Internal BabyUML-ECMDA
CodePreserves Referential Integrity Define class Activity subclass of Object with attributes name, duration, earlyStart method frontloadFrom (firstWeek) earlyStart := firstWeek.babyBase predecessorsOf (self) do: [:predecessor | earlyStart :=max (earlyStart, predecessor earlyFinish] BabyUML-ECMDA
BabyComponentProvided Interface newActivity (name)addDependent (from, to)frontloadFrom (firstWeek)activityNames xmlActivity (activityName) «provided interface» «Component»activityNetwork BabyUML-ECMDA
newActivity addDependent xmlActivity activityNames A Projection for eachProvided Operation activityNetwork«component» frontloadFrom (firstWeek) BabyUML-ECMDA
Frontloading InteractionCommunication Code BabyUML-ECMDA
activitiesCollab bindRole resetter toMembers babyBase.activities. Query Fragment: activitiesCollabQuery: Data Structure Communication activitiesCollab «Collaboration» resetter * maestro resetEarlyStart collab - activitiesCollab Data Structure Conceptual Schema BabyUML-ECMDA
Fragment: activitiesCollabAlgorithm: resetEarlyStart External Schema Communication activitiesCollab «Collaboration» resetter * maestro resetEarlyStart Communication Data Structure collab - activitiesCollab Algorithm resetEarlyStart earlyStart := nil BabyUML-ECMDA
Frontloading InteractionSequence Diagram BabyUML-ECMDA
Fragment: frontCollabQuery: Data Structure frontCollab «Collaboration» 1 frontloader maestro frontload From ( firstWeek ) 1 Communication * predecessor earlyStart Data Structure Query collab - frontCollab -1 frontCollab bindRole frontloader toMember: find act from activities such that: (act planned not and all act.predecessors.planned) bindRole predecessor toMembers: babyBase predecessorsOf (frontloader). BabyUML-ECMDA
Fragment: frontCollabAlgorithm: frontLoadFrom ( ) frontCollab «Collaboration» 1 frontloader maestro frontload From ( firstWeek ) 1 Communication * predecessor earlyStart Data Structure collab - frontCollab -1 Algorithm frontloadFrom (firstWeek) earlyStart := firstWeek . forAll predecessor do: [: pred | earlyStart := max (earlyStart, pred earlyFinish) BabyUML-ECMDA
Class Class Class BabyUML Summary: 1 of 4 Stored Program Object Computer BabyUML Virtual Machine (Smalltalk/Squeak VM) BabyUML-ECMDA
BabyUML Summary: 2 of 4BabyComponents BabyUML Virtual Machine (Smalltalk/Squeak VM) BabyUML-ECMDA
activityNetwork «Component» Member Objects Port Maestro BabyBase BabyUML Summary: 3 of 4Anatomy of a Component BabyUML Virtual Machine (Smalltalk/Squeak VM) BabyUML-ECMDA
activityNetwork «Component» Member Objects Port Maestro BabyBase BabyUML Summary: 4 of 4A Coherent Discipline Algorithms Data Structure Communication Component identity BabyUML-ECMDA
Finally, A Challenge Modeling languagesremind uswhat should be included in our Programming Languages More info at heim.ifi.uio.no/~trygver BabyUML-ECMDA
http://www.ifi.uio.no/~trygver mailto: trygver ‘at’ ifi.uio.no Trygve Reenskaug: Towards a New Discipline of Programming with the BabyUML Language Laboratory.http://heim.ifi.uio.no/~trygver/2005/babyuml/BabyUML.book.pdf Trygve Reenskaug: Empowering People with BabyUML: A sixth GenerationProgramming Language. Opening talk, ECOOP 2004, Oslo.http://heim.ifi.uio.no/~trygver/2004/ECOOP-04/EcoopHandout.pdf Unified Modeling Language: Superstructure. Version 2.0.Object Management Group. Document ptc/04-10-02 or later http://www.omg.org Model Driven Architecture See: http://www.omg.org/mda/ Cattell, Barry: The Object Data Standard: ODMG 3.0. Academic Press,London, 2000. ISBN 1-55860-647-4 Erik Arisholm and Dag Sjøberg, A Controlled Experiment with Professionals to Evaluate the Effect of a Delegated versus Centralized Control Style on the Maintainability of Object-Oriented Software, Simula Research Laboratory Technical Report 2003-6http://www.simula.no/publication_one.php?publication_id=601 Richard Pawson and Robert Matthews: Naked Objects. Wiley 2002, ISBN: 0-470-84420-5 More details …. BabyUML-ECMDA