Munich to Vienna by train

I'm visiting Munich for a couple of days in March and am thinking of combining it with a few days in Vienna. Is bahn.com the best website to book my train ticket on or could I get it cheaper elsewhere? How far in advance do I need to book? I'm assuming a train would be a better option than a bus.

If you book now, you can get a ticket for 29,-- Euros (2nd class), or 49,-- Euros (1st class, which I find always advisable) per direction.

It gets more expensive the longer you wait.

Alternatively, you can now book flights from Munich to Vienna (and vice versa) for less than 50 Euros per flight, but of course these offers will be sold out too, if you wait until March.

Net flight time is only 55 minutes (probably no sense in booking 1st class then), the downside is that there's more red tape than you have with trains, you can't just hop on the plane 5 minutes before departure (like you'd do with a train), and it might be tedious and time-consuming to get to and from the respective airports.