Every dog should be crate trained. A crate isn't a prison but rather a private and secure place for your dog. When crate trained properly your dog with think of the crate as his safe haven. Dogs will happily go in their crates during stressful situations (strangers or a large group of people, storms, or fireworks).
The crate is your dog's modern den. You should always leave the door open for him so that he can go in whenever he wants to. When you first introduce your dog to the crate it should be a very positive experience. Throw a few treats into the back of the crate and just let your dog walk in and eat them and give him lots of praise. Don't close him in just yet - just toss in a treat and let him walk in and come back out if he wants to a few times. Remember to give lots of praise for going in his crate. You can also add a cue like "go in your crate" when you toss in the treat to start teaching him to go in on command.
The next step would be to get something that will take a while for him to eat. A Kong filled with goodies or an edible bone works well for this. Whatever you use should be something that your dog loves. Put it in the crate and when he goes in close the door. After he finishes it you should let him out. You should also start feeding him all of his meals in his crate.
Over time you need to gradually ask him to stay in there longer and longer. If he cries you can't let him out or give him ANY attention. You can leave the room and you have to completely ignore him until he is quiet and then you should let him out. He may cry at first because he wants your attention - it isn't because he doesn't like his crate. Never let him out while he is crying even if the time is up. You have to wait for him to be quiet or he will make the connection that whining gets me what I want. You should also crate him whenever no one is home. Make sure he will be comfortable in there. He will need something to chew on and you can put some bedding down as long as you are sure that he won't tear it up. He will need to spend time in his crate both when people are around and when he is alone.
Once he seems comfortable with his crate and the new routine you can mix it up. He doesn't have to spend as much time in his crate. He can be loose in the house again when you leave for work. You should still give him his chew bones in his crate and feed him in there every once in a while. Periodically you should crate him when you leave the house too.
On a related note, dogs should also be safely confined in a crate when driving and traveling. Being crated not only prevents them from distracting you but also protects them in the event of an accident. Keep in mind that a loose dog may prevent rescuers from helping. Your dog won't understand that the strange intruders are trying to help and if you or your dog are injured he may become defensive. Another thing to keep in mind is that if your dog were to get loose and is then rescued by a shelter or animal control your dog will be crated. Wouldn't it be nice for both the rescuer and your dog if he had already been crate trained?