This - Turrets beat walls all to hell.
Raiders spawn anywhere within your base (roughly, the build area), so a large perimeter wall is a waste of both time and resources. A better defensive strategy is centrally located farms with elevated platforms above them for housing, workstations, etc, with liberal use of Turrets/Guard Posts to cover the farms/water and the entrance to your main building(s). The less stuff you have on the ground, the more field of fire your Turrets have.
Raising platforms is easy once you work out how to stack Foundation pieces (Wood Floor - Foundation) to make concrete pillars (not neccessary, but I'm a little pedantic about my buildings not floating in mid-air). Get your Foundations right, and level, you can build pretty much anything you want in the air, over as much area as you have mats for.
If you're running low on supplies for Turrets, there's a bit of a cheap 'n' nasty supply run you can do - from Sanctuary, head east, hit the Robotics Repair Depot for some oil and circuits, then Downed Flight 1981 for steel (from weapons, plus always hit 1981 on supply runs - locks, an encounter spawn location, the gunner camp on the overpass - it's just a gold mine for everything) and finally the General Atomics Galleria for more Turret-friendly mats (and, depending on your course of action upon arrival, [SPOILER]you might have a bunch of robot corpses to loot for even more, plus Cores. It's a big fight, tho - be prepared).
Not that you need many Turrets - with the set-up described above, many elevated Turrets are covering a relatively small area, and will all have converging fields of fire. Not much can survive focused-fire from 8 HMG Turrets, and that's not even counting the Guards. All you'll need to do in Raids is show up and get a good seat for the show.
Anyway, I've gone on way too long. The good news is, since walls are irrelevant anyway, go ahead and use the Junk Fences.