Nikon AF-S DX 35mm f/1.8 G?

I would like to know is Nikon AF-S DX 35mm f/1.8 G is compatible with Nikon D3100? And works well?
I would like to use it for portrait photography, do you recommend it or not? If not what would you recommend?

Any AF-S DX lens should work with the D3100.

Lens is compatible.
If you have the 18-55mm lens, take portrait at 35mm and 50mm and see how it works, before deciding on 35mm.

Tatya's suggestion is good, except you can't get the same control over the depth of focus as you can with a prime lens.
My top choice for portraits with a D3100 would be the Nikon 50mm f/1.4 AF-S G lens. This gives you a nice working distance from your subject and great ability to control the background. The 35mm will put you right in their face, which causes some distortion and a lot of uncomfortable feelings.
- Why would I choose Nikon 17-35mm over the Nikon 16-35mm, or vice-versa?
- Why is the Nikkor 35mm f/1.4 way, way bigger than the Nikkor 35mm f/1.8 (DX)?
- Why is the Nikkor 35mm f/1.4 Way more expensive than the Nikkor 35mm f/1.8?
- Why is the nikkor 35mm f/2D more expensive than the nikkor 35mm f/1.8G?
- Is sigma 35mm F1.4 much better, than NIkkor 35mm F1.4?