function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MikeBates.ax895MikeBates.ax895 

salesforce version of external app

I have been building an app on cakephp for a couple of years now, and have decided to build a salesforce version of it. The salesforce app will nee to use the external data. Is the following the best approach to use?

 

Create a webservice (I'm going with REST) on the external database.

 

Create custom 'Model' objects for each database table in a salesforce app.

 

Create all the page controllers but get them to pull data from and send data to the webservice.

 

If this is correct, will creating the custom objects start to build a salesforce database? I'm not sure I need that as there will be customers who don't have salesforce accounts, so the salesforce database will never be "complete". So if that is the case can I unhook custom objects fromthe salesforce database and have them only use the external database via the REST webservice.

 

Thanks for any advice,

Mike

 

 

*werewolf**werewolf*
You could also make a custom tab in Salesforce that renders your app verbatim, or embed your app as an iframe in a visualforce page. That way you don't have to rewrite the data access stuff. When you embed like that you can pass in a Salesforce session id so you can query Salesforce if needed, but your app can still remain standalone.
MikeBates.ax895MikeBates.ax895

that sounds like a lot les work

 

If I wanted to do some integration, say have the external user records reference a salesforce user record, I assume I would do that in the external app using the salesforce api.

*werewolf**werewolf*
That is correct sir. The PHP toolkit available on this site makes it pretty easy to access the API. Te trick is just to ensure that your integration passes the necessary info (session id, user id, etc) to your PHP app. That's generally easily done with merge fields.