Even by counting ourselves out, it is clear that the synapsids dominate the current era. There is something subjective about this dominance thing, yet we seem to instinctively understand it. We may attempt objective measures such as occupying the top nodes of the food-web network or being the largest mass forms of the faunal population. In any case the synapsids have not been always dominant. The Mesozoic largely belonged to the archosaurs, especially the dinosaurs. But prior to that in the Permian the synapsids had their first phase of dominance. Thus, it looks like the archosaurian ascent was sandwiched between two phases of synapsid domination.
It is clear that we do not understand these event fully, and new surprises are always round the corner. Yet we may chalk out the following broad trends: The rise of the amniote egg seems to have clearly opened the field for world dominance. The two major amniote lineages the synapsids and the sauropsids staked a claim for dominance starting in the Permian. The synapsids took the lead with several major lineage rising to dominate the ecosystem in the Permian: “Pelycosaurs”, Dinocephalians, Gorgonopsians, Therocephalians and anomodonts like Suminia that acquired the ability to process plant food by chewing. This spawned a great radiation of synapsids that continued to remain on top till the early Triassic, with forms like Cynognathus, after sneaking past the great Permian extinction. By the mid-Triassic their fortunes started fading with the rise of the archosauromorphs amongst the sauropsid amniotes. Amongst them, first the crocodile-line and then the dinosaur-line rose to the top of the Mesozoic ecosystems with the synapsids declining to herbivorous and insectivorous niches and reducing in size further and further. Throughout the Mesozoic the surviving synapsids, the mammaliforms, were believed to have been marginal.
Then the great Cretaceous extinction event put an end to the dominance of the dinosaurs, with the only surviving dinosaurs being the birds. For a brief period, in the recovery phase after the Cretaceous extinction the archosaurs made an attempt to re-assert their dominant position. The giant diartrymoid birds in the Northern continents and the Phorusrhacoids in South America made an attempt to review the old dinosaurian glories. The crocodile line to made a second attempt with terrestrial predatory forms emerging in many lineages like the sebecosuchians in South America, mekosuchians in the Pacific islands and the pristichampsines in the Northern continents. While these attempts of the birds and the crocodiles were considerably successful in the southern continents until very recently, they did not last too long in the North. The dominance shifted to the placental mammals, the main lineage of mammals that made it past the Cretaceous event. Of course only New Zealand largely remained the realm of the dinosaurs until recently. The dinosaurs still held the air — while bats acquired flight they had to do so at night when most birds were fast asleep. Thus, in all fairness we may say that while the placentals rule the world, the dinosaurs and other surviving archosauromorphs, the crocodiles and turtles were not doing too badly in the mammal dominated world. In fact until very recent events, including our presence, broke things ups they were fairly dominant in the south. So much so that there were no major mammalian predators during the avian dominance of South America, and in Australia the mammalian predatory presence was lesser than expected.
Similarly, how were the mammals doing when the dinosaurs ruled? Only recently are we getting evidence that they in fact were doing pretty well. We have fossils of a wide range of old mammaliforms from the Mid-Mesozoic now. We have Castorocauda lutrasimilis, a docodont mammaliform that had a tail like beaver and head more like an otter. This indicated that early in their Mesozoic evolution itself the mammaliforms had acquired a rather serious adaptation to the aquatic niche. Likewise, we have Volaticotherium a crown group mammal that is a sister group of the multituberculate, triconodont, eutheria+metatheria clade to the exclusion of the australosphenidan mammals like the platypus. This mammal appears to have been a glider, that had a patagium like a flying squirrel and represent the earliest synapsid invasion of the air that might have been coeval with Archaeopteryx, the earliest known aerial dinosaur. Then we have Fruitafossor, that appears to have specialized in eating colonial insects, possibly the early Mesozoic termites, suggesting that this high nutrition niche was already colonized by mammals. It also appears to belong the the radiation just prior to the multituberculate, triconodont, eutheria+metatheria clade. Then we even have Repenomamus a mid-sized predatory triconodont mammal that even hunted dinosaurs. Thus, we might say that just as the dinosaurs were not doing all that bad in mammalian era, radiating and occupying many niches, the mammals were also correspondingly doing pretty well in the dinosaurian era. To their credit the dinosaurs had to do all this in the Cenozoic with just two legs, having already lost their hands to the over-specialization of flight.