If the game is an official Steamworks game there is no difference between the DVD version and the online version, the DVD is just like preloading the game. This means you get all the advantages and disadvantages of Steam, no matter where you buy it.
This is not necessarily the case for games that are just sold via Steam, but don't use any of the Steamworks features.
As Portal 2 is produced by Valve, the same people responsible for Steam, I'm pretty sure it will be a full Steamworks game and it won't matter where you buy it. I couldn't confirm it though, so I can't be 100% sure.
You can generally register all Valve games on Steam and add them to your library, so this will most likely also be the case with Portal 2.