Whether you build the spaceship in orbit or on the moon, is not that important.
What is important is the life-essential knowledge you gain by building a base on the moon first.
The Mars Society (I think they're called that) have been building mars-bases in a cold desert, up north. I have a friend who went on such a journey. They were about 10 people who just tried to live and work in space-suits for 3 weeks in a row, in a mars-base like structure. Having special viehcles and so on. And no more materials than they planned for from the beginning. There are a billion problems and dangerous situations you just cant forsee unless you have really been doing it for "almost real". A moon-base will be the next "almost mars-base".
So i believe a moon-base is crucial in order to make a succesful mission to mars. Remember the moon is what... a few days away... mars is more like half a year.
I