From medieval Cairo to modern Masdar City: lessons learned through a comparative study