Anisotropy in magnetic thin films--from ab-initio calculation to model systems