Here is some advice that uses my base as an example. My base isn't perfect, but it has proven to be quite effective. You can click on the picture to get a larger image.
1. Cleverly place your firebolt towers.
In this picture of my defense, the yellow circled firebolt towers are very difficult to remove before they do serious damage. They will efficiently mow down invading forces while lying beyond the hero's reach. The only effective ways to destroy them is by either going solo with the king through my base until you reach them or by using cannons. If you use cannons, they will likely be destroyed by the firebolt tower in the process of taking down and going solo with the hero tends to be quite perilous. Put your strongest firebolt towers in these kinds of positions.
The red circled firebolt tower is not as well placed as the yellow circled ones, but there is a small delay before you can take it out, allowing it to do more damage to the hero and troops before it is destroyed.
2. Alternate damage types.
In the above picture you will see that where possible, I have alternating firebolt towers and snake towers (snake towers are cheaper than firebolt towers and got a buff in a recent update). This ensures that the hero is both on fire and poisoned as much as possible and this kills him more quickly.
3. Spread out your barriers.
This ensure that they can't be taken out too easily by the bladestorm or other AOE spells like the sonic blast or firestorm. Also ensure that barriers aren't touching, and try to keep them on the side of the path that the hero will be walking on so that they can't be "tagged" by the hero's spells as he walks along the other side of the path.
As soon as I can afford another firebolt tower, I will replaced the green-circled arrow tower with a firebolt tower. These corners are a really good position for firebolt towers as the firebolt tower will be able to target the enemy hero before it even enters the six squares in front of the castle gate and set him on fire. This prevents them from healing and does potentially fatal DOT. This tactic is actually really effective against those heroes that have made it through the rest of your base and are on low health, and often prevents those who are not careful (most players) from advancing to and destroying the castle gate.
5. Synchronize with your waves.
You may be wondering what the barrier in the blue circle is doing there as it is not backed up by any towers. It actually has the really valuable role of delaying the enemy hero by a couple of seconds, giving my first wave of troops time to make it over the second barrier on the path. Most players would imaginably use their spells on it and be unable to destroy the second barrier immediately. This forces their hero into a brawl with the troops that just made it over the second barrier while being gunned upon by the red-circled firebolt tower and being covered in poison. This combination is often lethal, and ensures that I see a noticeable number of 4-7% raids in my attack history.
6. Spread your towers out.
Considered the loop of the path highlighted by the grey line. Everything is spread out around the path and I have avoided putting two towers next to each other. This ensures that multiple towers can't easily be taken out in a single sonic blast, firestorm, etc.. This really delays the hero in getting round the loop to the asterisked yellow-circled firebolt tower. Meanwhile, all my ranged troops and asterisked firebolt tower are happily gunning down enemy troops and so cutting off reinforcements. If the hero can't make it to the asterisked tower quickly enough, then their troops won't be able to also make it around the loop to get to the castle gate. Note how a similar situation is set up by the bottommost yellow-circled firebolt tower, but to a lesser extent.
7. Finally, place firebolt towers in corners.
Consider the placements at the top right of my path where the skull tower is and the bottom right of my path where a gargoyle tower is. These are good positions for firebolt towers. The reason being that unlike the other towers, they sit back from the path and so often won't naturally be targeted by enemy pyromancers. This forces the enemy hero to go further out of their way to deal with them, costing them more time.
This is me, KK Star's opinion on how to build an effective defense. I hope it is useful.
These are the major goals a defense must try to achieve -
1. Kill the hero.
2. Make the attacker use scrolls.
3. Time-consuming to destroy everything.
4. Have a/few point(s) where the attacker might potentially lose the whole army.
5. Block the attacker at the tent itself.
6. Set up traps and unusual tower attacks or distractions.
7. Design a new base so that attacker is not familiar with tower positioning.
My Current Base design consists of mainly Skull Towers. These are there to eliminate the army the opponent builds. Range Bombers aim at freshly spawned troops from the tent. Firebolt towers prevent the hero from regeneration and kill cannons which are commonly used by attackers. Snake Tower are present to kill the hero, The hero is weak to poison and continuous attacks from storm cannons and unexpected gargoyles from waves and gargoyle nests can be potentially deadly.