Home > Articles > Software Development & Management > UML

Applying UML and Patterns: Mapping Designs to Code

  • Print
  • + Share This
Craig Larman shows you how to map design artifacts to code in an object-oriented language.
This chapter is from the book

Beware of bugs in the above code; I have only proved it correct, not tried it.

—Donald Knuth


  • Map design artifacts to code in an object-oriented language.


With the completion of interaction diagrams and DCDs for the current iteration of the case studies, there’s more than enough thought and detail to cut some code for the domain layer of objects.

The UML artifacts created during the design work—the interaction diagrams and DCDs—will be used as input to the code generation process.

In UP terms, there exists an Implementation Model. This is all the implementation artifacts, such as the source code, database definitions, JSP/XML/HTML pages, and so forth. Thus, the code being created in this chapter can be considered part of the UP Implementation Model.

Language Samples

Java is used for the examples because of its widespread use and familiarity. However, this is not meant to imply a special endorsement of Java; C#, Visual Basic, C++, Smalltalk, Python, and many more languages are amenable to the object design principles and mapping to code presented in this case study.

  • + Share This
  • 🔖 Save To Your Account