As a trainer, I never discourage dogs from barking to alert you someone is at the door. In fact, I think alert-barking is useful because it lets the person at the door know you have a dog (which could be discouraging if an uninvited knocker has ill intentions). However, some dogs become so excited by the doorbell that it is extremely difficult to calm them, much less get them to hold a sit-stay so you can safely let your guests in.