Photodeposited functional thin films