Photonic crystals: operation principles and applications