Gradient-enhanced damage and plasticity approaches are reviewed with regard to their ability to model localization phenomena in quasi-brittle and frictional materials. Emphasis is put on the algorithmic aspects. For the purpose of carrying out large-scale finite element simulations efficient numerical treatments are outlined for gradient-enhanced damage and gradient-enhanced plasticity models. For the latter class of models a full dispersion analysis is presented at the end of the paper. In this analysis the fundamental role of dispersion in setting the width of localization bands is highlighted.