1. A method for providing a user interface in an on-demand service environment, the method comprising: receiving, by a processor system, a first indication of a component definition to instantiate, the component definition comprising a portion of a component definition data structure; instantiating, by the processor system, a provided component in accordance with the component definition; instantiating, by the processor system, attributes of the component definition data structure to produce a component instance tree data structure; determining, by the processor system, that an attribute of an object of the component instance tree data structure indicates a designated one of a plurality of serialization methods, the object being a root object instance at a first level of a hierarchy of the component instance tree data structure; serializing, by the processor system, the component according to the designated serialization method, serializing the component including serializing the object and a child object, the child object at a second level of the hierarchy of the component instance tree data structure, the second level being lower than the first level; generating, by the processor system, a reference identifier associated with the serialized component; transmitting, to a client device, the serialized component and the reference identifier, the serialized component comprising a version of the component instance tree data structure, and the serialized component allowing the client device to create an instance of the component in memory; receiving, by the processor system, a second indication of a component definition to instantiate; determining, by the processor system, that the second indication is associated with the component definition of the first indication and that the serialized component has been transmitted to the client device; and transmitting, to the client device, the reference identifier associated with the serialized component responsive to the determination that the serialized component has been transmitted to the client device.