Data, context and interaction: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
Importing Wikidata short description: "Architectural pattern in computer software development"
 
(2 intermediate revisions by 2 users not shown)
Line 1:
{{Short description|Architectural pattern in computer software development}}
'''Data, context, and interaction''' ('''DCI''') is a paradigm used in computer software to program systems of communicating [[Object (computer science)|objects]]. Its goals are:
* To improve the readability of [[Object-oriented programming|object-oriented]] code by giving system behavior first-class status;
Line 81 ⟶ 82:
* True object-oriented programming languages like [[Self (programming language)|Self]] attempt to break down the dichotomy between the domains of classful programming and objectful execution, which helps programmers focus on run-time objects. DCI restores the code-level knowledge about the relationships between them in Contexts and in the static relationships between Role methods.<ref name="Artima" />
* [[Dependency injection]] is a longstanding approach to change the functionality of an object at run time by allowing it to "outsource" some of its execution to an external object that can be re-bound at will. Most implementations{{which|date=October 2014}} of dependency injection lead to the [[Schizophrenia (object-oriented programming)|self schizophrenia]] problem,<ref>{{cite web |last1=Coplien |first1=James |title=Why isn't it DCI if you use a wrapper object to represent the Role? |url=https://fulloo.info/doku.php?id=why_isn_t_it_dci_if_you_use_a_wrapper_object_to_represent_the_role |publisher=DCI FAQ}}</ref> which implementations of DCI address properly. Systems such as Elmo use this approach, which brings additional complexity to resolve method ambiguity and duplicate data member names.<ref>James Leigh, Elmo User Guide, http://www.openrdf.org/doc/elmo/1.5/user-guide.html {{Webarchive|url=https://web.archive.org/web/20110721134455/http://www.openrdf.org/doc/elmo/1.5/user-guide.html |date=2011-07-21 }}</ref>{{Full citation needed|date=October 2014}}
* Multi-paradigm design<ref>James Coplien, Multi-paradigm design for C++. Addison-Wesley, 1998.</ref> attempts to separate behavior and structure by according the behavior to a procedural design and the structural component to objects, allowing free access between them, in accord with the design principles of C++. The DCI approach can improve on expressing the relationship between the procedural and structural parts of design and general cohesiveness.<ref name="Empirical Study on Code Comprehension">{{cite webbook |last1=Valdecantos |first1=Héctor Adrián |last2=Tarrit |first2=Katy |last3=Mirakhorli |first3=Mehdi |last4=Coplien |first4=James O. |title=An Empirical Study on Code Comprehension: Data Context Interaction Compared to Classical Object Oriented |url=https://www.researchgate.net/publication/345728720_An_Empirical_Study_on_Code_Comprehension_Data_Context_Interaction_Compared_to_Classical_Object_Oriented345728720 |website=2017 IEEE/ACM 25th International Conference on Program Comprehension (ICPC) |pages=275–285 |doi=10.1109/ICPC.2017.23 |date=May 2017|isbn=978-1-5386-0535-6 |s2cid=10694261 }}</ref>
 
The challenges of object-oriented programming can also be met by addressing its issues on the paradigm level.
 
* [[Aspect-oriented programming]] (AOP) is perhaps the closest historic relative to DCI. Most use of Aspects is closely tied to the programmer perspective and require strong tool support to provide good understanding of the software's behavivourbehaviour on any given [[pointcut]]. The main difference is that in DCI, the structure of the algorithm is primary, with a strong emphasis on its isolation from code outside itself, improving code readability. In AOP, the [[pointcut]] and [[Advice in aspect-oriented programming|advice]] carry equal importance and though physically disjoint, must be understood together to understand the code, because the advice is invasive at the [[pointcut]]. While AOP provides an administrative grouping of a related collection of individual local modifications that together cross-cut the primary structure of the code, DCI is a semantic expression of an algorithm with first-class analysis standing that invokes existing object methods. DCI can be thought of as a way of taking a large [[Advice in aspect-oriented programming|advice]] and allowing parts of it to be injected into a number of regularized [[pointcut]]s.{{citation needed|date=February 2016}}
* [[Role-oriented programming]] brings together ideas from [[Aspect-oriented programming]], conceptual modeling <ref>Friedrich Steimann, On the representation of roles in object-oriented and conceptual modelling, 2000, http://www.fernuni-hagen.de/ps/veroeffentlichungen/zeitschrift_46129.shtml {{Webarchive|url=https://web.archive.org/web/20161007005544/http://www.fernuni-hagen.de/ps/veroeffentlichungen/zeitschrift_46129.shtml |date=2016-10-07 }}</ref> and more. Early attempts (1991) defined roles in an independent fashion,<ref>Joel Richardson and Peter Schwarz, Aspects: extending objects to support multiple, independent roles, 1991, http://www.informatik.uni-trier.de/~ley/db/conf/sigmod/RichardsonS91.html {{Webarchive|url=https://web.archive.org/web/20071017185308/http://www.informatik.uni-trier.de/~ley/db/conf/sigmod/RichardsonS91.html |date=2007-10-17 }}</ref> but more recent approaches (2002 and onward) converge in emphasizing that roles depend on context (also "teams" <ref>Stephan Herrmann, Object Teams: Improving Modularity for Crosscutting Collaborations, http://www.objectteams.org/publications/index.html#NODe02, 2002</ref> or "institutions" <ref>Guido Baldoni et al., Roles as a coordination construct: introducing powerJava, 2005, http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.77.6337</ref>). In role-oriented programming, roles are defined with respect to some intrinsic (or base) entity, which corresponds to the data-role dichotomy in DCI. The concept of context is essentially the same in both approaches. Both approaches emphasize the interaction among a group of roles.
 
Line 94 ⟶ 95:
concerning the possibilities of this paradigm."<ref name="Empirical Study on Code Comprehension" />
 
According to researchers Bluemke and Stepień at Institute of Computer Science, Warsaw University of Technology, "DCI based systems are very flexible much more than the traditional ones, this is due to the fact that static (Data) and dynamic (Context, Interaction) parts of the system are separated and separation of concerns is very powerful strategy to master the complexity."<ref name="Experiences with DCI Pattern">{{cite webbook |last1=Bluemke |first1=Ilona |last2=Stepień |first2=Anna |title=Experiences with DCI Pattern |website=Software Engineering in Intelligent Systems |series=Advances in Intelligent Systems and Computing |pages=87–96 |doi=10.1007/978-3-319-18473-9_9 |date=2015 |volume=349 |isbn=978-3-319-18472-2 |url=https://www.researchgate.net/publication/279199208_Experiences_with_DCI_pattern279199208}}</ref>
 
==References==