In our current neighborhood, all dogs are inside when their owners are at work.
But when I was growing up, dog-owning families had fenced yards with doghouses and the dogs were out in the yard while nobody was home. Our Great Dane lived this way, and was (mostly) fine. She escaped twice, but was easily found (at 100+ pounds, and prone to run towards people rather than away from people, ha ha). When we came home from school/work, then she was inside with us.
Anyway I agree...if outside, you probably need a more secure arrangement than just fence. Dogs can go over, or dig under, if they are determined enough. And, schoolkids on their way home used to put their hands over our fence to pet our Dane. She loved it, would stand up on her hind legs with her tail wagging like crazy. But with some dogs, that might be dangerous or not OK...you don't want a kid to get bitten! My husband's brother was bitten when petting an Akita over a fence, and he is afraid of dogs to this day.