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 often have little 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 assess the effects of such evolutionary dynamics for the maintenance of diversity within the plant-herbivore system, and for the functioning of such systems under various levels of resource availability. We show that the two types of defenses have different implications. Evolution of quantitative defenses often helps 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, increased resource availability selects for higher levels of quantitative defenses, which reduces topdown controls exerted by herbivores. Resource availability does not affect qualitative defenses, nor the evolution of the herbivore niche. The growing evidence that plant defenses are diverse in types, benefits and costs has large implications not only for the evolution of these traits, but also for their impacts on community diversity and ecosystem functioning.