User Tools

Site Tools


what_is_the_relationship_between_classes_objects_roles_and_contexts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

what_is_the_relationship_between_classes_objects_roles_and_contexts [2014/10/22 19:55]
gazoot [What is the relationship between Classes, Objects, Roles and Contexts?]
what_is_the_relationship_between_classes_objects_roles_and_contexts [2014/11/09 04:48] (current)
gazoot [What is the relationship between Classes, Objects, Roles and Contexts?]
Line 5: Line 5:
 A class serves well as a static data structure, a collection of defining properties and relations defined by system architects and domain experts. When a class is instantiated as an object however, that object will interact with other objects in ways that does not directly associate to its basic definitions. A pen does not know how to write, writing requires interaction between for example a pen, a human and a paper. From a system perspective,​ neither of these objects are valid places for this interaction between objects called "​writing",​ instead an encompassing system will define how writing should occur, and will access the concerned object properties when needed during the process. A class serves well as a static data structure, a collection of defining properties and relations defined by system architects and domain experts. When a class is instantiated as an object however, that object will interact with other objects in ways that does not directly associate to its basic definitions. A pen does not know how to write, writing requires interaction between for example a pen, a human and a paper. From a system perspective,​ neither of these objects are valid places for this interaction between objects called "​writing",​ instead an encompassing system will define how writing should occur, and will access the concerned object properties when needed during the process.
  
-Writing is a more generic process, or as DCI calls it, "​Context",​ than one that handles only the specific objects pen, human and paper. That's where Roles comes in. Writing can be done on basically any material, so in a "​Writing"​ Context it makes sense that the object "​Paper"​ should be referred to, or //play the Role// "​Material"​ in the writing context. The same goes for the other objects:+You may argue that the human may be a good place for this functionality. ​Writing ​however ​is a more generic process, or as DCI calls it, "​Context",​ than one that handles only the specific objects pen, human and paper. That's where Roles comes in. Writing can be done on basically any material, so in a "​Writing"​ Context it makes sense that the object "​Paper"​ should be referred to, or //play the Role// "​Material"​ in the writing context. The same goes for the other objects:
  
   * The object //​Pen// ​  plays the Role //​Instrument//​ in the //Writing// Context.   * The object //​Pen// ​  plays the Role //​Instrument//​ in the //Writing// Context.
what_is_the_relationship_between_classes_objects_roles_and_contexts.txt ยท Last modified: 2014/11/09 04:48 by gazoot