Cream first 5 ingredients in large bowl with electric mixer or stand-up mixer. In a separate bowl, combine flour, cinnamon, baking soda, and baking powder. At low speed, add dry ingredients to creamed mixture. Fold in chopped apples.
Spray a 9x13 baking pan. Spread mixture in pan and bake 350 degrees for 45 minutes (my oven tends to cook things very quickly and only took 35 minutes). Remove from oven and put on a cooling rack. Immediately top with 1/2 c. finely chopped walnuts or pecans (optional).
To make the glaze, bring to boil all ingredients except for vanilla. Once everything comes to a boil, turn down heat so it doesn't boil over. Cook for one minute then stir in vanilla.
Kara's note: if you only want nuts on half of the cake - put the glaze on first and then sprinkle the nuts on top. Otherwise, the glaze will carry them to the other side and non-nut eating people will be sad. Trust me on this one, I learned from experience once before!