Getting your application architecture right the first time can save you major headaches further down the road.