One of the major similarities between political control of the Middle East and Africa was that between 1884 and 1920 they were European colonies. For example, much of Africa was partitioned in 1885 at the Berlin Conference between Britain, France, Germany, Spain, Portugal, Italy, and Belgium. The Middle East was controlled mostly by Britain and France. Africa became the target of colonization because of a few reasons: abundance of natural resources, potential new markets for factory goods (the industrial revolution has spread across all of Europe by this point so new goods are being created daily), strategic port locations at the Cape of Good Hope and the Suez Canal, and the "moral" need to westernize and Christianize Africans.
Another similarity was that soldiers in these regions were used as colonial troops in World War I. The French used their Senegalese soldiers both in Africa and on the front lines in Europe. British troops used their Middle Eastern soldiers in Iraq (as well as Indian and African soldiers) to help fight the Ottomans at the Suez Canal.
One large difference was that although a majority of Africa was colonized (the two exceptions are Liberia and Ethiopia), some Middle Eastern countries gained their independence when the Ottoman Empire fell- Iran and Saudi Arabia. After WWI, most European colonies were promised their independence from the Western European powers. Despite the promises, the issue was not addressed and all colonies remained possessions. While many African colonies used nonviolent protests and obtained independence by 1960, some Middle Eastern colonies staged revolts to forcefully remove their colonial aggressors (Egypt in 1922).