I recommend the parenting books by Dr. James Dobson. He is explicitly Christian, and suggests corporal punishment, which cause many to consider him a troglodyte and reject his views. This is an error. His advice in not religious, and corporal punishment is not central to his methods and parenting philosophy.
I had a similar experience to yours with my daughter when she was young. She is very strong-willed, independent, and confident. She was a great kid, except with her parents! Dr. Dobson's methods helped us to gain control of her, and consequently allowed her to gain control of herself. She is now a senior in college and a motivated, self-disciplined, caring young woman of whom my wife and I are quite proud.
Dobson's book "The Strong Willed Child" helped us tremendously. I can't repeat it all here, but can go through the high points.
Parental Authority must be respected.
Defiance and disrespect must be eliminated and your commands must be followed promptly and without question. It all starts from this. Once you give the command, it must be obeyed or consequences are applied. Don't "count to 3", or ask "how many times do I have to tell you to ...?". When you tell Jimmy to do something, if he doesn't comply immediately, apply a consequence.
Don't Act from Anger
Correction and consequences must be applied calmly and without anger. Ideally, they are applied before you get angry, but if that ship has sailed ... take a moment and calm yourself before applying punishment.
It's about BEHAVIOR
Don't try and manage thoughts and feelings, but expect the child to manage actions and behaviors. Don't punish your child for being angry; punish your child for hitting, for cruel words, or for a disrespectful tone.
Remember, what you are really teaching your child is self-control.
Be Consistent and Predictable
The rules and expectations must be clear and known. When rules are broken or expectations not met, you must act quickly and consistently. The child should not be surprised when placed in the time out chair after yelling "NO", and it should happen every single time. Communicate with the child what the transgression was and what the consequence is.
All of this requires thought, discipline, and courage. You have to have standard consequences thought out in advance, particularly if you aren't going to use corporal punishment. Parents have to agree and act in support of one another. And parents have to be willing to sacrifice themselves.