Beating your children to avoid other, possibly worse beatings, might seem to be necessary, but its not desirable.
Same goes for spanking. If you can get the behavior change without the violence (I disagree with Joe that hitting is not violence, its message is pain, fear and/or humiliation no matter the velocity or frequency) it would be best to avoid it.