CHAPTER 1 INTRODUCTION About the project: The new way of building and running applications are enabled by the world of cloud computing, where we can access applications, over the Internet as utilities, rather than as pieces of software running on your desktop or in the server room. This model is already quite common for consumer apps like email and photo sharing, and for certain business applications, like customer relationship management (CRM). The Force.com platform is the world's first Platform as a Service (PaaS), enabling developers to create and deliver any kind of business application in the cloud, entirely on-demand and without software. It's a breakthrough new concept that is making companies radically more successful by letting them translate their ideas into deployed applications in record time. Building, sharing, and running business applications have never been so easy. Building and running business applications with traditional software has always been too complex, slow, and expensive. A new model, called cloud computing, has emerged over the last decade to address this problem. Applications that run in the cloud are delivered as a service so companies no longer have to buy and maintain 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CHAPTER 1
INTRODUCTION
About the project:
The new way of building and running applications are enabled by the world of
cloud computing, where we can access applications, over the Internet as utilities,
rather than as pieces of software running on your desktop or in the server room. This
model is already quite common for consumer apps like email and photo sharing, and
for certain business applications, like customer relationship management (CRM).
The Force.com platform is the world's first Platform as a Service (PaaS),
enabling developers to create and deliver any kind of business application in the
cloud, entirely on-demand and without software. It's a breakthrough new concept that
is making companies radically more successful by letting them translate their ideas
into deployed applications in record time. Building, sharing, and running business
applications have never been so easy.
Building and running business applications with traditional software has
always been too complex, slow, and expensive. A new model, called cloud
computing, has emerged over the last decade to address this problem. Applications
that run in the cloud are delivered as a service so companies no longer have to buy and
maintain hardware and software to run them.
Salesforce.com pioneered this model with applications business over the last
decade. More recently, Force.com have opened up the infrastructure and made it
available for anyone building any business application and running it on the servers
using the Force Platform.
The Force Platform allows you to store structured data, implement business
logic with workflow rules, approval processes and custom code, support Web
browsers, integrate with other applications, do reporting and analytics and scale up or
down—all with sub second response time, high availability, and security you need to
run your mission critical business apps.
1
COMPANY PROFILE:
Springboard Competency Development Centre:
Springboard provides competency related services to two vital segments of IT
community, namely:
Fresh engineering graduates, who want to become highly employable
through Springboard Competency Development Program (CDP)
IT organizations that want to recruit high-quality, project-ready engineers.
And, they want to reduce time and budget allocated for training
Our partner organizations can now outsource their Fresher Induction Program to us.
We will put them through either our standard CDP or through a custom-CDP
developed exclusively for our partners.
Learning Model:Springboard uses a unique learning model called Knowledge-Immerse-
Measure (KIM) that helps the participants to reach higher competency standards in a
short span of time. This model ensures the participant gets adequate level of
knowledge, skills and attitude so as to help him / her to get into the world of
professional assignments at ease.
2
Comprehension Development Model:Many face learning difficulty involving the most basic aspect of
technical or on-technical skills. The difficulty lies in the reception, comprehension, or
production of quantitative and spatial information.
One gains knowledge through context (experiences) and understanding. When
one has context, one can weave the various relationships of the experiences.
Vision Statement:
To be a world class service provider in the domains of developing IT
competencies and delivering top quality IT solutions.
Our Values
Professionalism
Maximize Client Satisfaction
Technology Leadership
Employee Care
Integrity
Higher Standards of Quality
Process Driven Delivery
Competency focus:
3
OBJECTIVE:
This is an application project for understanding and demonstrating cloud computing capabilities using Force.com. I use Sales Force features to achieve the goal.
The objective of this application is to develop and deploy an application in the sales force environment.
This application project must satisfy all type of users and should enable all cloud computing capabilities.
It is assumed that this application will be developed in the following environment:
Force.com environment Visualforce as the developing language
\
4
CHAPTER 2
SYSTEM ANALYSIS
Existing system:
As users of the Internet, we're all familiar with the fascinating, innovative,
creative, and sometimes silly ways in which it has changed how we work and play.
From social networking sites to wikis to blogs, and more, it’s exciting to watch the
innovations taking place that are changing the ways we communicate and collaborate.
While these changes have certainly impacted how we work with content, a
similar set of Internet-driven ideas and technologies is changing how we build and
work with business applications.
While yesterday's business applications required thousands, if not millions, of
dollars and sometimes years of professional services help to set up and customize, the
technologies offered by the Internet today make it much easier to create, configure,
and use business applications of all kinds. Indeed, the power of the Internet has given
us the ability to solve new kinds of business problems that, because of complexity or
cost, had previously remained out of reach.
Just as the changes that moved publishing technology from paper to bits made
it possible for us to have information about anything in the whole world right at our
fingertips, the changes in application technology make it similarly possible to imagine
a robust, enterprise-class application for almost any business need. Sound pretty
good? Then you're probably wondering: “What's the magic that makes this possible?”
These new ways of building and running applications are enabled by the world
of cloud computing, where you access applications, or apps, over the Internet as
utilities, rather than as pieces of software running on your desktop or in the server
room. This model is already quite common for consumer apps like email and photo
sharing, and for certain business applications, like customer relationship management
(CRM).
5
Drawbacks of Existing System:
By using the existing system we have to maintain a high configuration system
to run some huge software’s which is used to develop the applications. This may need
huge cost to buy and maintain.
We have to buy the each and every software’s which are used for developing
the applications. Also we have to update the software’s for latest version. This needs
maintenance risks such as economical risk and technical risk.
The main disadvantage of the existing system over cloud environment is lack
of portability. Even though we are having high configured systems and updated
software’s we have to take the system with us when we are moving from one place to
other place. This will create risk to the users.
The main disadvantage of the existing system is lack of disaster recovery. That
means in the case of any disaster occurs all the data available in the system cannot be
recovered. Thus it may leads to the loss of data.
The existing system also needs high initial out lay to set up the system.
Proposed System:
Since there are lot of problems available with the existing system a new
technology is used in this project called as cloud computing. The proposed system in
this project is to develop an application in the cloud computing environment and have
to deploy it and to launch the application in cloud.
The cloud environment used in this project is called as salesforce
environment. A simple application is developed in the cloud environment and
deployed in the same environment using the tools provided there itself. The
application is launched as a site inside the cloud.
The security provided by the platform provider (salesforce) is used in this
application.
6
Feasibility study:
A feasibility study is an evaluation of a proposal designed to determine the
difficulty in carrying out a designated task. Generally, a feasibility study precedes
technical development and project implementation. In other words, a feasibility study
is an evaluation or analysis of the potential impact of a proposed project.
Economic feasibility:
Economic analysis is the most frequently used method for evaluating the
effectiveness of a new system. More commonly known as cost/benefit analysis, the
procedure is to determine the benefits and savings that are expected from a candidate
system and compare them with costs. If benefits outweigh costs, then the decision is
made to design and implement the system. An entrepreneur must accurately weigh the
cost versus benefits before taking an action.
Cost Based Study: It is important to identify cost and benefit factors, which
can be categorized as follows: 1. Development costs; and 2. Operating costs. This
application needs less amount of cost in both development and operating state.
Time Based Study: This is an analysis of the time required to achieve a return
on investments. This application takes less time to execute and to use.
Operational feasibility
Is a measure of how well a proposed system solves the problems, and takes
advantage of the opportunities identified during scope definition and how it satisfies
the requirements identified in the requirements analysis phase of system development.
The proposed system solves all the problems in the existing system in the basis
of time, cost, risk, Etc,.
Technology and system feasibility
The assessment is based on an outline design of system requirements in terms
of Input, Processes, Output, Fields, Programs, and Procedures. This can be quantified
in terms of volumes of data, trends, frequency of updating, etc. in order to estimate
whether the new system will perform adequately or not. Technological feasibility is
carried out to determine whether the company has the capability, in terms of software,
hardware, personnel and expertise, to handle the completion of the project.
The usage of this application over cloud environment simply needs a un
interrupted internet connection of 512kbps of speed.
7
CHAPTER 3
SYSTEM SPECIFICATION
REQUIREMENTS:
External Interface Requirements:
User Requirements:
A high-speed Internet Connection is needed as an interface between the
service provider and User.
User name and Password provided by the administrator is needed to the user
to work with the application.
Hardware Requirements:
Processor : 32 bit Processor
Ram : 512 Mb
Hard Disk: 40 GB
Internet : 512 Kbps high speed internet connection
Software Requirements:
OS : All OS supporting internet browsing.
Environment : Force.com Environment
Language : Visual Force
Functional Requirements
Understand the cloud environment provided by SalesForce.com
Learning VISUALFORCE
Developing an application using Visualforce in the SalesForce.Com
Environment
Deploying the application
Providing the User accounts
Accessing the application from user accounts and should work with the
applications clearly.
8
Other Non-functional Requirements:
Performance Requirements: The performance will be fully based on the Internet connection. The user may
not worry about their local system. The local system will be only used as a terminal.
Safety Requirements: There are the possibilities of data loss due to the interruption of connection in
Internet. So the user must ensure about his uninterrupted internet connection.
Security Requirements: All the security issues will be provided by the service provider itself (SALE
FORCE.COM). No users are allowed to enter and view the details without proper
authentication (password protection).
9
CHAPTER-4
SOFTWARE DESCRIPTION
Front End
Visualforce is a framework that allows developers to build sophisticated,
custom user interfaces that can be hosted natively on the Force.com platform. The
Visualforce framework includes a tag-based mark up language, similar to HTML.
In the Visualforce mark up language, each Visualforce tag corresponds to a coarse or
fine-grained user interface component, such as a section of a page, a related list, or a
field. The behaviour of Visualforce components can either be controlled by the same
logic that is used in standard salesforce.com pages, or developers can associate their
own logic with a controller class written in Apex.
Developers can use Visualforce to create a Visualforce page definition. A page
definition consists of two primary elements:
• Visualforce mark up
• A Visualforce controller
Visualforce Markup
Visualforce markup consists of Visualforce tags, HTML, JavaScript, or any
other Web-enabled code embedded within a single <apex:page> tag. The markup
defines the user interface components that should be included on the page, and the
way they should appear.
Visualforce Controllers
A Visualforce controller is a set of instructions that specify what happens when
a user interacts with the components specified in associated Visualforce markup, such
as when a user clicks a button or link. Controllers also provide access to the data that
should be displayed in a page, and can modify component behaviour.
A developer can either use a standard controller provided by the Force.com
platform, or add custom controller logic with a class written in Apex:
10
• A standard controller consists of the same functionality and logic that is used for a
standard Salesforce.com page.
For example, if you use the standard Accounts controller, clicking a Save
button in a Visualforce page results in the same behaviour as clicking Save on a
standard Account edit page.
If you use a standard controller on a page and the user doesn't have access to
the object, the page will display a insufficient privileges error message. You can avoid
this by checking the user's accessibility for an object and displaying components
appropriately.
• A standard list controller enables you to create Visualforce pages that can display or
act on a set of records. Examples of existing Salesforce.com pages that work with a
set of records include list pages, related lists, and mass action pages.
• A custom controller is a class written in Apex that implements all of a page's logic,
without leveraging a standard controller.
If you use a custom controller, you can define new navigation elements or
behaviours, but you must also reimplement any functionality that was already
provided in a standard controller.
Like other Apex classes, custom controllers execute entirely in system mode, in
which the object and field-level permissions of the current user are ignored. You can
specify whether a user can execute methods in a custom controller based on the user's
profile.
• A controller extension is a class written in Apex that adds to or overrides behaviour
in a standard or custom controller. Extensions allow you to leverage the functionality
of another controller while adding your own custom logic.
Because standard controllers execute in user mode, in which the permissions,
field-level security, and sharing rules of the current user are enforced, extending a
standard controller allows you to build a Visualforce page that respects user
permissions.
Although the extension class executes in system mode, the standard controller
executes in user mode. As with custom controllers, you can specify whether a user can
execute methods in a controller extension based on the user's profile.
11
How is Visualforce Architected?
All Visualforce pages run entirely on the Force.com platform, both when a
developer creates the page, and when an end user requests a page, as shown in the
following architecture diagrams.
Visualforce System Architecture - Development Mode
When a developer finishes writing a Visualforce page and saves it to the
platform, the platform application server attempts to compile the mark up into an
abstract set of instructions that can be understood by the Visualforce renderer. If
compilation generates errors, the save is aborted and the errors are returned to the
developer.
Otherwise, the instructions are saved to the metadata repository and sent to the
Visualforce renderer. The renderer turns the instructions into HTML and then
refreshes the developer's view, thereby providing instantaneous feedback to the
developer for whatever changes were made in the mark up.
The architecture diagrams below shows the process flow when a non-developer
user requests a Visualforce page. Because the page is already compiled into
instructions, the application server simply retrieves the page from the metadata
repository and sends it to the Visualforce renderer for conversion into HTML.
12
Visualforce System Architecture - Standard User Mode
Features of Visualforce:
User-friendly development
Developers can edit their Visualforce mark-up in the same window that
displays the resulting page. Consequently, developers can instantly verify the result of
an edit just by saving their code.
The Visualforce editor pane also includes auto-completion and syntax
highlighting. Visualforce also supports “quick fixes” that allow developers to create
supporting components on the fly.
For example, a developer can define a new Visualforce page simply by logging
in to Salesforce.com and then entering the name of the new page in a URL. Much like
a wiki, if the page does not yet exist, the platform creates it for you.
Integration with other Web-based user interface technologies
Because Visualforce mark-up is ultimately rendered into HTML, designers can
use Visualforce tags alongside standard HTML, JavaScript, Flash, or any other code
that can execute within an HTML page on the platform, including Force.com platform
merge fields and expressions.
13
Model-View-Controller (MVC) style development
Visualforce conforms to the Model-View-Controller (MVC) development
pattern by providing a clear division between the view of an application (the user
interface, defined by Visualforce mark-up), and the controller that determines how the
application works (the business logic, defined by a Visualforce controller written in
Apex).
With this architecture, designers and developers can easily split up the work
that goes with building a new application—designers can focus on the look and feel of
the user interface, while developers can work on the business logic that drives the app.
Concise syntax
Visualforce pages can implement the same functionality as s-controls but with
approximately 90% fewer lines of code.
Data-driven defaults
Visualforce components are rendered intelligently by the platform. For
example, rather than forcing page designers to use different component tags for
different types of editable fields (such as email addresses or calendar dates), designers
can simply use a generic <apex:inputField> tag for all fields. The Visualforce renderer
displays the appropriate edit interface for each field.
Hosted platform
Visualforce pages are compiled and rendered entirely by the Force.com
platform. Because they are so tightly integrated, they display the same performance as
standard Salesforce.com pages, regardless of the amount of data being displayed or
edited.
Automatically upgradeable
Visualforce pages do not need to be rewritten when other parts of the
Force.com platform are upgraded. Because the pages are stored as metadata, they are
automatically upgraded with the rest of the system.
When Should I Use Visualforce:
The Salesforce.com prebuilt applications provide powerful CRM functionality.
In addition, salesforce.com provides the ability to customize the prebuilt applications
14
to fit your organization. However, your organization may have complex business
processes that are unsupported by the existing functionality.
When this is the case, the Force.com platform includes a number of ways for
advanced administrators and developers to implement custom functionality. These
include Visualforce, Apex, and the Force.com Web Services API.
The Technologies behind a Force.com Platform App
Now that we've talked about the kinds of apps the platform can build, let's
review some of the technologies behind the platform itself.
These technologies have a big impact on what the platform supports, and what
it's like to develop on it.
Table 1: Key Technologies behind the Platform
Technology Description
Multitenant
architecture
An application model in which all users and apps share a
single, common infrastructure and code base
Metadata-driven
development model
An app development model that allows apps to be
defined as declarative “blueprints,” with no code
required. Data models, objects, forms, workflows, and
more are defined by metadata.
Force.com Web
Services API
An application programming interface that defines a
Web service that provides direct access to all data stored
in the Force.com platform from virtually any
programming language and platform
Apex The world’s first on-demand programming language,
which runs in the cloud on the Force.com platform
servers.
Visualforce A framework for creating feature-rich user interfaces for
15
apps in the cloud
Force.com Sites Public websites and applications that are directly
integrated with your Salesforce.com organization—
without requiring users to log in with a username and
password
AppExchange
directory
A Web directory where hundreds of Force.com apps are
available to Salesforce.com customers to review, demo,
comment upon, and/or install.
Developers can submit their apps for listing on the
AppExchange directory if they want to share them with
the community.
A Multitenant Architecture
The platform's multitenant architecture means that all users share the same
physical instance and version of any application that runs on it.
In contrast to their single-tenant counterparts, such as client-server enterprise
applications or email servers, multitenant applications are designed so that any
upgrades to the platform or the apps it supports happen automatically for all users at
once Consequently, no one has to worry about buying and maintaining their own
physical stack of hardware and software, or making sure that their applications always
have the latest patch installed.
Besides the Force.com platform, several popular, consumer-based applications
also use a multitenant architecture, including eBay, My Yahoo!, and Google Mail.
Multitenant architecture allows these applications to be low cost, quick to
deploy, and open to rapid innovation—exactly the qualities for which salesforce.com
have also become known.
16
On-Demand, Multitenant Applications that Run in the Cloud
17
The platform's multitenant architecture also impacts how developers use the
platform to create new applications. Specifically, it defines a clear boundary between
the platform and the applications that run on it.
A boundary is important because it allows applications to define their own
components without jeopardizing the functionality of the core platform or the data
stored by other users.
A Metadata-Driven Development Model
The Force.com platform also uses a metadata-driven development model to
help app developers become more productive in putting together apps.
It means that the basic functionality of an app—that is, the tabs, forms, and
links—is defined as metadata in a database rather than being hard-coded in a
programming language.
When a user accesses an app through the Force.com platform, it renders the
app's metadata into the interface the user experiences.
As a result of metadata-driven development, the Force.com platform app
developers work at a much higher level of abstraction than if they developed
applications using Java or C#, and are shielded from having to worry about low-level
system details that the platform handles automatically.
At the same time, Force.com platform developers can also leverage advanced
features that the platform provides by default.
Customizing your app's metadata might sound intimidating, but as you'll see in this
book, the platform's user interface makes it easy. Anyone who is familiar with using a
Web browser can quickly get up to speed, even if he or she doesn't know any
programming languages.
Developers who want to programmatically manage their app's setup can use the
For example, if you want to create a page called “Hello World” and your
salesforce.com organization uses
na3.salesforce.com, enter http://na3.salesforce.com/apex/HelloWorld.
A New Visualforce Page
Module Description:
This project includes the launching of a simple application developed in
salesforce environment using Visualforce and apex.
This application will consists of different modules such as,
Login
Document
Products and Data Entries
Searching Products and sales details
28
Login:
Salesforce development environment needs the login page since the application
is going to be launched as a web application.
It needs proper authentication to enter into the development mode. The
application can be accessed by entering into the site.
The security will be enabled in this page by providing system authentication.
For example if the user is entering from a new system that is unknown to the
force.com environment using the entered ID, Then we have to authenticate the system
by clicking the link sent to our mail ID in that system.
The following figure shows the login page of the salesforce developer
environment.
Login page
29
Documentation:
This is considered as the database section of the application. The required data
can be stored here by specifying the details such as name type and size.
The database in salesforce environment will be also provided in this way. This
documentation details can be editable during the process.
The various documents used for the development of applications are stored
here and their links were used in the application.
Documents storage
30
Data Entry and Products:
This module is developed to enter the details of the product s that are recently
launched in the market by a company.
The new products details and specifications can be Entered here.
This will provide the options of searching in catigories of price , types , etc,.
The key word is enough to find the products.
Product Details Entry
31
Searching products and sales details:
This module is used to see the sales details of the products in market. The
search options can be enabled in both productwise and price list.
The salesmanager can assign works to the others by sending mails and can
verify the trend of sales of the particular product.
32
Security Infrastructure:
One of the core features of a multi-tenant platform is the use of a single pool of
computing resources to service the needs of many different customers.
Salesforce.com protects your organization’s data from all other customer
organizations by using a unique organization identifier, which is associated with each
user's session. Once you log in to your organization, your subsequent requests are
associated with your organization, using this identifier.
Salesforce.com utilizes some of the most advanced technology for Internet
security available today. When you access the application using a Salesforce.com-
supported browser, Secure Socket Layer (SSL) technology protects your information
using both server authentication and data encryption, ensuring that your data is safe,
secure, and available only to registered users in your organization.
For more information about supported browsers, see “Getting Started FAQ” in
the Salesforce.com online help.
In addition, Salesforce.com is hosted in a secure server environment that uses a
firewall and other advanced technology to prevent interference or access from outside
intruders.
Managing profiles:
A profile contains the user permissions that control different functions within
Salesforce.com, the partner portal, and the Customer Portal. Profiles also control:
• Which standard and custom apps the user can view (depending on user license)
• Which tabs the user can view (depending on user license and other factors,
such as access to Salesforce CRM Content)
• Which permissions a user is granted to create, read, edit, and delete records for
each object
• Which page layouts the user sees
• Which console layouts the user sees?
• The field-level security access that the user has to view and edit specific fields
• Which record types are available to the user?
• The hours during which and IP addresses from which the user can log in
33
• Which desktop client’s users can access and related options
Note: This functionality is not available in Developer Edition.
• Whether the user can edit Apex
• Which users can execute methods in a particular top-level Apex class (see
“Setting Apex Class Security” in the Salesforce.com online help?)
• The public access settings for Force.com Sites users
To create, edit, and delete profiles, click Setup ➤ Manage Users ➤ Profiles.
There are standard profiles in every Salesforce.com organization. In Contact Manager,
Group, and Professional Edition organizations, you can assign the standard profiles to
your users.
However, you cannot view or edit the standard profiles or create custom
profiles. In Enterprise, Unlimited, and Developer Edition organizations, you can use
the standard profiles or create, edit, and delete custom profiles.
For the standard profiles, only certain settings can be changed. Each standard
or custom profile belongs to exactly one user license type.
Database:
Database Development Environment:
This Salesforcasting application is developed under the SalesForce.com environment. The application is developed using the language called Visualforce.
The API’s where also provided by the force.com itself. The deployment process and the security issues were also done in the force.com Environment.
At the same time multiple users can work with this application simultaneously to enter or access the details.
34
Position Information in a Table
The overview of the application includes some important phases related to databases like
Design of login table with roll master details:
The login table should consist of the user name and password. The role master is maintained in the database to decide up on the role of the user who is logged in currently.
Design of the product details table:
The product details such as product name, Product ID, Model, Price, Etc, were entered by the data entry person and have been stored in the database. These details where accessed later for the development of Trend analysis and Sales Forecasting.
Design of the sales details table:
The sales details table includes the information’s related to the sales of the particular product, Feedbacks, Rating, current flow of Trend, Salesforcasting. This details where viewed by the sales manager, and product manager.
Storing the analysis reports and feedbacks to provide the sales forecasting reports:
The reports are generated on the basis of the sales of the product and the feedbacks provided by the customers. The reports generated are stored in the database for quick access.
35
CHAPTER 6
TESTING
Unit testing:
“Unit Tests are programs written to run in batches and test classes. Each typically sends a class a fixed message and verifies it returns the predicted answer.”
Unit testing is a software development process in which the smallest testable
parts of an application, called units, are individually and independently scrutinized for
proper operation.
Unit testing is often automated but it can also be done manually. This testing mode is
a component of Extreme Programming (XP), a pragmatic method of software
development that takes a meticulous approach to building a product by means of