The generalized dynamical theory of X-ray diffraction by imperfect single crystals is extended to characterize structure imperfections of real single crystals with complex basis and similar crystalline films with inhomogeneous strain fields. The influence of various defects (intrinsic and extrinsic point defects, nanoclusters, and microdefects), simultaneously presented in such structures, on changing both average and fluctuating strain fields as well as structure factors are taken into account. The analytical expressions connecting immediately the coherent and diffuse components of the scattering intensity with statistical characteristics of these defects are obtained. Thus, the self-consistent description of the coherent and diffuse dynamical diffraction intensity components is provided. Some examples of the application of the developed theoretical model to treat rocking curves measured from various garnet structures by using high-resolution double-crystal X-ray diffractometer are reviewed. Possibilities for the quantitative characterization of structural defects and strain profiles in the as-grown and ion-implanted garnet single crystals and yttrium iron garnet films are demonstrated.The self-consistent dynamical description of coherent and diffuse scattering intensities from imperfect crystal structures with inhomogeneous strain fields and randomly distributed defects make it possible to determine the parameters of strain profiles and statistical characteristics of defects by analytical treating the coherent and diffuse components of rocking curves measured by the high-resolution double-crystal X-ray diffractometer with widely open detector window.