Template based GUI framework