There was a recent requirement in which we had to create a Custom Button which opened a Visualforce page in a dialog box. The visualforce page then rendered and rerendered components and other functionalities were attained with the the help of visualforce page. Which also made callouts and created a shipment record.