Worth noting that the second desktop you posted has twice the RAM (4 vs 8 gigs). If I was on that budget, that's what I'd buy.
Anyways, you get more bang for your buck from desktops - but if you need a lappy for school or something, I guess you don't really have a chouce.