1. A computer-implemented method comprising: receiving a pattern language code having definitions of a number of classes, wherein a definition of a first class of the number of classes comprises a reference to a first key field, wherein a definition of a second class comprises a reference to a second key field, wherein the first key field references a first external object and the second key field references a second external object, wherein the first external object and the second external object are different external objects, and wherein the first external object is in an ontological relationship with the second external object in order to establish a surrogate relationship; and compiling, using one or more processors, the pattern language code to generate object code, wherein the compiling comprises validating the surrogate relationship between the first and second classes; wherein the surrogate relationship defines a relationship where the second class can functionally replace the first class in the compiled object code.
2. The computer-implemented method of claim 1 , wherein the receiving a pattern language code includes a definition of a third class of the number of classes, wherein the definition of the third class includes a reference to a third key field, wherein the third key field references the first external object, and wherein the first and third key fields establish an extends relationship between the first and third classes; and wherein the compiling the pattern language code to generate an object code includes validating the extends relationship between the first and third classes; wherein the extends relationship defines a relationship where the third class extends the functionality of the first class in the compiled object code.