Phase ordering in disordered and inhomogeneous systems