Optimally, a police officer knows when to do both. If a cop is always nice, then he completely lacks the ability to apply violence and the threat thereof when it's necessary. He's completely useless. If a cop is always hard, then he lacks the ability to appropriately apply violence. and he'll interact with his community in a way that is counterproductive.
Police officers, like the law itself, should only be feared by people that are engaging in criminal behavior. Whenever the innocent start fearing or resenting the police, then there's a fundamental problem with the relationship between cops and the community they protect. As with any relationship, both parties are probably at fault to some degree, but the burden of bridging that gap falls largely to the police because they're professionals.
For example, one of my sister's classmates was recently beaten down and hospitalized by the Cambridge police. Apparently there were 4-5 officers subduing this kid when he was apprehended for wandering the streets while naked and confused (unclear if it was a mental health issue or drug use). Obviously, it's not okay to walk around naked and intoxicated, but he clearly didn't pose a serious threat to the cops. The police exhibited a gross lack of professionalism in their overzealous application of force, and they severely undermined the public's trust in local law enforcement.