Dominating sets and connected dominating sets in dynamic graphs