Nikon and Canon models do not pair up really all that well--both makers deliberately try to compete not quite head-to-head. The D90 has pretty good compatibility with older Nikon lenses, and has quite respectable autofocus. The D90 is the top camera out of the five current lower-priced Nikon bodies (the top model out of 6 models if you include the D40x), with video capture, plus 4-level D-Lighting image processing and a 13-mode in-camera image processing effects menu,which includes the ability to process RAW images into JPEG images using the camera itself,after a shooting session is over.
The D90 also has a two-group wireless commander that will command two groups of the better, current Nikon speedlights, plus the SB 800 flash,which was just recently replaced by the SB 900.
All-in-all, the D90 is actually a more sophisticated camera than the Canon 40D, and the D90 and the Nikon system has what is by the acounts of most people who follow such things, a vastly superior flash system. Not too long ago Syl Arena put up an excellent list of 17 things he wishes Canon would do to improve its speedlight system to bring it up to par with Nikon's excellent CLS System; many of his complaints are just for Canon to bring their system up to parity with Nikon's. Read his post here, and see how many areas Canon's speedlights need improvements on
PixSylated | Digital Photography, Canon Flash, Shooting Tethered » My Canon Speedlite Wishlist
If you ask me, the Canon D40-D50 are still the same-old-same-old warmed over yet again, with little advance since the preecessor body was premiered in the form of the 10D, with higher MP pixel count sensors every few years, but really quite lacking in features compared with the mid-level Nikons like the D90, and far behind the D200 and D300 models; of course, the D300 costs more than the 40D, but then it's a much,much higher-specified camera than a 50D or 40D; in all honestly, Canon's 10D-20D-30D-40D-50D and EOS5D and 5D Mark II are all built upon,basically,what was a $300 EOS ELAN film body and sub-systems, whereas the Nikon D200 and D300 were/are built upon something much more akin to the $1,000 Nikon F100 film body. My biggest complaint with the 40D is the highly-centrally weighted AF system,and the clunky multi-mode control buttons and the ridiculously small Multi-Controller that Canon uses. Nikon has a much simpler, non-dual-function approach to body controls, making Nikon bodies more-intuitive to use. I know: I own both a Canon 20D and a Canon 5D, as well as three Nikon-based bodies.
The 40D's rear dial and the front dial switch functons back and forth,back and forth,depending on the exposure mode the camera is set to,and the top deck's four buttons each have TWO functions. On a Nikon D90, the rear dial and the front dials always control the same functions, whatever exposure mode the camera is set to. Many people prefer the one control,one function approach of Nikon, as ell as the Nikon concept of ONE dial ALWAYS adjusting the f/stop,the other ALWAYS adjusting the shutter, and not yo-yo'ing the functions depending on the light metering mode you just happen to be in.
The D90 is however, closer in terms of body build and subsystems to the 40D and 50D, than it is to the D200 and D300, which are bodies a noticeable notch above the 40D. Canon really does not quit have a direct competitor to the D90....as I said, the D90 is the top out of FIVE lower-cost Nikon bodies,and might most-appropriately be called Nikon's current "hobbyist" or "consumer" d-slr model.