Salesforce + Heroku = Like Very Much the Platform

I have installed most of the Salesforce developer’s tools on my company’s laptop (MacBook Air). I’m not used to this OS and it’s keyboard layout, but as I will used this computer most of my time, I would better get used to it.
The nice part that come with Mac is it’s bash/linux environment.
Now it’s time to play with theses tools and how they can be used together in Salesforce’s environment. As developer, I always keep in mind of How I can used this tools if I were working on a development’s team / and How I can script/automate most of the tasks I always do.
The list below is not exhaustive, but it’s a good start:

  • Force.com IDE
  • Sublime Text 3 and all it’s nice plug-in
  • ANT Migration Toolkit
  • git, svn client
  • Jenkins and all it’s nice plugin
  • Artifactory
  • Maven
  • SoapUI
  • MAMP: My Apache – MySQL – PHP
  • SoqlXplorer
  • JD-Gui to decompile Java Classes
  • Tomcat Web Server
  • JSPWiki
  • Workbench
  • and Splunk for troubleshooting
  • ../..

Here are the steps I have used to develop/test the following (simple) use case.
Simple Use Case: Calling a Web Service implemented in Java using Jax-WS and deploy it on the cloud. That’s the reason why I ended up using Heroku (a platform that I have heard about), and now it’s a good time to start playing with it. Heroku will be hosting my developed Web Service in the Cloud.
Then I will create 2 clients consuming this Web Service using VisualForce Page/Apex code
and using APEX Binding (executeAnonymous operation) to call this web service with SOAPUI.
Step 1: Implement a Java Web Service using Eclipse/Maven. A top down approach (contract first) is used.
Step 2: Deploy this Web Service on Heroku Platform.
Step 3: Use Force.com IDE to create a Simple VisualForce Page and Controller to call this web service from Salesforce.
Step 4: Use APEX.wsdl and the executeAnonymous Operation to call this web service.
Below, some screenshots of my testing:

The Final result in Salesforce using a VisualForce Page to call the SOAP Web Service on Heroku:
VF1-2014-12-27_00-01-08

Reusing a WebService in Eclipse with Maven/Artifactory and Jax-WS
EclipseJava1-2014-12-27_00-01-11_01

EclipseJava1-2014-12-27_00-01-11

The Artifactory is used as repository to handle all JAR dependencies used by Maven.
Artifactory-Jax-WS-2014-12-27_00-11-55

I have jenkins task which is scheduled to check every 30m what has been modified in all my Metadata, and store the deltas in my local git repository. This is to keep tack of all change that can occurs in My Org. It has detected that 2 objects were create: An Apex Controller class & a VisualForce Page.

Jenkins1-2014-12-27_00-01-06

Jenkins2-2014-12-27_00-01-07

Workbench is used to test Anonymous Apex code, get the SessionID which is injected with SOAP UI Request
WorkBench1-Anonymous-2014-12-27_00-01-04

Workbench-SessionId-2014-12-27_00-01-08_01

SoapUI-2014-12-27_00-01-04_01

SoapUI-2014-12-27_00-01-09

And below, My Web Service deployed on Heroku Platform:
Heroku1-2014-12-27_00-01-09_01

Heroku2-2014-12-27_00-01-10

Thanks for reading…