Farming Bases are designed against multiplayer opponents who are farming for your resources. You are protecting Elixir, Gold and Dark Elixir from easily being stolen by making other targets more viable than them. You are also giving up minor resources and keeping major ones highly protected.
Farming Bases typically have their Clan Castle in the middle off the base along with any major resource storages close by. If a Dark Elixir Storage is owned, it is the most valuable resource so it is protected above all other resources.
Other resource storage’s are distributed evenly around the main compartments so you don’t lose all your resources at once. Make sure each of them is well protected by two or three well placed defensive buildings. Triangulation of defensive buildings is a very important aspect of your base. It is the idea that your defences are distributed to ensure maximum coverage of your entire base. Triangulation is particularly important for Mortars and Air Defences as they highly damage certain armies by the enemy.
Also make sure you put as many high level collectors inside your walled base as possible, as collectors can be an easy source of resources for an attacker if they are not emptied regularly. Low level collectors are not as important and good attackers will know the difference.
Segmentation is not as important in farming bases as there tend to be larger compartments that contain storage’s and several defensive buildings. However, it is still wise to use it when you can. It is recommended to have a layout like a 3 ring defence.
Firstly, in your first ring or main compartment, you should place your Clan Castle, most prized storage/s and a couple of defences (e.g. Mortar and Air Defence). In the main second ring, split it up so you have roughly four compartments with a storage each, but also with several defences (e.g. Gold and Elixir storage’s + Wizard Towers, X-Bows, Inferno Towers and Air Sweepers). And in your third ring, you should place collectors and other Defensive Buildings, like Cannons and Archer Towers.
The Town Hall should be protected like a storage, either in you centre compartment, or the second layer, although that is risky.
If you want to win defences with farming, then here are some tips;
1) Have your Town Hall in range of the highest level defences, and make sure they can shoot Archers/Wizards too. Also have a possible maximum level Archer Tower, Cannon, and Mortar. If they can shoot Barbarians and Archers, then they will be killed very quickly.
2) You should have high level Gold Mine and Elixir Collector outside your walls. If you are a frequent player, then this wont be a very big problem; The attacker might see that you have a lot of available loot and attack your Mines and Collectors rather than your base. This is a good trick if you have level 9-12 gold and elixir storage’s, because they will usually look nearly empty; Then the attacker will realise that there isn’t very much and the remaining troops will be unable to destroy the base.
3) Make sure you have no shield when you get of the game for a long amount of time; attackers will be more likely to raid before a lot of resources accumulate and you wont lose as much.