I tend to use an ambush tower: An archer nest at least two stories tall, with bolt storage underneath the floor, that faces the depot (three squares away) and has it's back to the entrance that the invaders would be using.
z0 z1 z2
O=====O++++++++ +++++++
|T...TO+++O===O + + O===O O===O
|.....++++|+++| + |+++| #+++|
D..T..++++|+X+| |+X+| #+>+|
|.....++++|+++| + |+++| #+++|
|T...TO+++O===O + + O===O O===O
O=====O++++++++ +++++++
It forces invaders into a fishbowl (of sorts). Archers stationed on z2 are protected from ranged attacks by marksgoblins as they come in, allowing the marksdwarves to get off critical first shots before coming under fire. The two z-level difference between the attackers and defenders gives the archers in the towers a good level of protection through the fortifications (in fact I've never seen a dwarf hit at that range) but is so close that it's virtually impossible for a marksdwarf, even a relatively inexperienced one, to miss. Unless they bring trolls or you're facing a megabeast your door is safe, and any goblins retreating from the depot have to pass closer to the archers to get away. Generally this design breaks sieges as soon as the siege leader passes into the firing arc of the tower, and it only requires about four marksdwarves (two squads of two, alternating duty) to man it (though three squads of three works better).
-DB