Domain Class Development Introduction

Domain classes are used to “capture the vocabulary used in the client’s own working environment, so that the terminology reflected in the software has familiar meaning to the clients who use it” (p. 132). In simpler terms, Domain Classes define the “things” or “events” (typically having more than one attribute) that are used by the program, while entity classes use those attributes to persist an entity object. The development of domain classes consists of three major parts: Coding, unit testing, and system testing. Coding is mostly self-explanatory; this part of development consists of writing the domain classes by defining domain objects using one of several methods. These methods include Reusing External Legacy code from another program, Reusing Internal Legacy code from another class within the program, or the most obvious- writing a domain class from scratch. Reusing legacy code is almost always ideal since it saves time, and because domain classes are so common then can often be used across many applications, as long as attributes are added/removed according to the needs of the program. On the other hand there is also the need to write domain classes from scratch, since in most cases a new application will be using a domain class in a unique way and as such will require a domain class with a unique set of attributes.


The next two major parts of domain class development have to do with testing. The first is testing each individual class or unit of code. This is referred to as “unit testing.” Unit testing must start immediately after each class or unit of code is written. It is within bad practice to write a program in its entirety and then begin testing, simply because there are almost always initial errors in every program, and the larger the code being tested, the more difficult it is to pinpoint an error. So how does unit testing get put into practice? By use of a test suite, or a written collection of unit tests that conducts them simultaneously yet individually. Each of these written tests should call all individual functions within a class to limit operational errors.


The final part of domain class development and other type of testing is system testing. This is testing on a larger scope, and seeing how the individual units interact with the entire system. An example would be testing within a non-production region of a cloud service provider. System testing is crucial to domain class development, since typically domain objects are used heavily and their attributes are passed around mutliple times by multiple units or services. An important note about testing that may seems obvious is that no amount of testing will ever ensure that the program is entirely error-free, but it is almost always helpful in making software run smoothly and efficiently, without factoring in time constraints.

Previous
Previous

Post-prod: Smoothly Handing off a Completed Product

Next
Next

Database Guidelines