I don't remember the last time I had real trouble with dogs on my bike. I do have dogs bark at me from behind a fence. I always say something in a calm voice. Sometimes, they turn friendly after that, other times, they keep barking. Oh well.
Jonathan
PS: I keep my Zéfal HPX handy under my top tube, just in case. The water bottle helps too, so does squealing like a little girl.