One of the biggest complaints I’ve heard recently is around the changes made to the Module Scanner in the product, which is strictly enforced in our On-Demand environment, namely about the inability to use curl or file_get_contents() directly to do outbound web service calls. For example, check out this example of making an outbound call from PHP to the Sugar Web Services API using curl:
Not only are there potential issues with curl usage on OD, but there’s a lot of code to make this happen. Pretty inefficient…
Now in Sugar 6.5, we’ve helped out developers out by adding the SugarHttpClient object, which is a simple way to make POST HTTP calls in Sugar without having to get down in the weeds with curl or file_get_contents(). Check out the above example re-written to use this instead:
You can see the code is now much cleaner, without all the bits around curl out of the picture.
We recommend that if you are doing any simple outbound web service calls in your customizations, you should use SugarHttpClient in Sugar 6.5 versus curl or file_get_contents() directly to avoid Module Loader restrictions. If you have more in-depth requirements such as needing to pass OAuth tokens, then building a Sugar Connector and leveraging the External API will add the additional features such as a user configuration UI that you’ll want to use.