If you want an AP and DDE, it would be better to purchase them both before you arrive.
APs may be purchased at any Guest Services desk (located at each Theme park and at DD - but not at the resorts). Once you have the AP you can call to order the DDE, but there will be a delay before you can actually get the card. If you order in advance, it may be picked up at one of the Guest Services locations at WDW.
I'd order both in advance. The DDE may be purchased over the phone using the AP voucher.
Enjoy!