split apptemplate and appframework