A vivarium, or terrarium, is a usually an enclosure for keeping and raising animals or plants for breeding, observation or research where a portion of the ecosystem for a particular species is simulated on a smaller scale, often with controls for moderating environmental conditions. A vivarium may be small enough to sit on a desk or table, or may be a very large structure, even possibly outdoors. Smaller vivariums may be as simple as a glass aquarium
Habitats are a hobbyist name for any number of reptile or invertebrate specific free standing cages, sometimes small plastic containers with custom tops that can be used for temporary transport or storage of larger specimens, or long term captivity for smaller specimens. These habitats may or may not duplicate a portion of the ecosystem for a particular species, depending on the owners needs. They usually have a fixed screen type top of some type.