Content deleted Content added
m link ___domain knowledge using Find link |
→Implementing DCI: Removed advertisement of a book as an example because the book isn't even notable enough to have an article and there was no information added by the link; just a raw spam link. Tag: references removed |
||
Line 67:
==Implementing DCI==
DCI depends on a design process that separates [[use cases]] from the data model. The data model is often based on an informal ___domain analysis. The Roles that characterize the end-user's model of system functionality come from the [[use cases]].
Implementation techniques differ across programming languages. What is common to many approaches is that Roles are represented by such constructs as generics, templates, classes, or [[Traits (computer science)|traits]]. Code for the basic ___domain logic is implemented separately, following conventional object-oriented practice and most commonly using classes. Each Role's code is injected into the ___domain object that will play it during the [[use case]] enactment. To implement [[Role-oriented programming|Roles]], [[method injection]] is usually needed. [[Traits (computer science)|Traits]]<ref>Nathaniel Schärli et al. Traits: Composable units of behavior. http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf</ref> are one common programming language technique to support [[method injection]]. Some languages, such as [[Scala (programming language)|Scala]], have native support for [[Traits (computer science)|traits]], while other languages (e.g., [[Ruby (programming language)|Ruby]] and [[Python (programming language)|Python]]) allow run time injection of methods. In [[Java (programming language)|Java]], pre-compiler tricks based on annotations are needed to support DCI.
|