Nanostructured organic/hybrid materials and components in miniaturized optical and chemical sensors