Are CaOCl2 and Ca(OCl)2 same or different?
$\ce{CaOCl2}$ is a calcium chloride hypochlorite. There are two different types of anions: chloride $\ce{Cl-}$ and hypochlorite $\ce{ClO-}$. So its structure is:

$\ce{Ca(ClO)2}$ is a calcium hypochlorite (also called bleaching powder or bleach). There is only one type of anions: hypochlorites $\ce{ClO-}$. So its structure is: