Electromagnetic Principles of Integrated Optics