Not counting mods, the best way I know of is to make sure the area you're "protecting" has a floor made of blocks which don't allow mob spawning.
Any transparent block will do the trick, such as glass or snow, and in your case maybe Slabs will be most suitable.
For more in-depth information about spawning and spawn conditions, check the wiki:
http://www.minecraftwiki.net/wiki/Spawn#Mob_Spawning
I saw "barn" and the chicken, so I presumed you were trying to get passive mobs to spawn, but gnovice's comment suggests two ways to answer this question:
Will any passive mobs/animals spawn?
Presumably you've been sticking close to your barn: while this would've worked fine in earlier versions of Minecraft, passive mob spawning changed before release such that they only have a very, very small chance of spawning in already-loaded chunks.
To get passive mobs, like chickens, to spawn with any useful frequency, you need to either:
Will any hostile mobs spawn?
Hostile mobs will spawn at light levels 7 or lower, and torches have a light level of 14. From your screenshot, it looks like your barn is a rectangular, 11x9 room. It also looks like you have torches across the entire bottom row of your barn's walls. Assuming that's the case, your barn's light map looks something like this:
So given your current setup, no mobs will spawn in your barn because the darkest part of the barn is still light level 9. This should also suggest two things to you:
All of the other torches you have above the ring around the bottom are useless: the bottom ring supersedes them.
You can move that bottom ring up one level and still have a hostile mob-proof room (the center area would be light level 8).
You could also be a bit more efficient with your torches: for example, you don't need torches on the shorter walls if you use torches across the longer walls:
You can even light up the place with only 6 torches:
Best Answer
No, string will not stop mobs from spawning - due to its use in redstone mechanisms as a means of detection.
Source.
This makes it useful to detect when mobs spawn, to trigger traps, etc.
What it does block is natural generation of "growth", such as if it is placed on bamboo or sugarcane, it will no longer grow, and it will also stop the (natural) placement of snow layers in snowy biomes.
What you could use instead, is carpet. You could use a similar colour to your block palette, making it barely noticeable.
Source.