Master now points to version v28.0 (Summer '13), Note: Version 27.0 (Spring '13) required a mandatory upgrade and some small coding changes, please see the Spring '13 release notes and the examples). If you still need the previous release:
// Clone the entire repository
git clone [email protected]:forcedotcom/SalesforceCanvasFrameworkSDK.git
// List the Tags
git tag
// Check out the previous version
git checkout v26.0
###Introduction
Force.com Canvas is a mechanism for consuming third-party applications within Salesforce. Its goal is to connect applications at a UI level instead of just an API level. The purpose of this GitHub repository is to provide third-party applications with a Java/JavaScript SDK and examples so you can easily integrate canvas-style applications into Salesforce, while developing in the technology and platform of your choice.
The best place to get started building canvas applications is the online developer's guide.
Currently, we provide Java and Ruby examples, but you can develop in whatever language you prefer. Most of the integration with Salesforce is through JavaScript and REST. You can also run and test your application locally from your own host, or from Heroku.
While this SDK contains some very basic Java examples, it doesn't contain all the examples. We recommend you explore the Heroku Quick Start, for additional examples in Java and other languages.
For other examples and resources, check out DeveloperForce.com
The Force.com Canvas Summer '13 (v.28.0) documentation:
Below are some useful commands and links for your convenience. Before you use them, you'll need to make sure you have the necessary software installed on your computer here.
git clone [email protected]:forcedotcom/SalesforceCanvasFrameworkSDK.git
git submodule init
git submodule update
If you prefer, you can build and test your application locally before you push to Heroku or any other server. If you decide to test locally, you'll also need to generate a local keystore so you can do SSL.
mvn package
This is only needed to support SSL (https) when running locally. Heroku uses piggyback SSL so it's not needed there.
> keytool -keystore keystore -alias jetty -genkey -keyalg RSA
Enter keystore password: 123456
Re-enter new password: 123456
What is your first and last name?
[Unknown]: John Doe
What is the name of your organizational unit?
[Unknown]: myorgunit
What is the name of your organization?
[Unknown]: myorg
What is the name of your City or Locality?
[Unknown]: San Fancisco
What is the name of your State or Province?
[Unknown]: CA
What is the two-letter country code for this unit?
[Unknown]: us
Is CN=salesforce.com, OU=platform, O=chimera, L=San Fancisco, ST=CA, C=us correct?
[no]: yes
Enter key password for <jetty>
(RETURN if same as keystore password):
Re-enter new password:
If you're running and testing locally, this will start your Java Web server.
sh target/bin/webapp
If you're running locally
https://localhost:8443/examples/hello-world.jsp
Or if you're running on Heroku
https://<your-heroku-app>.herokuapp.com/examples/hello-world.jsp
If you're running locally
https://localhost:8443/sdk/callback.html
Or if you're running on Heroku
https://<your-heroku-app>.herokuapp.com/sdk/callback.html
To commit your changes into your local git repository and push those changes to Heroku, do the following. Note: Your repository name may be diffferent than 'heroku', use git remote -v to confirm.
git add -A
git commit -m "My change comments"
git push heroku master
To access your logs on Heroku, use the following command. For more information on Heroku logs click here.
heroku logs --tail
- 28.0 (Summer '13)
- 27.0 (Spring '13 - pilot)
- 26.0 (Winter '12 - pilot)