Cooking the apples before putting the filling in a pie shell is my personal preference.  There are lots of great apple pie recipes where you pile the apples into the crust, sprinkle a little sugar and dot the top with cubes of butter.  By cooking the apples before, I can evenly distribute the flavors and ensure that I added enough cornstarch for the perfect filling consistency.