The technique of domain logical value-objects (DLVO) is a method for domain-driven programming that stays close to the code. It takes the "middle road" by identifying domain concepts that are more than "just data" (e g strings and integers), but still not "big enough" to qualify as long lived objects with a unique identity (e g customers and orders).
Examples from a CRM application could include phone numbers, credit classifications, email addreses, and contact intervals. By explicitly spelling these out in the design, they provide an effective way of gathering validation and other operations for reuse. As an effect it simplifies a lot of other code, which was earlier luttered with these kinds of operations.
The major advantage of using DLVOs is that it can start being applied immediately. It does neither take structural changes of the overall structure, nor craves a heavy round of preparing refactorings. So, it can be applied with a very small initial effort. In that way, it is possible to very fast start reaping some of the fruits of the domain driven approach, e g more structured in-data validation, more expressive service-APIs and clearer code in the business logic (often EJBs or similar).
I this session we present domain-logical value objects, and how you write and use them in practice. The concrete code examples are in Java, but the ideas and techniques can just as well be applied to code written in C++/C, VB or Ruby.
Comments