+ Start a Discussion

What Salesforce API Should We Use???


I have been using Salesforce the app now for about three months and really like it.  I am also a application developer and to be honest, I'm a bit overwhelmed by all the various development tools that have coalesced around Salesforce.  To date I have successfully leveraged the Web Services API from a local C# application we have.  That was very straightforward, etc.  Over the last several days I have been working with Apex from the new, 3.3 Eclipse + Force.com toolkit.  I now have a good example of a trigger that calls a class that updates a Lead.  I have also built the required Unit Tests for deployment into our production environment. 


Next, I was hoping to use Visual Force for some GUI development, but it’s looking like these features are not commercially available yet.  So, then I start looking at s-controls, AJAX, JavaScript and my head explodes.  My question is this…where are all these API’s going?  When should we use Apex over all the technology surrounding s-controls?  It would be soooo helpful to see an API map that shows all the various options and when to use one over another.  I’m definitely suffering from the newbie syndrome, but others have to be hitting this info overload as well.


Can someone please help me understand when to use one API over another???  Something that is current???




Paul -

First, a small correction on nomenclature.  We only have one API to the Force.com platform, which is the Web Services API.  Apex code is not really an API, but rather a way to do procedural extensions to native applications, and Visualforce leverages the power of Apex, along with a set of HTML tags.

The preceding clarification also points out the big difference between s-controls and Visualforce (aside from the not-yet-production issue).  The Web Services API is used to access Force.com data and functionality from outside the Force.com platform.  Apex and Visualforce run on the Force.com platform.  An s-control is client-side code that uses the Web Services API to access the Force.com platform.

With me so far?  The idea of s-controls gets a little confusing, since the client-side code for the s-control is stored on the Force.com platform, but the code is downloaded and executed on the client.

The more you run on the Force.com platform, the more of the benefits of on-demand or cloud computing come your way.  In addition, both Apex and Visualforce are designed to be highly productive languages.  So, at the end of the day, using Visualforce and/or Apex (and also all the native functionality of the platform, such as workflow) will be a 'better' solution.

Hope this helps.
Thanks to Paul for the question and Rick for the explanation, I've been struggling with the exact same questions, and this helps clarify!

You are the man!  If you can believe it, I get it now.  You guys should add some of this content to the Salesforce Cookbook.  There is some lite discussion on this topic in that document, but it lacks the 'user' perpective.  In other words, it reads more like a reference that  isn't as clear as your post.  Anyway, thanks for helping us see the light...greatly apprcicated.