Smart multiphase polymer coatings for the protection of materials