Since the Whitham modulation theory was first proposed in 1965, it has been widely concerned because of its superiority in studying dispersive fluid dynamics and dealing with discontinuous initial value problems. In this paper, the Whitham modulation theory of the defocusing nonlinear Schrödinger equation is developed, and the classification and evolution of the solutions of discontinuous initial value problem are studied. Moreover, the dispersive shock wave region, the rarefaction wave region, the unmodulated wave region and the plateau region are distinguished. Particularly, the correctness of the results is verified by direct numerical simulation. Specifically, the solutions of 0-phase and 1-phase and their corresponding Whitham equations are derived by the finite gap integration method. Also the Whitham equation of genus <i>N </i>corresponding to the <i>N</i>-phase periodic wave solution is derived. The basic structures of rarefaction wave and dispersive shock wave are given, in which the boundaries of the regions are calculated in detail. The Riemann invariants and density distributions of dispersive fluids in each case are discussed. When the initial value is fixed as a special one, the vacuum point is considered and analyzed in detail. In addition, the oscillating front and the soliton front in the dispersive shock wave are considered. In fact, the Whitham modulation theory has many wonderful applications in real physics and engineering. The dam problem is investigated as a special Riemann problem, the piston problem of dispersive fluid is analyzed, and the novel undular bores are found.