I think you have to look at your particular situation as to what you want/should get. Like greybeard said, a wireless or wired containment system will keep your dog in, but not other dogs out. I did what he did, fenced in part of my yard with chain link, it is actually pretty easy to install, just make sure you give yourself some room for hinges and the flip up handle latches wherever you want a gate (learned that the hard way).
Instead of always putting my shock collar on, my wife found a company called Whistle. It works with a smartphone and you can set up the perimeter somewhat however you want it (not totally customizable if you have an irregular shaped yard like I do). It will not shock the dog, or beep when it leaves the perimeter, but you will get a notification on your phone that the dog is leaving the area and it even shows you where the dog is (uses GPS). There is a monthly fee however. Works for me though because I also have a pretty good sized property and some of it has trees. I don't mind my dogs going in the trees where I can't see them, but I do not want them to go past the trees. So I set the boundary along the trees and if they get close or leave I get an alert. Also, we can set it up on multiple phones so I have it, my wife has it, and both our kids have it. The only problem with that is when you leave at 5 am to go hunting and forget to take it off...your wife starts getting alerts every minute or so telling her that the dog is out of the boundary! Does not make for a happy wife who thought she was getting to sleep in on a Saturday...