The appendages of Drosophila develop from the imaginal discs. During the extensive growth of these discs cell lineages are for the most part unfixed, suggesting a strong role for cell-cell interactions in controlling the final pattern of differentiation. However, during early and middle stages of development, discs are subdivided by strict lineage restrictions into a small number of spatially distinct compartments. These compartments appear to be maintained by stably inheriting states of gene expression; the compartment-specific expression of two such 'selector'-like genes, engrailed and apterous, are critical for anterior-posterior and dorso-ventral compartmentalization, respectively. Recent work suggests that one purpose of compartmentalization is to establish regions of specialized cells near compartment boundaries via intercompartmental induction, using molecules like the hedgehog protein. Thus, compartments can act as organizing centers for patterning within compartments. Evidence for non-compartmental patterning mechanisms will also be discussed.