That's a tough one. To work against deer, you'd need a fence at least 8-10 feet tall, which is not allowed in front yards in most communities. Nor are electric fences allowed in residential areas. Your best bet is to spray plants with deer repellents. Depending on how secluded your yard is, you might also be able to install motion detectors connected to automatic sprinklers. This works best in backyards where unsuspecting human visitors won't be surprised. Sprinklers work the best; there's little evidence that sound works to repel deer.