Saleen gave you some really excellent advice. If the barking is a serious behavioral problem for you, as it seems to be, I would definitely work with getting your dogs to ignore the distractions altogether through R+, instead of temporary ways to shut them up (like sonic things, squirt bottles, collar pops, etc). That's really the most rewarding way to do it, in my opinion. It takes a while, but is so great in the long run.
However, I don't find sonic noises or squirt bottles to be all that bad for occasional use to get your dog's attention away from the distraction. At the daycare I work at, we use a squirt bottle on dogs who bark all the time, and it works like a charm. I would NEVER use it as a permanent solution though. It simply does not solve the behavior, just puts it on pause.
Same with the sonic things, same with the loud noises, etc. They may work at the time, but it really is best to work with your dog to really get to the root of the problem. At work, I can't do this, as they are not my dogs, and I can't train with them, but if they WERE my dogs, I know a spray bottle would not be my main course of action. I think using them as a tool to control the dog to get it to focus on YOU for training is okay, still not what I would love to do, but some dogs do need that water in the face to "wake them up" a bit to get them to listen to you.
I also like Marian's advice of praising the dog for barking once or twice for alerting, but only a bark or two. I do this with Desmond, who has recently discovered that barking at people is fun. Ugh, it gets on my nerves!! But if he barks twice then stops, he gets praise for controlling himself. If he barks territorially in an excessive manner, I move him away from the distraction (the door), and have him sit and focus on me.