You guys keep assuming you fill a moat with liquid... psh. YOU FILL MOATS WITH ZOMBIES IDJITS!
Seriously though, since not every embark has access to zombies... : ( you leave the moat dry. As weird as it sounds, a dry moat is safer than a non-dry moat due to swimming invaders (trolls and goblins riding crocs). As has been said, just dig your moat down into the first stone layer and make it a few tiles wide. You can also put a few "dodge traps" along one-tile wide constructed floors to "encourage" goblins jumping into your moat. I then usually put a single path up (on hte opposite side naturally) and then line that with traps. You could also double your moat as a drowning trap, but you'll want an extended bridge to cover up the top of it for this. Swimmers will still drown if there isn't an empty tile over the water.
Also, from ancedotal evidence here on the forums, it -is- possible to make a wall so high a novice climber falls off from exhaustion. This wall needs to be over 20z-levels though. Some guy was digging an outdoor quarry and noticed a rash of injured miners. They were climbing the 20+ level wall on one side of hte quarry instead of using the ramps on the other. The unskilled minors would usually fall a couple times, but they were regularly getting out of the pit. These weren't smoothed stone or even blocks, so maybe 5-10 of constructed blocks since they are harder to climb. It also looks like a climber has to have a free hand to attempt climbing, so a goblin with a sword+shield should be unable to climb.
Also... why do people insist on leaving grazers on the surface? 10x10 is only what, 4 sheep with your trade depot and entrance stairs? Breach the caverns and immediatly seal them back up. Now dig a giant underground room and let your cows and what not graze on cave moss from the security of your fort. They can't tell the difference.
That being said, I still make a courtyard, but it's mostly for aesthetics. I also use bridges at first to make easy roofs. Also, keep in mind that constructed fortifications lack a floor over them like carved fortifications do. Thus, if you use fortifications but don't extend your ceiling over them, you are creating "gaps" for flyers. Otherwise, hanging fortifications (built walls that are carved) with a ceiling over the courtyard will protect against flyers and climbers.