I always advocate doing the very best one can and for me a part of that is using whatever experience and knowledge is available or that can be dug up to make a plan, lay out a path that avoids obvious and pointless trouble and passes through some good space. To that end:
Since we all live w/in the purview powerful institutions, some of which are called governments, it'd be good to have a functional understanding of how a farm relates. Probably this depends(!) mostly on location and size (in various ways of measuring) so any info needs to be tagged for specific to the particular country, state, revenue, heads of livestock, tonnage to market... of the farm. Oh, and date - things change over time. But it may not be _all_ that hard to compile a useful list of pointers to provide the start of a checklist for when people start making plans, especially maybe when they think about where to locate.
Hopefully others over time can fill in details and point to where more info can be found for their type of farm. I started the topic in homage to a number of bruises and scars which remind me to try to learn the playing field and discover the rules of the game before jumping in. Also, the various government regs usually establish "break points" where the rules change and it is a Good Thing to know when you're about to enter into new territory.
To start off, many towns and cities allow bee hives. I found the regulations for mine by going on-line and looking at animal control: I am allowed up to 2 hives, as long as they are not within a certain number of feet of a house.
I also would like a dexter cow, but the zoning for my home prevents this, even though I have an acre of land. I could try for a variance from the zoning, but I have decided not to bother. I do not believe I would get one.