Functional thin film comprises multiple layers of inflexible functional molecules and multiple layers of ionic polymer molecules (polymer ions) attached to a solid substrate. Also claimed is the production of such a film by alternately dipping an electrically charged substrate into: (a) a solution of ionic polymer and functional molecules having a net charge opposite to that of the substrate, and (b) an ionic polymer solution having a net charge opposite to that of the solution of (a).