actually i've done this twice with my roommates iphone 3g, it was extremely easy if you follow the great directions on youtube and buy the parts from ifixit/ ebay
The first repair we only replaced the "digitizer" which was a royal pain the the a** (i'll never do that again), you have to separate it from the LCD by heating the glue etc etc etc,
the second repair was the lcd/glass/digitizer which was a breeze, if only the glass is broken, you'll be much better off if you just replace the lcd/glass/digitizer.
(BTW we purchased both parts off eBay for a much lower price than ifixit and got great quality and service, i'm not sure who the seller was but he had great feedback about iphone parts)
EDIT: if you do this make sure to buy a small suction cup from a hardware store, it makes removing the glass/lcd painless