Base Building 101
The walls are the first part in the construction of your base. If you surround the entire base (or at least where your settlers sleep) with a trench and make 1 entry focusing on your wall later, all the zombies will arrive at that entrance. At the entrance you can put many archers / guards to kill them before they can enter. If you do not make an entrance in the wall, then your colony will enter "siege mode".
LLas paredes son la primera parte en la construcción de tu base. Si rodeas toda la base (o al menos donde duermen tus colonos) con una zanja y haces 1 entrada centrándote en tu pared más tarde, todos los zombis llegarán a esa entrada. En la entrada puedes poner muchos arqueros / guardias para matarlos antes de que puedan entrar. Si no haces una entrada en la pared, entonces tu colonia entrará en "modo de asedio".
TowersTowers help give your walls shape if you make them stick out of your walls. They can also increase your archer's range. This gives you more breathing room when dealing with hordes of zombies.
Spiral (or gauntlet)
A single spiral leading to an entrance 338 blocks long will make the zombies only have one path and die before they can reach the colonists. This is based on zombies moving 1.25 blocks per second and night lasting 4 minutes 30 seconds. This strategy means you will not need colonists assigned as archer's. Note: Spiral can't be too far from banner where the zombies can spawn inside the spiral. This can also be combined with a tower strategy with archers to pick off zombies to reduce the necessary spiral size. NOTE: This does not work now that zombies do not die when the sun comes up.
One of the easiest ways to build such a spiral is to dig a 2 block deep, 1 block wide trench, forming a 67 by 67 square. At any point at the square have the entrance and exit into the trench, but separate them so Zombies will have to walk through the entire trench. Place your Banner right at the exit of the trench. Maths: 67*4+75=343>338.
Types of bases
These aren't the only types of bases you can build, they're just examples.
A compound is where everything is inside the walls. All the farms are around the walls.
A village has little to no walls and each farm plot has a house. Recommended only when the zombies are turned off for that world.
The way your beds and accommodations are laid out.
Accommodations are vertical resulting in a relatively small footprint and efficient storage
Underground living spaces are extremely efficient as no building is neccessary (only digging) and only one entrance (hole) is needed to be defended.