Mashups in Salesforce CRM

Although it may seem daunting at first, especially if you are less familiar with Internet scripting technologies such as HTML, but certain types of mashup can be accomplished by most people and do not require professional software developers or the IT team.

Before starting out, it is always useful to first evaluate how and where the mashup needs to be done, and in particular, the type of data and service that is to be mashed up. Once this is understood, you can then begin to consider the coding effort, and plan the resources required to implement them.

To understand the flavor of mashups as far as Salesforce CRM is concerned, and as suggested, at a high-level, there are two main categories of mashup development, and these can be classed as either server-side or client-side as shown next:

Mashups in Salesforce CRM

Looking at the preceding diagram, we see that the server-side mashup goes through the following high-level steps:

  1. User makes a page request to Salesforce CRM using their web-browser.
  2. The web browser calls the Salesforce CRM servers which invokes custom Apex code within the Salesforce CRM server.
  3. The custom Apex code in Salesforce CRM calls a function on an external application server.
  4. The external application returns the response to Salesforce CRM.
  5. Salesforce CRM processes the response and returns the details to the users' web browser.
  6. The user's web browser finally presents the overall response back to the user.

Client-side mashups are far more simple, as they use the browser to link the requests and responses required for the mashup, where the following typical high-level steps can be considered:

  1. User makes a page request to Salesforce CRM using their web-browser.
  2. The user's web browser requests details from Salesforce CRM.
  3. Salesforce CRM returns the response to the user's web browser.
  4. The user's web browser requests details from the external application.
  5. The external application returns the response to the user's web browser.
  6. The user's web browser finally presents the overall response back to the user.

As indicated, server-side mashups often require sophisticated coding and require external infrastructure which is generally provided by the IT resources. As this book does not aim to be a resource for developers, we will look at server-side technology at a high-level and will not go into the details.

We will, however, cover the use, and provide some step-by-step instructions on how you can compose client-side mashups, and the tools that are available within your Salesforce CRM application.

Server-side mashups

By way of introduction, and for the sake of completeness, the following section describes the core features of external server-side mashups. We will briefly look, in a little more detail, at the capabilities, features, and implications associated with the use of server-side mashups.

Server-side mashups are a specific example of an external services mashup. This is where external systems may either serve the request for data from Salesforce as a client, or use data presented by Salesforce and mash the composite data in an external system.

These mashups typically use web services, and are most often provided by organizations using web APIs (Application Programming Interface), which describes how the service can be accessed by a client application over the Internet, and which is executed on the remote system which is hosting the service.

A more formal definition of a web service is provided by the W3C or The World Wide Web Consortium, which as detailed on their web page (http://www.w3.org), is "an international community where Member organizations, a full-time staff, and the public work together to develop Web standards":

Note

A web service definition by the W3C is: A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL ). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards: http://www.w3.org/TR/ws-gloss/.

Although the web service definition for the machine-to-machine interaction by the W3C refers to machine-to-machine interaction using SOAP or Simple Object Access Protocol, there is another protocol which is becoming increasingly popular today known as REST or Representational State Transfer. This is mentioned for information only, and we will not need to go into any further detail about web services in the book.

Client-side mashups

Within Salesforce CRM, there are typically two types of client-side mashup, namely client-side services mashups and client-side presentation mashups.

Client-side services mashups

Similar to server-side mashups, client-side services mashups can also be used to call web services or consume web sites and feeds. They can be used to invoke the Salesforce CRM web services API from within the browser. Client-side services mashups require more complex programming than client-side presentation mashups, and typically rely on the technologies associated with web services.

Client services mashups and external services mashups are useful to organizations that need to access to information from various systems which usually serve a business data process and interact in real time. Specifying and developing these types of mashups needs to be carefully evaluated to determine the required effort and resources.

Client-side presentation mashups

Client-side presentation mashups are the least complex mashup and can be composed relatively quickly. Here, live data and functionality from multiple sources are embedded on a web page which requires data from the Salesforce platform with which to mashup with the non-Salesforce data and functionality.

Client presentation mashups in Salesforce can be composed using Visualforce, HTML, and JavaScript, which can often be copy-and-pasted by non-technical users and can immediately add value to a web application.

Having briefly outlined the nature of client-side mashups, we are now going to look at how they can actually be created in Salesforce CRM. As shown before, the enabling technology is provided by the Salesforce platform with the use of the web page framework known as Visualforce.

The best way to step through the use of new technology is by demonstrating with an example. Here we are going to compose a client-side presentation that displays a Google News Bar ticker widget that displays Google news information for a given company.

The News Bar will be presented to the user in Salesforce CRM after selecting an appropriate account record and live Google news information will be displayed right from within the relevant account detail page. The mashup will be composed by creating a new Visualforce page with the required Google News Bar widget, and then adding a new section to the Account detail page where the Visualforce page will be included.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.27.45