Chapter 10. Quantity archetype pattern

10.1 Business context

In various places in this book, we have mentioned quantities of things. In this chapter we provide a simple pattern for capturing quantities.


A quantity is an amount of something measured according to some standard of measurement.

Another way to say this is that a quantity of something is a number expressed in a particular metric.


A metric is a standard of measurement.

For example, a bag of sugar in the store contains 1 (the number) kilogram (the metric) of sugar (the something). ...

Get Enterprise Patterns and MDA: Building Better Software with Archetype Patterns and UML now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.