Dehydration lasts longer, in theory, but (in my opinion) tastes significantly worse. The only thing I dehydrate is red meat for jerky or pemmican.
Canning is more expensive and if you do it wrong, more likely to kill you.
EDIT: Peppers. Herbs. I also dry those, but that is more for seasoning...