Raiding in Travian is very important, you need to make a profit from your raids or they are pointless...
If people are raiding you and you give up a lot of resources, they will keep doing it. As long as they are profiting from you it is worth it. Which is why you need to make it pointless for them to attack you. If people get nothing, they will stop (most will anyway).
* If you notice a raid or attack coming your way here is what you want to do:
* Check what race your attacker is.
* Check your cranny level(s), get your resource levels below those numbers; if your attacker is a Teuton multiply your cranny capacity by 2/3 and get to the resource level you get.
Crannies will always cover the amount required to upgrade, so upgrading your cranny should not be a problem. One cranny is allowed per village until it gets to level 10, after that you can build as many as you have spaces available. As a rule, make sure your cranny level covers at least your warehouse and granary levels, if not more.
When you are attacked the first few times, move all of your troops out of the village. Send them on a raid to someone far enough away that they will not return until after the raid has hit. You can also reinforce a someone you know, or someone you don't know. If you want you can send them to someone, so that they are gone when the attack/raid hits then cancel the troop movement. You have 90 seconds after sending to do so. You will want to wait until about 20 seconds before the attack hits, then send them out. Recall them immediately after the attack lands via your rally point.
All attacks, when you are small, should be dodged. If the attacker sees troops, they will most likely come back with catapults. As I said, many attackers will constantly attack if they see soldiers. I have used this tactic many times to get a high offensive rank, don't be a victim of this.