Plant defenses are very diverse and often involve contrasted costs and benefits. Quantitative defenses, whose protective effect is dependent on the dose, are effective against a wide range of herbivores, but often divert energy from growth and reproduction. Qualitative defenses do not have such allocation costs. However, while deterrent to some herbivores, they often incur costs through other interactions within the community (eg, decrease in pollination or attraction of other enemies). In the present work, we model the evolutionary dynamics of these two types of defenses, as well and the evolutionary dynamics of the herbivore niche. We also assess the effects of such evolutionary dynamics for the maintenance of diversity within the plant-herbivore system, and for the functioning of such systems (effects of nutrient enrichment). We show that the two types of defenses have different implications. Evolution of quantitative defenses may help to maintain or even increase diversity, while evolution of qualitative defenses most often has a detrimental effect on species coexistence. From a functional point of view, nutrient enrichment selects for higher levels of quantitative defenses, which reduces top-down controls exerted by herbivores. Enrichment does not affect qualitative defenses, nor the evolution of the herbivore niche. We finally discuss the implications of these results for the management of ecosystems.