Did you know a lot of dogs require just as much discipline as they do affection? We have several dogs that come in who have had way to much affection with not near enough discipline. Don't get us wrong, we want you to love on your dog. We want your dog to feel secure and safe. We also want your dog to have discipline.
Think of it this way: Raising a child is difficult, probably the hardest job on the planet. You want your child to know you love them more than anything in this world but you also want them to know you mean business. You teach them to be respectful and obedient. If they break a glass, lie, or get bad grades, they receive a consequence for their actions. You give them just as much love as you do discipline.
In this aspect, dogs are the same way. The require just as much discipline as they do affection. Don't "love" on your dog by saying "it's okay" while petting them on the head when they bark at the door, give them a structured no and make them go lay down. When you are working with your dog, make sure he follows through with every command.
Giving equal discipline and affection creates a balanced mental environment for your dog. This helps keep unwanted behaviors away.