The power of the Tooling API can be demonstrated using a basic Visualforce page that calls to the Tooling API’s REST endpoint from the Apex controller. Figure 11.4 shows the sample user interface. On the left side are the Apex classes available in the organization, accessible with an ordinary SOQL query on
ApexClass. On the upper-right side is the body of the selected Apex class. Below it is a Save button, which deploys changes to the class body.
The process for deploying Apex code or other types of Force.com logic is to create a
MetadataContainer, add to it the ...