Now, some critics might take exception to Joshua telling the sun to "stand still" - after all, we all know that it is the earth that is moving, not the sun, right? Well, I wonder if those same people watch the sunRISE and the sunSET or if perhaps they watch the "earth spinning in an eastern direction" each morning and evening. The Bible is jammed full of expressions that follow the habitual linguistic pattern of humanity; not strictly scientific… but easily understood. Example: how can God's eyes roam the earth if He is a spirit and doesn't even possess "eyes" in the sense that we do (Luke 24:39, John 4:24, I Timothy 1:17 & II Chronicles 16:9)? Again, the meaning is clearer through the use of an anthropomorphism than it would have been through any attempt at technical vocabulary exactitude.
Anyway, the focus in this chapter should be the willingness of God to defend His people. Despite the fact that Israel had messed up 2 times in a row (with Ai and Gibeon), God utilized the circumstances He had at hand to promote His overall plan for conquest. The early part of Joshua 10 shows how God brought the nation of Israel into the battlefield against the Amorites ... the very group they were there to fight anyway.