I don't mean to disturb the flow of discussion, which is very knowledgeable but with very little knowledge i have, i would say,
That Ghazwa Uhad was a definite lesson to Ummah, not to be careless and leave windows open for attacks. If prophet's life is a guideline, then it is one very important line. The down falls of all previous muslim regimes from Ummaids, Abbasites, Spain, moguls and to Iraq / Afghanistan are due to this slack. Its not God's decision, its human fault.
The Shahadat of three Caliphs should also be taken as a lesson to be careful,. ( Quran: During prayer time, when in war, one person to guard another one,)
Dog eats dog is not a commendable act, but thats how nature works. Thats why you prepare for worst. Nature has given all necessary tools to all living beings to defend themselves. We should not worry about what will happen to aggressor, thats next bigger aggressor's job. We shoud worry about ourself.
Quran says ( Ayet.?) " Keep your horses ready". .
One good job, Pakistan did was that it went Nuclear, and now it became a war deterrent against India. In this case, they followed a Quranic command to be ready, that helped.
(urdu Masal). Jo soya, wo khoya. (you sleep, you loose).