Personally, I prefer boomkin with bear off-spec for various reasons.
At times when I pick herbs sometimes getting agro from near by mobs is just unavoidable. Now I don’t like to fight a mob if I didn’t intend to fight it in first place. I like to keep my time short and be on my toes for most herb farming in shortest time possible. When I do get agro, I activate my torrents (trees) it’s a talent in boomkin tree so be sure you take it before Mists of Pandaria. I send out my torrents at a mob or several mobs and while they fight, I pick my herb, I slightly move away (not to agro other near by mobs) and I wait for my torrents to die. Once they die I shadowmeld, lose agro, get out of combat and hit instant flight form and fly away!
I used to use bear off-spec to farm herbs in Dire Maul when ghost mushroom was selling very high and also in Hinterlands in ooze caves I’d run around, gather up a pack of oozes, dps them down and collect mushrooms. So it comes quiet handy.
What other classes would be good for farming? Well both hunters and warlocks have pets. You send your pet to fight a mob and pick a herb before someone else flys to you and ninjas the herb from you while you are fighting a mob.
I, personally, if I see a person fighting a mob, I am not going to go and ninja herb/ore from him. It’s his/hers. But there are some people just like in real life who’d walk all over you to get what they want. Same in World of Warcraft. I had it happen to me several times and seen others getting pissed off too about it.
So these are my tips how effectively do herbalism and mining in world of warcraft.