application template patterns