Barbed wire won't keep anything out. It can be used to keep cattle and horses in.
They sell the parts to make chain link gates to your size needed or this kit can make it relatively easy to make a wood frame gate.
They are fenced out of the garden. This was right in front of the front door steps. There is a notch in the concrete steps at the back that they love to hide in.
I fenced the deer out of my upper enclosure when they started going after 20 year old trees.