Yup. Real dogs are better than anything. Even the appearance of our German Shepherds keeps them away, much less barking and growling.
Heads off the problem, unlike guns which only help after youre already in.