At a minimum, you should have two "blast" doors between you and the outside that can be closed in an emergency to seal off a portion of the fortress. If you don't like the odds outside, close the doors, hunker down, build slabs for Urist McSlowPoke who didn't make it inside in time and work on your underground constructions / farms / etc.
I tend to design my fortress in layers. In order to get in to the main fort you have to:
- get past at least 5-10 tiles filled with "dodge-this" weapon traps using cruddy weapons, training spears, or spiked wooden balls. These tiles are 1Z above the surrounding terrain and if you fall off, you have to go back some. Later on, I turn this into a deadly maze that sucks sieges in, forces them to fall off into a maze that is filled with really nasty slice-n-dice traps. Plus I add fortifications up on the wall overlooking this area so my marksdwarves can shoot at the enemy who are trying to get past the dodge-this trap section.
- get past a few cage traps
- get past a retracting drawbridge (the outer wall of the keep)
- get past chained war dogs and another line of cage traps
- pass by my barrack training rooms, and archery ranges
- get past another retracting drawbridge (the inner door), also guarded with a few more cage traps and chained war dogs
At which point, they're at the Trade Depot. And I do have one more set of retracting drawbridge doors after that to seal off the trade depot. But if anything makes it in this far, without some doors being slammed shut I'd be in a world of hurt. (My main fortress is *extremely* inter-connected with lots of main stairwells and a warren of quarters, workshops and storage.)