As DF plans to have some realistic aspects, it's expected to have two major points to farming:
1) Climate: some plants just don't grow everywhere... Outside farming only allows you to plant what can grow in the area, if you got a desert or freezing environment, you won't ever grow a leaf there... Still, indoor farming is not affected by climate;
2) Soil: Farms use an averaging on the ground, underground plants only thrive in underground environments, so you can't plant on normal soil or sand, you have to get an ALL muddy underground soil to make it work, just as the other guy said, flood a room and use freely doors and floodgates to control, let about 2/7 of water and wait for it to be drained and vóila, farming plots will give you what you want... Outdoors farming is a bit trickier, you first got to make sure there's no rocky floor or anything other than soil (or grass), chanelling will let you make an outdoor farm indoors, just make a floor so the enemies won't fall on top of your farm and you'll be a happy little farmer...
That's all i guess