Well I think it depends on the type of crab?
Most all crustaceans whole - in the shell, should be cooked live, exception being Shrimp.
Blue Crabs: hard to beat doing them Maryland Style...pretty much what RichH outlined but I would add rock salt to the seasoning blend and specify that you use Natty Boh
Dungeonous and most others: just steam. If serving Dungeonous its often served with sour dough bread, dipping it in the juice reatin in the shell after you open it up, yumm!
Always cook live, the only crab I can think of that you kill/clean before you cook would be soft shell blue crabs, because you eat the entire crab (best if simply pan fried IMO). Using a pair of scissors, first remove the face then lightly squeeze, Second lift each side of the top shell to remove the lungs/gills, then turn it over and remove the apron/flap with the intestine by pulling it out (most just cut the flap off, its better if you carefully pull the flap out and discard)