On my dps toons I have the following type of spam

Command /assist tank
Spell/Ability with longest cooldown
Spell/Ability with next longest cooldown
Spell/Ability keep going with cooldowns.
Spell/Ability with lowest cooldown at the end for spamming.

For my Tank its similar to the dps. Highest cooldown at top and work down.

I use these macros on key 2 and 3 of my bars. That way when i go to use my healer on 3 i dont stop spamming my dps while i'm pressing the heals.

healer macro

Spell/Ability Regen type spell (tank) Heal spells ask you who you want to target. Leave blank for whoever has aggro
Spell/Abillity Fast heal (tank)
Spell/Ability Big heal (tank)

And then on button 4 i have my aoes. Healer set for group heal and DPS are set for aoe dps.