Functional nanostructured coatings via layer-by-layer self-assembly