Diffractive Optics and Nanophotonics