It's much easier to get a realistic looking background in camera.
It's much easier to get a nice looking background in Photoshop.
Some people's philosophy is to do as much as possible in camera and leave Photoshop out of the equation or only only as a last resort. Some people's philosophy is to get the highest quality results possible using whatever tools are available. There's no right answer.
Speaking of specific techniques, getting a good background in camera requires a lot of space, a background support system and material. For the standard mottled portrait background printed cloths are available and you can also dye your own. Getting out of focus highlights in the background like the example link you posted is harder in camera as you need a rough texture which is lit evenly but obliquely (required a lot of space to prevent spilling onto your subject).
Replacing the background in Photoshop requires generation of a good subject mask. The ideal solution is a proper chroma key setup such as is used for VFX work (the classic blue or green screen). This too is expensive and requires space and coloured lighting. But provided you have a plain background you can get good results using Photoshop's select colour tool, which lets you select a series of colours to add to the mask as well as letting you finetune the tolerances. There are some commercial plugins designed for exactly this type of job which use a more sophisticated approach.
It helps when the real background is similar in colour/shade to the image you're inserting. If you try and replace a black background with a very light image or vice versa any imperfections in your mask will be very detrimental to the image.