You'll have to go out via security and back in again, this could cause an issue, and you'd need to check if you could do that with the airline. Dubai airport security check in can be really long as well, they're opening up new terminals to cope (terminal 3 is emirates only( but the line is always massive.
Dubai airport is pretty nice, I used to go a lot for work, the airport is very bright and modern, lots of western things and non western things and shops, everything is open 24 hours, prices aren't that cheap, except for alcohol and cigarettes, ciggies are really cheap.
I think they're opening a giant mall or something next to the airport.
I think the airport is fairly close to dubai as I remember, used to take me about 30mins to an hour in a private car to the hotel I used to use the Jumeriah, (on the beach - ah boondoggles) (about 25km) and it's about the same to city centre
Mall of the emirates is worth a look if you want to shop