Have a Dog
It is not that difficult to pet a dog. It is probably the most effective way to keep your enemies at bay, whether they are from human race or animals. Even a small dog can effectively alert you that enemy of your yard is weighing to find a way into it and planning ruining all vegetables and flowers you have grown.
Fence Your Yard
You can also fence your yard or garden through wire or wooden fences to a certain height that deer is unable to sneak through. But avoid putting fence with any harmful material that injures the animal and you are in trouble on safety and protection of animals issue. Also, if you put wooden fences, try to keep a narrow gap so that animal should not be able to pushes through his head and stuck. It can be fatal to the animal's life.
Grow Less Wanted Plants Around Other Plants
You can also get help from some rough plants, which you can plant around flour and fruit plants as a wall. Generally, animal is less attracted to these plants, and can avoid enter into yard on finding nothing much that he likes. Do anything too rough or poisonous that can harm the environment or your animals.
Spread Hot Sauce on Plants
You can also spray hot sauce on leaves of plants you want to protect from deer. After trying the hot spices, deer cannot dare to have another go ever again. Be careful in this and do not add anything poisonous that kills the animal.
Set up Detector or Alarm Bell
You can also set up a motion detector or alarm bell that once touched will immediately inform you about the expected attack. It is an effective method at night when you are asleep and the animal finds convenience of time and space to unleash his attacks. But if you are away from your home this method is not an effective way to keep the animal at distance.
Erect a Scarecrow
You can try and erect a scarecrow or any other think i.e. stuffed dog like shape that animal might find scary and changed his mind to attacking your yard. However, some animals can sense it something to be fake and gradually stop being scared from such tricks.