Dubai is not for everyone. The glittering metropolis, which erupts out of the desert, captures much that is good and bad about humanity in a few square miles.

On the good side, this extraordinary trading hub, reveals what human ambition can achieve. As it waves its two diamond-encrusted, air-conditioned fingers to Mother Nature, a city where none should be, Dubai stands testament to what can be done through sheer force of will and extraordinary urban vision.

On the other hand, Dubai’s legions of mostly Asian labourers, who toil away under the searing heat, remind us again of the world’s unacceptable inequalities and how – irrespective of the huge strides made in recent years – the lottery of location or the accident of birth, dictate our time on this Earth. The city’s success is partly a product of deeply problematic bonded labour.

In the next decade, for the first time in human history, more people are likely to be born in cities than the countryside. This has profound implications for society, politics and human development.

Prior to 1600, it’s estimated that the share of the world population living in urban settings was lower than 5 per cent. By 1800, this share had reached 7 per cent; and by 1900, 16 per cent. Until very recently, only developed countries in Europe, North America, Japan and Australia had majority urban populations. This has changed rapidly in the past few years.

In 1960, there were twice as many people in the world living in rural settings (two billion) versus urban (one billion). Over the second half of the 20th century, this gap closed via rapid growth in urban areas.

In 2007, rural and urban populations were roughly equal in size – both at 3.33 billion people. Since 2007, the urban population has continued to increase rapidly, while the rural population has grown only marginally. In 2016, it’s estimated that four billion people lived in urban areas, and 3.4 billion in rural.

There is a strong relationship between urbanisation and income: as countries get richer, they tend to become more urbanised.

The most striking global demographic phenomenon is the rise in the number of “megacities”. Beijing in 1950, for example, had a population of 1.7 million. By 2015, this was more than 10 times higher, at more than 18 million.

By 2035, it’s expected this will increase further to 25 million. Dhaka, the capital of Bangladesh, increased from less than half a million in 1950 to almost 18 million in 2015 (and is projected to reach 31 million by 2030). Most of the world’s densest cities are in developing countries.

Why is this happening?

Personal act

I like to think about the act of moving from the countryside to the city as a transformative personal act. People who want to invent a new life beyond what has been stipulated by family and tradition of circumstance, tend to move. Moving is an act of individualism.

From this stem all sorts of other expectations, ambitions and dreams. Although moving to the city is often seen as an economic decision, to make more money or for better prospects, I am not sure that economics captures or does justice to the human urge to transform yourself.

Maybe it’s better to see that moving is about much more than the lure of potential wealth; it is the lure of participation in modernity. Cities are where modernity happens and places that allow people to unshackle themselves from the restrictions of the past and imagine a future.

In a sense a great city is not just a place, it is an idea and underpinning that idea is freedom. It has ever been thus. This explains why in the era of Edna O’Brien’s Country Girls, hundreds of thousands of Irish people fled the countryside. It wasn’t just about money; it was about personal liberation and fear of suffocation.

The same is now happening across huge swathes of the globe. Driving all this is communication, technology and the internet.

Cities live or die by how they deal with the expectations of these new citizens, keen not just to make money but to make their mark. This goes for the Irish professionals sweating on treadmills at air conditioned gyms in Dubai Marina and for the Pakistani labourers toiling in the searing heat outside.

Both, in very different ways, are living out experiences that began as acts of personal transformation.

When a city becomes a magnet for migrants, as Dublin is now in a way that it wasn’t before, the management of that city becomes even more crucial. An expanding city outgrows its infrastructure in the same way that a teenager outgrows his runners.

Therefore, a growing city has to keep building train lines, metros, apartments, schools, hospitals and public parks. It never stops, because the city is a living organism.

This is why cities need directly elected mayors with executive – not legislative – powers. The city throws up all sorts of problems, such as traffic, housing and sewerage. These don’t demand legislation but solutions.

Therefore the executive has to be close to the problem. Someone has to be thinking of the sewers when they are brushing their teeth in the morning. This demands a fixer, a mayor with whom the buck stops every day, not just every four years. Fixing things doesn’t always make you popular; it means smashing a few eggs to make the omelette, but that is the cost of progress.

Globally, urbanisation is an inexorable force. In Ireland, this means that our cities will need better management in the years ahead, directly elected mayors with tax-raising, executive powers and large city budgets are the way forward.

Otherwise the city will be strangled by its own managerial incompetence. The idea will be smothered, and the dream will die.