TTL is metering thru the lens. both ambient and flash. during film days, flash fire once cos flim is neutral grey in colour and the reflected light from the film falls on e sensors at the bottom ( remove the lens and you can see the sensors). thus, the mode you choose, spot, matrix etc affects the prosessing/choice of sensors used.
now, in digital, since there is no film and the CCD captures light right on the spot, the light is not reflected back to the sensor. thus the flash ( like sb-800 has a preflash, this pre flash is the one that is bounced off the shutter curtain to be measured by the sensor and the the the 2nd flash is when the curtain opens.
since the amount of flash is determined by amount of light bounce off, compensation is needed for extreme white of black object. e.g if you shoot a black cat, more flash power will emit cos the black doent reflect much light, thus to get a true black cat like it really looks, you may need to close down 1/2 a stop or more. experience w it.
TTL will work with any nikon lens. cos the metering comes from the camera not the lens. just that AFD(distance) lens will feedback focusing distance and help camera determine exposure. personally don find AFD or AF have much difference
hope this helps