The following are just some practices that I employ. Its just one way and I don't claim its the best.
Surface: Typically, as mentioned, you try to make your fortress entrance defensible and able to be locked down. Having a central entry way for your ramps with with a draw bridge and either surrounded by walls and a roof or into the side of a hill is ideal. Around that you typically want to have an outer wall. How far out is up to you but you want enough distance to allow you some surface activity up there if you need while being protected from the outer world. You could make an outer wall up to the map edge if you really wanted. You want enough room between your entrance and the map so that you can shut the draw bridge if need be as you will need to account the amount of time it will take a dwarf to go from wherever to pull the switch and the time for the bridge to go up as its not instantaneous. Outside the first set of walls surrounding my surface courtyard I create a moat. Maybe 4 or 5 tiles wide and 2 or 3 z levels deep. Deeper is more dramatic although it cuts into your sub surface fortress levels. Technically with a moat you just have to make sure that if it has water in it and it freezes your enemies can't cross it still. I make the moat wide so that my marksdwarves have a good angle on invaders because I like to have them a level or two above ground level and the distance prevents invaders from being able to find shelter right up against the wall.
Entry way: Leave a decent sized entry way to allow for traps or whatever fun you want to grant unwelcome visitors like ballistas and what not or drowning chambers. Again, I try to leave room between the entry way and the first important chamber to allow time for switches to be thrown in case something gets in there, say a flier that bypasses your first wall and sneaks in through the main entry.
The central hub area: At the end of this path I have a large room with the trade depot in it. You could in theory put the depot closer to your workshops in in the midst of your workshops and storerooms to minimize hauling time. That might even be better. If you want to have to option to drown the traders in water or magma you may wish to have it be off to the side somewhere. Regardless, I recommend having it in the rock layers. The traders have come maybe hundreds of kilometres and a few extra layers of ramps won't kill them. :p
Off the central hub I tend to have the following areas, all of which have a drawbridge to shut them off from the centre hub if need be:
1) The military barracks: You want it near the entrance and near the hub, or at least I do. Try to store all your weapons/armour in this area as well as your training rooms. This area need not be very deep or large although it depends on how large of a military you want I guess.
2) The farming and food production zones: These tend to be near the surface where the soil layers tend to be. Again, even though these areas may be above the central hub, they are only attached through the hub room and also to the dining hall, but with a draw bridge there. Areas closer to the dining hall should have food stores and further away should be farm plots. I try to monopolize the soil/clay layers with the farming layer and try to stick everything else underneath it in the rock layers, ideally. Again, I like being able to shut it down if necessary. You never know with this game. Don't waste that soil space with other crap you could better place in rocky layers. You can also make pastures and underground tree farms in clay/soil layers.
3) The dining hall: Technically I rarely attach this directly to the hub but somewhere between the food supplies and the sleeping quarters. Try to get it into bedrock so you can smooth and carve all the stone in there. I like it to be between the living areas, and the farming/food production areas to minimize travel time. Try to make it a large enough size to accommodate the future size of your fortress. I like to have statues in the walls and everything carved.
4) The switch room: You want a room (and leave room around it for a bit of expansion) for important switches that will be near a heavily trafficked area of your fort (often the dining hall. In this room you'll want to stick all you're super important switches that are time sensitive like your main drawbridges and not switches for mundane uncritical things. For those switches, I try to keep them as close as possible to whatever they activate in part so I remember what they operate. If a huge beast is bearing down on you, you want that drawbridge flipped fast.
5) The workshop area: I make a passage to a shaft where all the workshops and store rooms are. I try to keep this very close to the depot room to minimize hauling. This area has a ramp/stairwell shaft as many layers deep as necessary and tends to be under the farming layer and in rock. This can be one of the larger areas of the fort. It probably will be bigger than the living spaces.
6) Living space: This is where all my dwarves' rooms go. I try to create a cistern with wells for a water source with wells nearby so dwarves can clean themselves and drink. I like having them in the rock layers. With living spaces you want to think vertically as well.
7) Shafts to the nether regions: I like having these off a hallway from the hub or a hall way off the workshops. Its important to me that if something nasty invades from below that it have a long way to go and be able to be shut off without allowing it to run through the living quarters or the workshop areas so I keep it separated. The entrance way to each cavern also must be able to be shut down with a drawbridge in case of emergencies.
Other stuff:
-A hospital, often near the water source as doctors need water to clean wounds along with the all important soap.
-An execution shaft, as I've illustrated here:
http://pietert.blogspot.ca/2012/05/dwarven-execution-shaft.html Basically, a big deep shaft which lets gravity kill your caged prisoners in. Ask if you have more questions.
-You'll need a prison eventually, preferably in a rock layer near the food stores if possible so its easier to keep the food in the prison stocked and you can carve and decorate the prison. Yes, its supposed to be a prison I know but just trust me.
-Other fun stuff like magma forges.
-The cistern as mentioned, its just useful to have one. Make sure you can drain it and refill it if necessary so if something falls in you can retrieve it. How you get the water in can be a fun engineering challenge.
In general, you want to be able to shut down certain areas of the fort down. You got something you can't handle romping around in the workshops? Close it off till you can deal with it. In my fortresses and most vulnerable areas tending to be the living areas and food production areas. Remember doors are more useful for controlling where your own dwarves go and (draw)bridges for when you want nothing to pass through. You want your fortress to have a bunch of choke points as that is way more easy to defend.
Edit: I forgot one thing. Every fortress needs a crypt/catacomb. With necromancers running around in the newer releases these chambers should be possibly entered through the main fort somewhere and also be able to be locked down in case of emergencies. Defending them with a few traps may be wise too.