Biology of Diptera
Diptera is an order of winged insects commonly known as flies. Diptera, which are one of the most successful groups of organisms on Earth, are very diverse biologically. None are truly marine but they occupy virtually every terrestrial niche. Many have co-evolved in association with plants and animals. The Diptera are a very significant group in the decomposition and degeneration of plant and animal matter, are instrumental in the breakdown and release of nutrients back into the soil, and whose larvae supplement the diet of higher agrarian organisms. They are also an important component in food chains. The applied significance of the Diptera is as disease vectors, as agricultural pests, as pollinators and as biological control agents. Habitats
Diptera occur all over the world except in regions with permanent ice-cover. They are found in most land biomes (all 14 WWF major habitat types) including deserts and the tundra. Insects are the most diverse group of Arctic animals (about 3,300species), of which about 50% are Diptera. Palearctic habitats include meadows, prairies,  mountain passes, forests, desert oases, seashores, sandy beaches, coastal lagoons, lakes, streams and rivers, bogs, fens, areas (including waters polluted by rotting waste, industrial emissions), urban areas, cattle, horse and poultry farms. Cave Diptera
see also List of fauna of Batu Caves
The Diptera fauna of caves includes species in Sphaeroceridae, Mycetophilidae, Psychodidae, Phoridae, Tipulidae, Trichoceridae, Heleomyzidae, Mycetophilidae and Culicidae. The main sources of food for cave Diptera are other insects, carrion and guano. Most are perhaps only troglophiles. Desert Diptera
Desert diptera include specialised species of  Psychodidae, Nemestrinidae, Therevidae, Scenopinidae and Bombyliidae. These groups are most diverse where dry sandy soils provide a suitable habitat for the larvae. Freshwater Diptera
Larval stages of Diptera can be found in almost any aquatic or semiaquatic habitat They form an important fraction of the macro zoobenthos of most freshwater ecosystems. families are Chironomidae (very significant), Stratiomyidae, Ephydridae,  Dixidae and Tipulidae. Soil dwelling Diptera 
Larval stages of  many Diptera species  can be found in soil and many species developing in other terrestrial habitats such as dung carrion or other pupate in soil. Chironomide, Sciaridae, Cecidomiidae are most abundant in terms of biomass Tipulidae and bibiobidae dominate. Many of them such as Bibionidae significantly may consume substantial amount of annual litter fall and contribute to soil organic matter transformation. Feeding
Food habits of most species are largely unknown but broad statements may be made. Diptera are important pollinators and plant pests. Detritivores
Many Diptera are detritivores. Typical are Dryomyza anilis and, notably, Musca domestica. Flower feeders
Many adult Brachycera feed on flowers notably  hover fly which obtain all their protein requirements by feeding on pollen. The Calyptratae exhibit flower feeding in all families except Hippoboscidae Nycterebidae and Glossinidae and in the Acalyptratae the Conopidae are well known flower feeders. Other flower feeding Brachycerous families are  Empididae, Stratiomyidae  (soldier flies) and the Acroceridae like various members of the  Nemestrinidae (tangle-veined flies),  Bombyliidae (bee flies) and Tabanidae (horse-fly)  are nectar feeders with exceptionally long proboscises, sometimes longer than the entire bodily length of the insect. Flower feeding Nematocera include Bibionidae (March flies)  and some species in Tipulidae (Crane flies) and other families. Predators
Adult Asilidae, Empididae and Scathophagidae feed on other insects, including smaller Diptera, Dolichopodidae and some Ephydridae feed on a variety of animal prey. Both male and female mosquitoes feed on nectar and plant juices, but in many species the mouthparts of the females are adapted for piercing the skin of animal hosts and feed on blood as ectoparasites. The most important function of blood meals is to obtain proteins as materials for egg production. For females to risk their lives on blood sucking while males abstain, is not a strategy limited to the mosquitoes; it also occurs in some other families, such as the Tabanidae. Most female horse flies feed on mammal blood, but some species are known to feed on birds, amphibians or reptiles. Other bloodfeeding Diptera are Ceratopogonidae Phlebotominae Hippoboscidae, Hydrotaea and Philornis downsi (Muscidae), Spaniopsis and Symphoromyia Rhagionidae. There are no known acalyptrates that are obligate blood-feeders. Larvae
The larvae of Diptera feed on a diverse array of nutrients ; often these are different from those of adults, for instance the larvae of Syrphidae in which family the adults are flower-feeding are saprotrophs, eating decaying plant or animal matter, or insectivores, eating aphids, thrips, and other plant-sucking insects. Larval Diptera feed in leaf-litter, in leaves, stems, roots, flower and seed heads of plants, moss, fungi, rotting wood, rotting fruit or other organic matter such as slime, flowing sap, and rotting cacti, carrion, dung, detritus in mammal bird or wasp nests, fine organic material including insect frass and micro-organisms. Many Diptera larvae are predatory, sometimes on the larvae of other Diptera. Many Agromyzidae are leaf miners. Some Tephritidae are leaf miners or gall formers. The larvae of all Oestridae oestrids are obligate parasites of mammals. (Oestridae include the highest proportion of species whose larvae live as obligate parasites within the bodies of mammals. Most other species prone to cause myiasis are members of related families, such as the Calliphoridae. There are roughly 150 known species worldwide.) Tachinidae larvae are parasitic on other insects. Conopidae larvae are endoparasites of bees and wasps or of cockroaches and calyptrate Diptera, Pyrgotidae larvae are endoparasites of adult scarab beetles. Sciomyzidae larvae are exclusively associated with freshwater and terrestrial snails, or slugs. They feed on snails as predators, parasitoids, or scavengers. Females search out snails for oviposition. Known Odiniidae larvae live in the tunnels of wood-boring larvae of Coleoptera, Lepidoptera, and other Diptera and function as scavengers or predators of the host larvae. Oedoparena larvae feed on barnacles. The larvae of Acroceridae and some Bombyliidae are hypermetamorphic. Milichiidae especially Pholeomyia and Milichiella Milichiidae are kleptoparasites of predatory invertebrates, and accordingly are commonly known as freeloader flies or jackal flies. Ant associates
Stylogastrines are obligate associates of some Orthoptera, other Diptera and ants. These flies typically use army ants' raiding columns to flush out their prey, ground-dwelling Orthoptera. Many species of Phoridae are specialist parasitoids of ants, but there are also species in the tropics that are parasitoids of stingless bees. These affected bees are often host to more than one fly larva and some individuals have been found to contain 12 phorid larvae. The subfamily Microdontinae contains slightly more than 400 species of hoverflies (family Syrphidae) and, while diverse, these species share several characteristics by which they differ from other syrphids. The Microdontinae are myrmecophiles, meaning they live in the nests of ants. Larval Microdontinae are scavengers or predators in ant nests. Adults of many species of the genus Bengalia are kleptoparasitic on ants and will snatch food and pupae being carried by ants or feed on winged termites. Swarms
Swarm-based mating systems typically involve males flying in swarms to attract patrolling females. Such swarms are often of immense size. Smaller swarms may be around a fixed point called a swarm marker. Swarming occurs in Chironomidae, Bibionidae, Platypezidae, Limoniidae, Thaumatomyia notata, Sepsis fulgens, Bibionidae, Platypezidae, Fanniidae, Coelopidae, Milichiidae and Trichoceridae. Chaoboridae form larval as well as adult swarms. Mimicry
Many Diptera are mimetic. An instance is Syrphidae often are brightly coloured, with spots, stripes, and bands of yellow or brown covering their bodies. Due to this colouring, and sometimes behaviour patterns, they are often mistaken for wasps or bees; they exhibit Batesian mimicry. The wing pattern of the sciomyzidTrypetoptera punctulata is very similar to some Tephritidae, and might, in fact, mimic the colour pattern of some spiders
There are several fly species that look like an ant. At least one species from the little studied Richardiidae genus Sepsisoma mimic ants, particularly the formicine ant Camponotus crassus. Several species of Micropezidae (stilt-legged flies) resemble ants (especially the wingless, haltere-less Badisis ambulans), as do species in the genus Strongylophthalmyia and Syringogaster..Mydidae are mimics of stinging
Hymenoptera. Behaviour
Flies give visual (as distinct from chemical or other) signals during courtship. Sexual selection and Courtship
Many Diptera exhibit sexual selection and several patterns of sexual shape dimorphism, such as male body elongation, eye stalks, or extensions of the exoskeleton, have evolved repeatedly in the true flies (Diptera). Phytalmia mouldsi uses a resource defense mating system. Deuterophlebia males have extremely long antennae which they employ when contesting territories over running water, waiting for females to hatch. Families of acalyptrate flies exhibiting morphological development associated with agonistic behaviour include: Clusiidae, Diopsidae, Drosophilidae,  Platystomatidae, Tephritidae and  Ulidiidae. Some Empididae have an elaborate courtship ritual in which the male wraps a prey item in silk and presents it to the female to stimulate copulation. Many observed behaviours remain unstudied. Bioluminescence
Around a dozen Keroplatidae species and Orfelia fultoni are unique among flies in displaying bioluminescence. In some species this is restricted to the larval stage but in others this feature is retained by the pupae and adults. It has been suggested that the ability to produce their own light is used by some predatory larvae as a lure for potential prey, although it also obviously makes themselves more susceptible to predation or parasitism. See also
C Class and B Class Diptera articles likely to have substantial information about biology and life history. Parasitic flies of domestic animals
Female sperm storage
Entomophthora muscae
Ecology many relevant components
Ecosystem model many relevant components
Fungivore
Detritivore
Niche apportionment models

Notes

References
Ferrar, P. 1988. A Guide to the Breeding Habits and Immature Stages of Diptera Cyclorrhapha. Leiden: E.J.Brill & Scandinavian Press 907 pp. Harold Oldroyd 1965: The Natural History of Flies. New York: W. W. Norton. Séguy, E., 1938 La Vie des Mouches et des Moustiques Delagrave
Séguy, E.,1944 Faune de France. Insectes Ectoparasites 684 p.,957 fig
Séguy, E., 1950 La Biologie des Dipteres. pp. 609. 7 col + 3 b/w plates, 225 text figs. (1950)
Yeates, D.K. & Wiegmann, B.M., 2005 The Evolutionary Biology of Flies. Columbia University Press. . Papers by William R. Elliott et al. at University of Texas Biospeleology e.g. Harald Plachter, 1983 Cave-dwelling flies in Central Europe: adaptation to environment, especially to low temperatures (Diptera, Nematocera: Trichoceridae et Sciaridae) Oecologia Volume 58, Number 3, 367-372. External links
Ecology of Commanster Click on the photos for biology info. Diptera videos
Database of Insects and their Food Plants
The evolutionary diversification in the Order Diptera

 
Articles containing video clips