First and foremost...be patient. You're son is entering what they call the terrible two's, and they call them that for a reason.
You said you aren't sure what his dad does with him at home..you need to talk to him about this. If he is parenting equally, then communication on how you raise your son is key. Not just now, but in the future.
If he asks for something he's capable of getting, or your busy..tell him to go get it or wait until youre done. But remember that kids this age dont have a lot of patience, so mommy has to. If he pitches a tantrum, ignore it and tell him you are going to ignore him. Then do..tantrums are a childs way of 1.getting attention, and 2. relieving stress.
When he's worn himself out, give him a hug, tell him that you love him, and then ask him again to get what he wants himself. Just make sure he is capable of doing what you're asking.
If he whines, tell him you don't hear whining..that you'll listen when he can ask like the big boy he is. Dont yell, dont fuss, just ignore the whining and keep reminding him that you'll help him when he speaks, not whines.
He'll eventually get the picture. Kids are habitual, and whatever gets them what they want is what they will continue to do. You must reteach him better ways of getting his wants taken care of.
Your husband must follow thru with this as well. So talk to him about it.
Warning: Whining and such is pretty normal at this age, and can take a while to stop.
As far as the slapping is concerned..when he hits, put him in his room or his crib...but only for a minute..he is too young to understand being left alone for long. Tell him that hitting is a no,no..and that it hurts mommy and makes her sad. When you go back and get him, make sure that you hug him and tell him you love him. If you are consistent he will figure out that every time he hits, he gets put in his room.
Good luck.