Sfgate.com has a great article on growing fruit trees on sidewalks. I think the messiness issue is a crock - the good far outweighs the bad of getting something useful from the trees. A very easy solution though is to use cherry trees and blueberry bushes - their fruits are so small that they don't make a sticky mess, and the birds and squirrels will eat whatever we people don't.
I've always thought that non-fruiting cherry trees are ridiculous.
I'll end my Andy Rooney-like ranting minute now....
UPDATE: Not for the first time, I find myself in the minority position in the comments. Seeing as this isn't the world's most important issue, I think it's okay for me to be stubborn. Until I see fruiting cherry trees leaving substantial messes on the sidewalk, I remain doubtful that it's much of a problem.