1. A system for defining and using modeled types comprising: a modeled type tool that receives user input during development of a modeled type, the input comprising: a name and definition of an underlying type for the modeled type; a name and type of at least one attribute of the modeled type; programming code associated with the modeled type, wherein the programming code refers to the at least one attribute and wherein the programming code is executed upon a program element of the modeled type, during execution of an application that defines the program element to be of a type of the modeled type, wherein the programming code associated with the modeled type is stored with the modeled type and is not included in the programming code of the application.