Many housing developments have covenants against fences. That's a problem when you have a dog you want to keep confined. Tying a dog out on a line, except for brief periods, isn't a humane option.
Never fear, technology is here, and the electic fence is the answer. A wire is buried around the perimeter of the property, where a fence would normally be. The dog wears a collar, which serves as a receiver. If he tries to cross the invisible fence, he recieves an electric shock. The dog figures this out very quickly and stays in the yard, well away from the fence.
Sounds too good to be true, and it is. In the heat of chasing a cat, a dog, or another animal, dogs high in prey with a high discomfort threshold sometimes don't honor the fence and break through. The dog is then faced with a dilemma: Now that his adrenaline has worn off, he can't get back into the fenced area of fear of getting shocked. Another potential drawback is that when the fence works as it's intended to, it keeps your dog in the yard, but it doesn't keep other dogs or children out. It's no protection against bullies coming into your yard and picking on your dog, and it won't protect a female in season from unwanted suitors. Having an electic fence may make your dog fearful of other dogs or aggressive toward them. Keep an eye on him when he's out there, and don't leave him for prolonged periods without supervision.
This is an excerpt from "Dog Training for Dummies"