Yes this is a homework question (Why was Morocco colonized but Turkey was able to resist it) but I did my research and I'm pretty stumped.
My reason was going to be that Turkey had a strong nationalist sentiment that Morocco lacked. From what I have read, Moroccans were really mixed when faced with Western influences. The Ulama were pretty radical and there were violent rebellions but the upper classes tended to be pretty Western and liked the new consumer culture.
Can anyone help me out or point me to some good articles comparing the two?
3 things kiddo:
Morocco was never part of the Ottoman Empire.
Syria was only "colonized" after Ottoman collapse in WWI. The country basically became part of the spoils of war distributed amongst the victors - in this case, France.
After Ottoman collapse, the victors of WWI attempted to divide Anatolia into numerous different spheres. Thus, according to the Treaty of Sevres, the straits would come under international control, Greece would get Thrace and the Aegean coast of Anatolia, Armenia would get a large chunk of eastern Anatolia, France would the get southeastern Anatolia, and Italy would get south-central Anatolia (roughly around the cities of Antalya, Konya, and Afyon). The Kurds would (maybe) get a state - this was left up in the air. The Turks would be left with a rump state, despite being the demographic majority in most of Anatolia and Thrace. Naturally, the some Turks found this treaty unfair and there was a nationalist war for independence. The Turkish nationalists won and forced the allies to accept a new treaty, the Treaty of Lausanne. So, Turkey was able to avoid colonization because Turkish nationalists, largely Ottoman military men, fought against the terms that would enable the partition of what remained of the Ottoman Empire.