Herbivores exert significant selection on plants, and plants have evolved a variety of constitutive and inducible defenses to resist and tolerate herbivory. Assessing the genetic mechanisms that influence defenses against herbivores will deepen our understanding of the evolution of essential phenotypic traits.Ecogenomics is a powerful interdisciplinary approach that can address fundamental questions about the ecology and evolutionary biology of species, such as: which evolutionary forces maintain variation within a population? and What is the genetic architecture of adaptation? This field seeks to identify gene regions that influence ecologically-important traits, assess the fitness consequences under natural conditions of alleles at key quantitative trait loci (QTLs), and test how the abiotic and biotic environment affects gene expression.Here, we review ecogenomics techniques and emphasize how this framework can address long-standing and emerging questions relating to anti-herbivore defenses in plants. For example, ecogenomics tools can be used to investigate: inducible vs. constitutive defenses; tradeoffs between resistance and tolerance; adaptation to the local herbivore community; selection on alleles that confer resistance and tolerance in natural populations; and whether different genes are activated in response to specialist vs. generalist herbivores and to different types of damage.Ecogenomic studies can be conducted with model species, such as Arabidopsis, or their relatives, in which case myriad molecular tools are already available. Burgeoning sequence data will also facilitate ecogenomic studies of non-model species. Throughout this paper, we highlight approaches that are particularly suitable for ecological studies of non-model organisms, discuss the benefits and disadvantages of specific techniques, and review bioinformatic tools for analyzing data.We focus on established and promising techniques, such as QTL mapping with pedigreed populations, genome wide association studies, transcription profiling strategies, population genomics, and transgenic methodologies. Many of these techniques are complementary and can be used jointly to investigate the genetic architecture of defense traits and selection on alleles in nature.