-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learning Force.com Application Development
By :

Salesforce.com established the company as a Customer Relationship Management (CRM) product vender in 1999. The Force.com platform, which is known as Salesforce.com's platform as a service (PaaS) product, was launched in 2007. Force.com is a cloud computing platform that allows for developers to quickly build, share, and run custom business applications over the Internet. When we are developing applications on the Force.com platform, we don't need any additional hardware, additional software, and configuration and maintenance (database and hardware) efforts. The Force.com platform provides three default application categories, which include applications of Salesforce.com CRM. The main categories are as follows;
The Force.com platform runs on Salesforce.com's infrastructures with the main architecture called multitenant architecture. For more details about multitenancy, read the Key features of Force.com platform subsection. The multitenant architecture allows us to build custom applications without purchasing hardware and software licenses and without having to worry about database maintenance. It provides a trusted, configurable and customizable, upgradable, able to integrate, and a secure platform to build our custom applications on.
In traditional software development, we need to manage additional software and hardware, software licenses, networks, database configurations, and maintenance by ourselves. However, the Force.com platform provides these additional features in their cloud computing model. We need to pay only for the things we use, not for all the hardware and software. That's because we get the Force.com platform as a service.
The architecture of the Force.com platform
The preceding figure shows the overview of the Force.com platform. The following table shows you the difference between the traditional platform and the Force.com platform.
Traditional Platform |
Force.com Platform |
---|---|
Supply the core services of Database access |
Form builder (build complete and standard UIs) |
Supply Containers for logic |
Process builder |
Supply Containers for presentation |
Logic and presentation as a service (Apex and Visualforce for custom developments) |
Need to use other software to create our app |
Fully functional reporting and analytical tools |
Additional components to run the data center |
Security |
All of this will end up with additional expenditure |
Sharing model |
Workflow and approvals | |
Full support for the integrations with existing systems | |
Full support for mobile devices | |
Can access the platform through a web browser |
The following are the key features of the Force.com platform:
Multitenancy is the major technology of the Force.com cloud platform. It is used to share the IT resources in a secure and cost-effective way. Let's consider a real-world example to understand the multitenancy. Let's think about a luxury apartment complex with some facilities such as a playground, a swimming pool, and a gymnasium. This apartment complex has multiple owners. Everyone owns a separate apartment and every owner uses the shared playground, the shared swimming pool, and the shared gymnasium. These facilities are equal to a single, shared stack of hardware and software. The apartment is equal to the instance of a single client (a tenant). Therefore, a client has their own apartment with shared facilities and privacy.
The multitenant architecture
There are some advantages of multitenancy, which are as follows:
In traditional software development projects, we have to build or integrate various additional support applications such as login, validations, e-mail functions, reporting, UI, testing, and integrations. You had to repeatedly build these kinds of additional support applications in different projects. The Force.com platform provides the majority of support applications, which are most commonly needed in developing today's business application. For example, the Force.com platform has various features to automate your business process such as reporting, workflow and approvals, e-mail, user authentication, and integrations. These services are common to many software projects. Therefore, we can build applications with more functionality and within a short time period.
With multitenancy, we get secure, fast, reliable, customizable, and upgradable applications. When it comes to custom extensions by multiple tenants, we need to track and keep tenant-specific customizations without affecting the core application. The metadata-driven architecture takes care of that. After multitenancy, metadata-driven architecture is the second most important architecture in the Force.com platform. All the configuration, customization, and coding in the Force.com platform are defined and available as XML. It can be extracted and imported via a set of web services. Simply, metadata is data about data. The metadata-driven model provides the following advantages:
The metadata architecture of Force.com
The preceding figure shows the metadata-driven architecture of Force.com. It creates the separation between the runtime engine, the application data, and metadata. The polymorphic application includes database tables, relationships, UI elements, pages, classes, and so on.
The Force.com platform uses the Model View Controller (MVC) architectural pattern for developing an application:
The Force.com platform provides its own set of programming language, mark-up language, query language, and search language.
Apex, the world's first on-demand language is considered as the programming language of the Force.com platform. Apex is object oriented and the syntax is similar to Java and C#. It allows developers to build the logic with the interaction of existing platform features. According to the MVC architecture, Apex falls into the controller because it is used to write the controller classes and triggers on the Force.com platform. Apex can be used to:
Visualforce is an implementation of MVC architecture. In the Force.com platform, we can develop Force.com applications with custom objects and standard objects. Every object has a standard user interface with one or more page layouts. But we cannot use standard page layouts for complex requirements. Here, Visualforce comes into play.
Visualforce is a web-based user interface framework, which can be used to build complex, attractive, and dynamic custom UIs. Visualforce allows the developer to use standard web development technologies such as jQuery, JavaScript, CSS, and HTML5. Therefore, we can build rich UIs for any app, including mobile apps. We'll be discussing Visualforce with standard web development technologies and Visualforce for mobile in more depth later. Similar to HTML, the Visualforce framework includes a tag-based markup language.
Salesforce Object Query Language (SOQL) allows us to fetch data from Saleforce objects. SOQL syntax is similar to SQL but simpler. For example, SOQL has the SELECT keyword but doesn't contain the INSERT or UPDATE keywords. It is different from SQL as SOQL doesn't have the JOIN keyword. SOQL can be used in Apex code and it provides a powerful feature to manipulate and process data in Apex code.
Salesforce objects are similar to database tables. This will be explained in the next couple of chapters.
Salesforce Object Search Language (SOSL) allows us to search your organization's data from Salesforce objects by specifying a text expression, scope of field to search, list of objects and fields to retrieve, and conditions to select rows in the source objects.
SOQL is used to fetch data from a single object and SOSL is used to fetch data from multiple objects. More about SOSL and SOQL will be discussed in Chapter 7, Custom Coding with Apex.
The Force.com platform provides the facility to integrate with existing applications. There are various advantages of integrating, such as including external systems into our processes, syncing data from multiple sources, and accessing data in other systems. Using an open Simple Object Access Protocol (SOAP) web service, the Force.com API provides access to all the data stored in the application. There are integration benefits as follows:
Force.com sites allow us to create public sites using Salesforce.com data, Visualforce, and standard web technologies such as CSS, JavaScript, and jQuery. Force.com sites are directly integrated with the Salesforce organization and it doesn't require a user authentication using the Salesforce username and password. A Force.com site has the following features and benefits:
With the preceding features, you can build different kinds of applications. But how can you publish and distribute these applications? AppExchange will do it for you. AppExchange is the place to submit your developed applications, which can be directly installed in the client's organization.
AppExchange—the destination for CRM and Force.com apps
When we use Force.com platform to build enterprise applications instead of traditional software development, we will gain the following advantages:
Change the font size
Change margin width
Change background colour