For the Mideast, a code for rising democracies