well, what I do like to do is, as a first step, get a repair station and a few turrets in its vicinity and upgrade the planet's emergency facilities. if you place your logistics structure in that cluster also, then at least you have a little time to react and get a proper defense in place.
that is what I do for border worlds and possible one jump further early on. depending on the map setup and how much I get attacked, I get tactical upgrades and sation more repair centres, canons and hangars and might upgrade the planet even more.
fleet-wise, I usually split them up a bit, rarely ever do a complete steam roller. it depends on the size and layout of the map, but I try to station my fleets such that I can reach every one of my worlds in one, or at the maximum 2 jumps with one of my fleet groups. that usually leaves me with 2 - 3 fleets in medium sized games. when in the offensive, I then usually take most of that 'sector's' fleet to attack and leave defensive tasks to the resupply that has since been produced and stationed.
that said, one of the best defenses is still recon. knowing, or at least having a good idea, when and where the enemy is likely to strike is invaluable.