Territorial barking

As I have mentioned before, there are different types of barking. Today I would like to focus on territorial barking http://pets.webmd.com/dogs/guide/understanding-why-dogs-bark
Territorial/Protective barking: When a person or an animal comes into an area your dog considers his territory, that often triggers excessive barking. As the threat gets closer, the barking often gets louder. Your dog will look alert and even aggressive during this type of barking.
Pippi barks mainly when she tries to protect her territory, certainly she is confused regarding her own territory, cause we live in a big city. I have observed that in a field of grass she feels great, however she gets anxious whenever we are sorrounnded by too many people. And how to handle with this type of barking? Certainly not shouting at your pet.
Shouting stimulates your dog to bark more because he thinks you’re joining in. So the first rule is to speak calmly and firmly, but don’t yell.
Your should tell your dog to be quiet in a calm but firm manner. I usually do this and it helps... a bit.
Because this type of barking (territorial) is often motivated by fear or a perceived threat to their territory or people, it can be lessened by limiting what your dog sees. If he’s in a fenced yard, use solid wood instead of chain fencing. Indoors, limit access to windows and doors or cover them with an opaque film.
Personally, I just try to say "quiet" in a calm but firm voice and I do not limit what my dog sees too much, but if your dog is outdoors and you have a busy neighbourhood this can be of great help! Do you have problems with excessive barking?