Content deleted Content added
m →Execution model: added references. |
→Implementing DCI: Added references, removed outdated examples, linked to fulloo.info instead. |
||
Line 64:
==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]]<ref name="DCI Paradigm" />.
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]] 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. [[Haxe]] uses its compile-time macro feature to transform the DCI semantics to target language code.
Several example implementations exist on the [https://fulloo.info/Downloads/ fulloo.info site] maintained by the creators of DCI.
==History==
|