The preparation of layers by electrospraying and electrophoresis