I use a double raising bridge over a gap for my depot. Inner gate stays closed, caravan comes in, outer gate closes, inner gate opens.
Also, using the trenching method, you can create a long causeway that you either trench or wall off to the edge of your map to your fortress gate. You can fortify a wall for archers by building fortifications that will allow you to safely fire into the causeway area.
My current fort has a surface entrance area that's about 28x28 with a Gate-Depot-Gate. Outside the depot is the elite barracks where ambushers and thieves are met with horrible death.
Arrayed around the surface are cage traps 5 with five spaces in between them for foiling ambushes.
Like this:
^ ^ ^
^ ^ ^ ^
^ ^ ^
It's pretty effective for catching most critters and spotting ambushes. Current biome is a savage cold broadleaf forest so I have lots of wood for cages and meat from training and domesticating giant birds. Hooray for 36 meat giant ravens!