I'm not an advocate of electric or "invisible" fences. They do not protect small pups from predators coming into the yard. A chihuahua in my town was out in his yard protected only by an invisible fence when 2 roaming dogs came along and tore him to pieces.
Also, some dogs figure out quickly that the zap only lasts a second. Once they are on the outside of the fence, they don't like to risk the zap to get back in.
Third, trainer Victoria Stilwell has said on her show that there is medical evidence that the shock of devices like invisible fences has detrimental effects on the heart and nervous system. Most fences give off a "warning" sound before the shock, but I know my guys would go for the full shock if they saw something they wanted to go after.
Many people have invisible fences in my neighborhood and there is only 1 that I really trust. The others have become lax about putting the collars on the dogs, changing the batteries, checking the systems periodically.