This paper focuses on scatterometry problems arising in lithography production of periodic gratings. Namely, the paper introduces a theoretical and numerical-modeling-oriented approach to scatterometry problems and discusses its capabilities. The approach allows for reliable detection of deviations in gratings' critical dimensions (CDs) during the manufacturing process. The core of the approach is the one-to-one correspondence between the electromagnetic (EM) characteristics and the geometric/material properties of gratings. The approach is based on highly accurate solutions of initial boundary-value problems describing EM waves' interaction on periodic gratings. The advantage of the approach is the ability to perform simultaneously and interactively both in frequency and time domains under conditions of possible resonant scattering of EM waves by infinite or finite gratings. This allows a detection of CDs for a wide range of gratings, and, thus is beneficial for the applied scatterometry.