Barbarians are ideal for attacking, and Dwarves are ideal for defending a castle. But that's just my opinion.
I don't know about the Dwarves; they defend perfectly well even without a castle. Besides, there are several other factions with their own defensive advantages. Mages can easily destroy a catapult (three ranged units + a hero with Chaos magic), and Warlocks can force the enemy to retreat with powerful spells. There's no clear leader here.