I ranked basic barracks high on the list only so that you can recruit town guards. Market From there, you can begin building military buildings if you need another city capable of cranking out units - by then this city should be growing and profitable.
Adjust accordingly based on the situation and the advice I gave above. All things equal, here's a rough priority guide. Buildings on your frontier bordering an aggressive enemy may require walls and barracks before you have the luxury of building up an economy - try to avoid that, but sometimes, it can't be helped. So, What Should I Build? I'm sure people want to hear exactly in what order they should build their buildings, but it's really going to depend on the circumstances.