well positioning will do you wonders, try making a massive moat, or wall around your fortress and have a small 4 square entrance area, fight your opponent here, back in 40d, days I used to exclusively make cross bow dwarfs. I think at one point I had 40 or 80 dwarfs in full plate with steel cross bows, and they would down a siege fast. Good equipment will go a long way too. Although peasants are less common then in 40d, one technique is to take any dwarf that does not arrive with a moodable skill and make him make one piece of armor, this increases the chances of a legendary armor smith. a small squad of 3-5 axe dwarfs in full steel have been known to take out mega beats with out so much as a scratch (and I have seen this in my own for)
back to the point at hand, out defense
I would do a two story tall wall triple thick wall (this allows helps get rid of all the pesky stone in your fortress), have the outer layer be fortifications that can be shot through and have xbow dwarfs there to help shoot at things.
imagine the entrance to a fortress from a flat surface, now dig one :Z level benith that, than put a stair well that goes up into the first level of the fort, so now invaders have to go benith, then up into the fort. floor out the upper level 3 tiles or so, then build fortifications on the 4th tile out, then put ammo stock piles on the 3 tile
ie
on top
|-----------------------------------|
|-----------------------------------|
|-----------------------------------|
:::::::::::::::::::::::::::::::::::::::::::
on bottom
**********FFFF**********
**********FFFF**********
**********FFFF**********
ect ect for about 10 tiles longs
where
- = ammo bin
| = outer wall
: = fortifications
* = an area enamy cant get to, (you can use walls or channels, as long as they cant get there
F = Floor