Sie sind auf Seite 1von 53

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
downall 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, its 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 softwares which is used to develop the applications. This may need
huge cost to buy and maintain.
We have to buy the each and every softwares which are used for developing
the applications. Also we have to update the softwares 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
softwares 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.

7
The usage of this application over cloud environment simply needs a un
interrupted internet connection of 512kbps of speed.

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

10
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:

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.

11
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.
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

12
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.

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.

13
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.
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 applicationdesigners 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.
14
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
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 An application model in which all users and apps share a


architecture single, common infrastructure and code base

Metadata-driven An app development model that allows apps to be


development model defined as declarative blueprints, with no code
required. Data models, objects, forms, workflows, and
more are defined by metadata.

Force.com Web An application programming interface that defines a


Services API Web service that provides direct access to all data stored
in the Force.com platform from virtually any

15
programming language and platform

Apex The worlds 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
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 A Web directory where hundreds of Force.com apps are


directory 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.

16
Multitenant architecture allows these applications to be low cost, quick to
deploy, and open to rapid innovationexactly the qualities for which salesforce.com
have also become known.

17
On-Demand, Multitenant Applications that Run in the Cloud

18
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 appthat is, the tabs, forms, and
linksis 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
Force.com Platform Metadata Application Programming Interface (API).
The Force.com Metadata API provides an alternative to the platform's user
interface by allowing developers to directly modify the XML files that control their
organization's metadata.

19
Developers can also use the Metadata API to migrate configuration changes
between organizations, and create their own tools for managing organization and
application metadata.
Although at first glance metadata-driven development may seem somewhat
esoteric, it's exactly the same model for how Web browsers work. Instead of hard
coding the definition of a Web page in a free-form programming language, a Web
page author first defines the page as HTML, which is itself a kind of metadata.
When a user requests a page, the Web browser renders the page using the
metadata provided in the HTML tags. Even though the HTML/browser combination
does not allow authors as much formatting power as they might get in a regular
publishing tool, it simplifies the work of publishing content to a wide audience and
increases the Web page author's overall productivity.
Likewise, the Force.com platform vastly simplifies the work of building an app
and increases a developer's overall productivity. And, like Web pages that use
JavaScript or Flash to add functionality to HTML pages, the Force.com platform also
provides ways for more advanced developers to add custom functionality to the apps
you build.
Visualforce
Visualforce consists of a tag-based mark-up language that gives developers a
more powerful way of building applications and customizing the Salesforce.com user
interface. With Visualforce you can:
Build wizards and other multistep processes
Create your own custom flow control through an application
Define navigation patterns and data-specific rules for optimal, efficient
application interaction.
Apex
Use Apex if you want to:
Create Web services
Create email services
Perform complex validation over multiple objects
Create complex business processes that are not supported by workflow

20
Create custom transactional logic (logic that occurs over the entire transaction,
not just with a single record or object)
Attach custom logic to another operation, such as saving a record, so that it
occurs whenever the operation is executed, regardless of whether it originates in
the user interface, a Visualforce page, or from the Web Services API
Force.com Web Services API
Use standard Force.com Web Services API calls if you want to add
functionality to a composite application that processes only one type of record at a
time and does not require any transactional control (such as setting a Save point or
rolling back changes).

Common Issues Creating Visualforce Pages:


The following are a list of things to watch out for when creating Visualforce
pages:
Verify that your component tags start with apex:, that is, apex is followed by a
colon.
Pay attention to warnings and errors, and make sure that your tags are well-
formed, and that each opening tag has a closing tag.
Make sure that quotes and brackets match, that every quote and bracket has a
match.
Verify that the controller or controller extension name are correct.

21
CHAPTER 5
PROJECT DESCRIPTION
Problem Definition:
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. A building, sharing, and running business application has never been so easy.

This is an application project for understanding and demonstrating cloud


computing capabilities using Force.com. We use Sales Force features to achieve the
goal.
The scope of this project is limited based on the application developed in
force.com.
To develop an application for sales forecast details.
- Provide the Sales forecast details of a company product.
- Ease of access and use
- Secured analysis(confidentiality)
- Views about current status

Overview of the project:

This project deals with the concept of cloud computing. This cloud computing
capabilities will be achieved by using the salesforce environment.

The main theme of this project is to develop an application in sales force


environment. The entire set up will be provided by the salesforce.

The application will be developed in the languages called Visualforce and apex.
The two languages will be particularly used in sales force to develop the web based
applications.

22
Initially the user has to register with the salesforce and have to get his ID. This
user ID will be used to enter into the salesforce application development environment.
The environment will be furtherly used to develop the applications.

The pages setup inside this application will be used to customize the
application. There are lots of tabs and links can be created here.

The developer needs to register with the salesforce environment. The


application needs to develop in this environment itself.

The application will be completed and launched as a site. This site will work as
an application.

Platforms for Cloud Computing

A new twist, the platform in the cloud, is making the delivery of application
functionality even more interesting. Increasingly, applications that run in the cloud are
starting to look less like websites and more like platforms, meaning they are starting
to sprout Application Programming Interfaces (APIs), code libraries, and even
programming models. Collectively, these new kinds of development technologies can
be thought of as platforms to run apps in the cloud.
Similar to traditional platforms, cloud computing platforms provide tools that
allow developers to leverage existing functionality to create something new; however,
because these platform tools are accessed freely over the Internet rather than through
an operating system or package that was installed on a local machine, developers don't
need to worry about the logistics of putting together an executable that will be
installed on a user's machine. Anyone with a Web browser can access it!
The possibilities presented by this new type of platform have emerged quickly,
spurred on by the popularity of mash-upsa website or application that combines
tools from multiple cloud computing platforms to create new functionality.
Some of the cloud computing platform tools used in today's mash-ups includes
innovations like Google's search API, which allows developers to use the power of
that search engine in their applications, eBay's APIs for auctions and listings, or
Amazon.com's system for creating entirely new storefronts.

23
For example, almost any real estate website or application these days uses
Google or Yahoo! maps under the hood, illustrating how these new APIs are now
commonly running alongside the more traditional database, app server, or operating
system platforms.

About Developer Force


Developer Force is a community of developers who customize and build
applications that run in the cloud and are built with the Force.com platform.
Developer Force members have access to a full range of resources, including
sample code, toolkits, an online developer community, and the test environments
necessary for building apps.
The Developer Force website includes an online version of this book and has
information about the Dream force event that we hold every year for Force.com
platform developers.
If you need more info, have a question to ask, are seeking a toolkit or sample,
or just want to dig a little deeper into Force.com platform development, Developer
Force is where it all comes together.

The Basics of an App:


If you haven't used Salesforce.com before, you'll find it worthwhile to log in
and spend a bit of time clicking around.
Most Salesforce.com editions (including Developer Edition) have a basic
Salesforce.com SFA app, so we'll start by looking at that.
The interface for these tasks has a lot in common with the interface of whatever
app you're planning to build.
Tabs
As you can see when you start clicking around, there are a few key elements
that form the foundation of the Sales Automation app and of most applications created
with the platform. First, across the top of the app is a set of tabs that segment the app
into different parts.

24
Each tab corresponds to a type of object, such as an account or contact, and
within a tab you can perform actions on particular records of that tab's type.
For example, when you click on the Accounts tab, you can create a new record
for the Acme account. You can also edit existing accounts, or use a list view to filter
lists of accounts by certain criteria. Most app development work revolves around
creating tabs and defining the data and behaviours that support them.
Forms
A second key element is the form that is displayed as part of a tab. As in any
business app, forms are the primary means of entering and viewing information in the
system.
Forms allow you to view and edit the data associated with a particular record
on a tab, like the contact Jerome Garcia on the Contacts tab.
When developing a new app you can define what information appears in each
form, and how it is organized.
For example, the form for a contact record includes fields such as Last Name,
Home Phone, Mailing City, Title, Birth date, Reports To, and Account.
In a Force.com platform app, the form used to enter information is referred to
as an edit page and the read-only view of that information is referred to as a detail
page.
Links
Finally, because Force.com platform apps are delivered via a Web browser,
they use links to provide navigation to related data.
For example, on an account detail page, there are links to related records, such
as the contacts that belong to the account and the sales user who manages the account.
Other links take you to recently visited records and to areas of the app where
users can set personal preferences. These links provide navigation both within an app
and out into the Web.

25
Force.com Platform Apps Include Tabs, Detail Pages, and Links

Steps to work with salesforce.com

Open the home page of salesforce using the URL www.salesforce.com


Click on customer login. If you are already having account means enter your
user name and password, otherwise create a new account by clicking on the
sign up for free option.
After entering into the personal account Click the Setup link in the top-right
corner of the page
Go to the App Setup area on the left side of the page.
Click the + icon to expand the Create menu, or just click the Create link.
Click the objects link.
Select new custom object. A new window will be opened.
Enter the Label name and select all the options from optional features and
option creation options
Click save
Select the tab style and click next.

26
Accept the default things and click next again.
Deselect all the checkboxes in the new window and click save.
Go to the Custom Fields & Relationships and click on new
Select an data type and click next (Ex. Date)
Enter the field name and field label and description (optional).
Click next
Accept the default things and click next again
Now click save in the current page.
o (Note: If we want to add more fields means, we can select save and new
option)
Now we have to create an application.
Select the Apps option from the list shown in the left side of the window, a
new page will be shown.
Click on the option new
Enter the label name and description (optional)
Insert the image to be shown in the front page. Otherwise accept the default
picture of salesforce.com and click next
The tabs available in exists will be shown. Select the tabs needed in that, and
click next.
Select the Visible checkbox for all and click on save.

Selecting applications

27
Now the new application is created
The created application will be selected from the dropdown box from the
topmost right corner as shown below.
The labels created were shown in the application. We can select the appropriate
labels and can make use of the fields inside it.

Coding:
Go to the App Setup area on the left side of the page.
Click the + icon to expand the Develop menu, or just click the Develop link
Select the pages link
Click new
Enter the label name to be customized and enter the codlings.
Click on save.
With Visualforce development mode enabled, you can create your first
Visualforce page by entering a URL for the page in your browser's address bar
as follows:
https://Salesforce.com_instance/apex/myNewPageName
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


28
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

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.

29
Login page

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.

30
Documents storage

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.

31
Product Details Entry

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 organizations data from all other customer


organizations by using a unique organization identifier, which is associated with each

33
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
Which desktop clients 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
34
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 APIs 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.

Position Information in a Table

35
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 informations 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.

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
36
development that takes a meticulous approach to building a product by means of
continual testing and revision.

Tested Conditions:
Normal Conditions
Test a Variety of States
Edge Cases
Bad Input Values

Boundary Conditions

Also
Regressions

Force.com-specifics
Triggers, Apex Callouts, Limits, etc.

Properties of Good Unit Tests


Thorough

Repeatable

Automatic

Independent

Thorough
75% code coverage (At least!)

37
Uses Lots of Asserts:
System.assert();

System.assertEquals();

System.assertNotEquals();
Repeatable
Tests work in all environments: Dev / Test / Prod

Tests create data.

No hard-coded Ids!
Automatic
Not Manual!
Independent
Test one aspect of your code at a time.

Tests shouldnt depend on each other.

Acceptance Testing:

User Acceptance Testing is often the final step before rolling out the
application.

Usually the end users who will be using the applications test the application
before accepting the application.

This type of testing gives the end users the confidence that the application
being delivered to them meets their requirements.

This testing also helps nail bugs related to usability of the application.

38
This application has been tested by using the users and the feedback has been
considered.

Implementation:

Salesforce.com organizations contain valuable information about partners,


solutions, products, users, ideas, and other business data. Some of this information
would be useful to people outside your organization, but only users with the right
access and permissions can view and use it.
In the past, to make this data available to the general public, you had to set up a
Web server, create custom Web pages ( JSP, PHP, or other), and perform API
integration between your site and your organization.
Additionally, if user wanted to collect information using a Web form, you had
to program your pages to perform data validation.
With Force.com sites, we no longer have to do any of those things. Force.com
sites enables you to create public websites and applications that are directly integrated
with your Salesforce.com organizationwithout requiring users to log in with a
username and password.
User can publicly expose any information stored in your organization through a
branded URL of your choice. User can also make the site's pages match the look and
feel of your company's brand. Because sites are hosted on Force.com servers, there are
no data integration issues.
And because sites are built on native Visualforce pages, data validation on
collected information is performed automatically. User can also enable users to
register for or log in to an associated portal seamlessly from your public site.
The following examples illustrate a few ways that you can use sites:
o Create an ideas site Use sites to host a public community forum for
sharing and voting on ideas about your company, services, or products.
Ideas websites can be made public using sites.
o Publish a support FAQ Provide helpful information on a public
website where customers can search for solutions to their issues.
o Create a store locator tool Add a public tool to your portal that helps
customers find stores in their area.

39
o Publish an employee directory Add an employee directory to your
company's intranet by creating a site restricted by IP range.
o Create a recruiting website Post job openings to a public site and
allow visitors to submit applications and resumes online.
o Publish a catalogue of products List all of your company's products
on a public website, with model numbers, current prices, and product
images pulled dynamically from your organization.

The implemented link is http://free-12415f14c3a-124e539428a-


12663d6675b.force.com/trendanalysis

Conclusion:

Force.com sites enables you to create public websites and applications that are
directly integrated with your Salesforce.com organizationwithout requiring users to
log in with a username and password. You can publicly expose any information stored
in your organization through pages that match the look and feel of your company's
brand. Use sites to create public community sites to gather customer feedback,
branded login and registration pages for your portals, Web forms for capturing leads,
and so on.

Because sites are hosted on Force.com servers, there are no data integration
issues. And because sites are built on native Visualforce pages, data validation on
collected information is performed automatically. You can allow users to access your
site through your unique Force.com domain and URL, or you can register your own
branded domain or sub domain to redirect to your site.

This all will enable us to develop and use an application in reliable and
comfortable way.

Future Enhancements:

40
Enhancing the application development with all the available languages such as
java, .Net, PHP...Etc, since the application is currently developed using apex and
Visualforce only.

CHAPTER 9

APPENDIX

Code:

Code used for site login:

<apex:page id="loginPage" showHeader="false" title="{!$Label.site.site_login}">

<apex:composition template="{!$Site.Template}">

41
<apex:define name="body">

<center>

<apex:panelGrid bgcolor="white" columns="1" style="align: center;">

<br/><br/>

<apex:panelGrid width="758" cellpadding="0" cellspacing="0" bgcolor="white"


columns="1" style="text-align:left; border:1px solid #ccc;"> <br/>

<apex:outputPanel layout="block" style="background-color: white; border: 1px solid


#ccc; padding: 0px; margin-top: 10px; margin-bottom: 0px; margin-left: 10px;
margin-right: 10px;">

<apex:panelGrid width="758" cellpadding="0" cellspacing="0" bgcolor="white"


columns="2">

<apex:image url="{!$Site.Prefix}{!$Label.site.img_path}/clock.png"/>

<apex:panelGroup > <br/>

<apex:outputText style="font-size: larger; font-weight: bold;" value="{!


$Label.site.login}"/><br/>

<c:SiteLogin id="siteLogin"/><br/>

</apex:panelGroup>

</apex:panelGrid>

</apex:outputPanel>

<c:SiteFooter />

</apex:panelGrid>

</apex:panelGrid>

</center><br/>

42
</apex:define>

</apex:composition>

</apex:page>

Code used for site registration:

<apex:page id="Registration" showHeader="false"

controller= "SiteRegisterController" title="{!$Label.site.register}">

<apex:composition template="{!$Site.Template}">

<apex:define name="body">

<center>

<apex:panelGrid bgcolor="white" columns="1" style="align: center;">

<br/>

<br/>

<apex:panelGrid width="758" cellpadding="0" cellspacing="0"


bgcolor="white" columns="1" style="text-align:left; border:1px solid #ccc;">

<br/>

<apex:outputPanel layout="block" style="background-color: white; border:


1px solid #ccc; padding: 0px; margin-top: 10px; margin-bottom: 0px; margin-left:
10px; margin-right: 10px;">

<apex:panelGrid width="758" cellpadding="0" cellspacing="0"


bgcolor="white" columns="2">

<apex:image url="{!$Site.Prefix}{!$Label.site.img_path}/clock.png"/>

<apex:panelGroup >

<br/>

<apex:outputText style="font-size: larger; font-weight: bold;" value="{!


$Label.site.user_registration}"/>

<br/>

<apex:form id="theForm" forceSSL="true">

43
<apex:pageMessages id="error"/>

<apex:panelGrid columns="2" style="margin-top:1em;">

<apex:outputLabel value="{!$Label.site.username}" for="username"/>

<apex:inputText required="true" id="username" value="{!username}"/>

<apex:outputLabel value="{!$Label.site.community_nickname}"
for="communityNickname"/>

<apex:inputText required="true" id="communityNickname"


required="true" value="{!communityNickname}"/>

<apex:outputLabel value="{!$Label.site.email}" for="email"/>

<apex:inputText required="true" id="email" required="true" value="{!


email}"/>

<apex:outputLabel value="{!$Label.site.password}" for="password"/>

<apex:inputSecret id="password" value="{!password}"/>

<apex:outputLabel value="{!$Label.site.confirm_password}"
for="confirmPassword"/>

<apex:inputSecret id="confirmPassword"

value="{!confirmPassword}"/>

<apex:outputText value=""/>

<apex:commandButton action="{!registerUser}" value="{!


$Label.site.submit}" id="submit"/>

</apex:panelGrid>

</apex:form> <br/>

</apex:panelGroup>

</apex:panelGrid>

</apex:outputPanel>

<c:SiteFooter />

</apex:panelGrid>

44
</apex:panelGrid>

</center> <br/>

</apex:define>

</apex:composition>

</apex:page>

Code to setup the default page during construction time:

<apex:page showHeader="false" title="{!$Label.site.in_maintenance}">

<apex:composition template="StdExceptionTemplate">

<apex:define name="icon">

<apex:image url="{!$Site.Prefix}{!$Label.site.img_path}/warning.gif"/>

</apex:define>

<apex:define name="error">

<apex:outputText escape="false" style="font-size: larger; font-weight: bold;"


value="{!$Label.site.down_for_maintenance}">

<apex:param value="{!$Site.CurrentSiteUrl}"/>

</apex:outputText>

<br/> <br/>

<apex:outputText value="{!
$Label.site.sorry_for_inconvenience_back_shortly}"/>

<apex:outputText escape="false" value=" {!$Label.site.get_in_touch}">

<apex:param value="mailto:{!$Site.AdminEmailAddress}"/>

<apex:param value="{!$Label.site.email_us}"/>

</apex:outputText>

</apex:define>

</apex:composition>

45
</apex:page>

Default home page:

<apex:page sidebar="false" showheader="false">

<h1><center>Welcome to SalesForecasting</center></h1><br></br>

Hello {!$User.FirstName}!

<br></br> <br></br>

This is your Home Page

<br></br>

<style>

.activeTab {background-color: #236FBD; color:green; background-


image:https://ap1.salesforce.com/015900000009LGL}

.inactiveTab { background-color: lightgrey; color:black; background-image:none}

</style>

<apex:tabPanel switchType="client" selectedTab="name2" id="AccountTabPanel"

tabClass="activeTab" inactiveTabClass="inactiveTab">

<apex:tab label="Home" name="name1" id="tabOne">

<apex:image id="Image"
value="https://ap1.salesforce.com/servlet/servlet.ImageServer?
id=015900000009LGQ&oid=00D90000000HnwA&lastMod=1270280658000"
width="220" height="55"/>

<!-- A simpletoolbar -->

<br></br><br></br>

<apex:toolbar id="theToolbar">

<apex:outputText value="Other Links for reference"/>

<apex:toolbarGroup itemSeparator="line" id="toobarGroupLinks">

<apex:outputLink value="http://www.salesforce.com">

46
salesforce

</apex:outputLink>

<apex:outputLink value="http://developer.salesforce.com">

apex developer network

</apex:outputLink>

</apex:toolbarGroup>

<apex:toolbarGroup itemSeparator="line" location="right"


id="toobarGroupForm">

<apex:form id="theForm">

<apex:inputText id="theInputText">Enter Text</apex:inputText>

<apex:commandLink value="search" id="theCommandLink"/>

</apex:form>

</apex:toolbarGroup>

</apex:toolbar>

<apex:image id="theImage"
value="https://ap1.salesforce.com/servlet/servlet.ImageServer?
id=015900000009NKA&oid=00D90000000HnwA&lastMod=1271762922000"
width="1200" height="400"/>

</apex:tab>

<apex:tab label="Products" name="name2" id="tabTwo">

<apex:outputLink value="https://na7.salesforce.com/01t/o">

Products

</apex:outputLink>

</apex:tab>

</apex:tabPanel>

</apex:page>

47
Screenshots:

48
49
50
51
52
53

Das könnte Ihnen auch gefallen