with a glock, a 17 slide will work on a glock 22 slide, and a glock 22 slide will work on a glock 17 slide. Despite earlier post, the recoil springs are EXACTLY the same. I had a glock 22, and glock 17 and swiched the slides and magazines around, and they worked perfectly. The M&P does not yet have the huge afermarket support that glock has so the possibility of purchasing uppers only might be a little harder...Its a good idea tho...you have one gun registered, but can use two to three different calibers...One of the most interesting things about glocks is the calibers they can fire under the same platform. A glock 21 It can shoot 45 auto, 10 mm, and 400 corbon, the glock 20 can shoot 10 mm, 40 cal, 357 sig, 400 corbon, 9 x 25 etc...glock 22 can shoot 357 sig, 40 cal, 9mm and to top it off, all of the glock platforms have some sort of 22 cal conversion slide.
I own a glock 20, with a entry level lone wolf 40 cal conversion barrell...all i do is swap the barrell and use the same mags for the 40 cal... 100 percent reliable thru 500 rounds so far... cant go wrong with it...
in my personal opinion, a glock is a better and more versitile choice in changing calibers...