Which lens is better for a Nikon d5000?
35 mm F/1.8 - Nikon F or 50 mm F/1.8 - Nikon F?
Which produces better bokeh & quality?
It's two different lenses, both with the same quality. What is your intended use? That is how you would decide. They are both short focal lengths with a large aperture. The 35 mm is a wide angle lens while the 50mm is a standard lens.
On a D5000 which is a DX body, the 35mm will be a 50+mm lens because of it's cropped sensor.
They are pretty much equivalent lenses in quality. Boke will be slightly better in the 35mm due to the aperture blades using an arc shape. Here's a side by side comparison of these two lenses using a D90.
http://picasaweb.google.com/...Comparison
The 50mm lens is AF which means you need to manually focus it on the D5000. The 35mm lens is AF-S which will autofocus on your camera.
They are pretty much the same. The 35mm f/1.8 is slightly sharper, but has more purple fringing. As for bokeh, they're about on par with each other.
The bigger deciding factor would be which focal length is more useful for what you shoot (a longer focal length will be better for portraits in this case), and whether autofocus is essential or not (only the 35mm f/1.8 autofocuses on the D5000).