This is a TH5 farming base design, it is very effective to protect your resources. The Town Hall is placed outside the walls so the enemy can take it easy. That way you get a 11 hour shields which protects your resources.
The mortar is the center defense in this th5 farm layout, it will get all enemies. No matter from which side they attack. The wizard tower stands close to the town hall. If the enemy wants more of your village after they destroy your townhall, the wizard tower takes care of them! To counter this out, the clan castle is placed in the lower right. Attackers from this side will be facing your clan castle troops.
The collectors and other useless buildings for defense are placed outside the walls, they form a layer of protection for your defenses. While the barbarians and archers are attacking this buildings your cannons, archer towers and mortar can do their work.
You see that the air defense is placed outside the walls, this seems weak and is in fact. But at th5 you are rarely attacked by air units. And if you are, you stand no change anyway with 1 low level air defense.