06/26/2014

Salesforce Environment

ABSTRACT

To get started with Force.com, all you need is a computer and an internet connection. What you don’t need are application servers, web servers, databases, and the costly provisioning and configuration of these resources. Instead, the Force.com platform provides an environment, also called organizations, which are simply provisioned in the cloud when you request them. An environment lets you instantly start developing and testing your cloud computing application, and you don’t need to touch a single server. You save precious time and can start building your application immediately.

Salesforce cloud - AhaApps

WHAT IS AN ENVIRONMENT?

In Force.com terminology, environments and organizations are synonyms. In other words, an instance of the Force.com platform is an environment and is also called an organization, which is frequently shortened to org. Throughout this article, environments and organizations will be used interchangeably. A good way to think about an instance of Force.com, is to think about Gmail: when you sign up for Gmail, you get a unique username and access to your private email account in the cloud. Similarly, when you sign up for a Force.com org, you get a unique username and private access to your Force.com cloud computing environment. Here are some important characteristics of an environment:

 

  • Can be used for development, testing and/or production
  • Contains data (records) and customizations (Custom Database Objects & FieldsApex Code, Visualforce, Workflow, etc.)
  • Each environment is based on an edition, which contains specific functionality, objects, storage and limits
  • By default, environments are not provisioned with certain advanced features (such as multi-currency or developer preview technology). You can request enablement of advanced functionality by contacting salesforce.com Customer Support
  • All environments can be accessed through a Web browser, but some can also be accessed from the Force.com IDESOAP API, and the Metadata API

 

So an environment is an instance of the Force.com infrastructure and platform that lets you access, deploy or create applications with various feature sets, depending on the configuration of the environment.

 

Types of Environments

 

Broadly speaking, there are three types of environments:

  • Production Environments – Salesforce.com environments that have active paying users accessing business critical data
  • Development Environments – Salesforce.com environments where you can extend, integrate and develop on Force.com without affecting your production environments
  • Test Environments – These can be Production or Development Environments specifically used for testing application functionality before deploying to production or releasing to customers

 

As you spend more time with Force.com, you’ll notice you can implement many features within the production environment. For instance, you can easily build a custom object, field, or validation rule directly in your production environment without the need of a development or test environment. However, some features, like Apex Code, can only be created in development environments. Salesforce always recommends that you use a development environment when building a Force.com app. You can then use Force.com IDE and/orPackaging to deploy to production or commercial customers.

 

Typical Use of Environments

 

Depending on your relationship with salesforce.com, you may need one or more of these types of environments. If you are a customer or prospect, you will use a production environment to run your business. If you are a developer or partner, you will most likely have multiple development and test environments to build functionality and thoroughly test. If you are a customer, developer and partner, then you’ll have all of the above. Registered partners are eligible for additional environment options that are outlined below.

 

Environment Licenses and Upgrading

 

It is important to note that each environment has a license. This license is used to describe the type of environment. There are 4 production licenses: Group Edition, Professional Edition, Enterprise Edition and Unlimited Edition. Environment licenses can change, but they can only go up in edition, not down. So you can start with Group Edition, upgrade to Professional Edition, upgrade to Enterprise Edition and finally upgrade to Unlimited Edition. You cannot go the opposite way. So once you reach Enterprise Edition, you can only upgrade to Unlimited and not downgrade to Professional or Group Edition. Depending on the license you purchase, Force.com Edition will either run on top of Enterprise or Unlimited Edition. Therefore, you can transition from the Enterprise version of Force.com Edition to the Unlimited version, but not vice versa.

 

Developer Edition is a special development license that does not allow the conversion to production. The same is true for Sandbox. You cannot upgrade Sandbox, but you can purchase additional or different types of Sandbox if you have Enterprise, Unlimited or Force.com Edition.

 

Please note: Upgrading a license is different than upgrading the platform. When we release a new version of the Force.com platform, all editions and licenses are upgraded to this new release automatically. For example, as you read this article, all environments are on a particular release. When the next release goes live, all environments (which includes the various editions and licenses) will automatically be upgraded to the new release. See the Release Information page for more information about current releases.

PRODUCTION ENVIRONMENTS

Production Force.com environments store the live data that is actively used to run your business. Most of the production environments in use today are Salesforce CRM customers who purchased Group Edition, Professional Edition, Enterprise Edition, or Unlimited Edition. If you do not require any of the Salesforce CRM functionality, you can sign up for Force.com Edition.

 

When developing an application to use internally, you typically know the features and limits of your production environment. However, as a partner looking to build a Force.com application with commercial intent, it’s important to understand the different environments, thereby ensuring that the application you build will work in the desired environment. You can find a detailed feature comparison guide of the production Sales CloudService Cloud and Force.com Edition environments on their respective pages.

 

You can develop a custom Force.com application for your own production use, for existing salesforce.com customers, or for any business or organization in the world. When building an application, it is recommended you use a development environment.

DEVELOPMENT ENVIRONMENTS AND BEST PRACTICES

Development environments are used strictly for developing and testing apps. These environments contain test data that are not business critical. Development can be done inside your browser or with the Force.com IDE, which is based on Eclipse. There are two types of development environments: Developer Edition and Sandbox.

 

Developer Edition environment is a free, fully-featured copy of the Enterprise Edition environment, with less storage and users. DE is a logically separate environment, ideal as your initial development environment. You can sign-up for as many DE organizations as you need. This allows you to build an application designed for any of the Salesforce production environments.

 

Sandbox is a nearly identical copy of your production environment available to Enterprise or Unlimited Edition customers. The sandbox copy can include data, configurations, or both. It is possible to create multiple sandboxes in your production environments for a variety of purposes without compromising the data and applications in your production environment.

 

Note: Since Force.com Edition runs on top of Enterprise or Unlimited Edition, you can potentially have the same number of Sandboxes listed below.

 

The multiple variations of these two environments are outlined in the table below:

Development EnvironmentUser LicensesData StorageAPI Enabled*Notes
Developer Edition2 full CRM licenses 3 Force.com Platform licenses and more…5 MBYesSign-up is Free!
Partner Developer Edition¹20 full CRM licenses 20 Force.com Platform licenses and more…and more…250 MB(about 125,000 records)YesThis is a DE org with more storage, features and licenses. Free for enrolled partners.
Full-copy Sandbox²Same as production environmentYesThis is a nearly identical copy of your production org including data and customization. You may order up to a maximum of 3 full sandboxes. Unlimited Edition includes 1 full sandbox. Enterprise Edition customers may purchase a full-copy sandbox for an additional fee.
Partial Data SandboxSame as production environment5 GBYesPartial Data sandboxes include all of your organization’s metadata and add a selected amount of your production organization’s data that you define using a sandbox template. A Partial Data sandbox is a Developer sandbox plus the data you define in a sandbox template. It includes the reports, dashboards, price books, products, apps, and customizations under Setup (including all of your metadata). Additionally, as defined by your sandbox template, Partial Data sandboxes can include your organization’s standard and custom object records, documents, and attachments up to 5 GB of data and a maximum of 10,000 records per selected object. A Partial Data sandbox is smaller than a Full sandbox and has a shorter refresh interval. You can refresh a Partial Data sandbox every 5 days.
Developer Sandbox²Same as production environment1 GBYesDeveloper Pro sandboxes copy all of your production organization’s reports, dashboards, price books, products, apps, and customizations under Setup, but exclude all of your organization’s standard and custom object records, documents, and attachments. You can refresh a Developer Pro sandbox once per day.
Developer SandboxSame as production environment200 MBYesDeveloper sandboxes are special configuration sandboxes intended for coding and testing by a single developer. Multiple users can log into a single Developer sandbox, but their primary purpose is to provide an environment in which changes under active development can be isolated until they’re ready to be shared. Just like Developer Pro sandboxes, Developer sandboxes copy all application and configuration information to the sandbox. You can refresh a Developer sandbox once per day.

* This includes both the Force.com Web Services and Metadata API – limits can be found here
1.0Available for registered Force.com ISV and Consulting Partners
2. You can refresh each sandbox 29 days from its previous refresh or creation

 

Developer Edition is ideal if:

 

  • You are a partner who intends to build a commercially available Force.com app by creating a managed package for distribution through AppExchange and/or Trialforce. – NOTE: Only Developer Edition or Partner Developer Edition environments can create managed packages
  • You are a salesforce.com customer with a Professional, Group, or Personal Edition, and you do not have access to Sandbox
  • You are a developer looking to explore the Force.com platform for FREE!

 

Partner Developer Edition is ideal if:

 

  • You are developing in a team and you require a master environment to manage all the source code – in this case each developer would have a Developer Edition environment and check their code in and out of this master repository environment
  • You expect more than 2 developers to log in to develop and test
  • You require a larger environment that allows more users to run robust tests against larger data sets

 

Sandbox is ideal if:

 

  • You are a salesforce.com customer with Enterprise, Unlimited, or Force.com Edition, which includes Sandbox
  • You are developing a Force.com application specifically for your production environment
  • You are not planning to build a Force.com application that will be distributed commercially
  • You have no intent to list on the AppExchange or distribute through Trialforce

 

Best Practices and Development Considerations

 

  • Always develop in a development environment (like Developer Edition (DE) or Sandbox) and deploy to a production environment
  • Determine early on if you need a larger development environment, as DE cannot be upgraded to Partner DE
  • If you plan to build an app for existing Salesforce CRM customers, review the supported features of each edition, so you build your application accordingly. In other words, do not assume that if a feature is available in your Developer Edition environment, that it is also available to customers who may be using Group or Professional Edition
  • Always test your application before deployment (review the next section for more information)
  • Keep your development and testing environments separate

TESTING ENVIRONMENTS AND BEST PRACTICES

Before you deploy your app to production or release it to customers, migrate your app to a dedicated testing environment where you can perform integration tests with large sets of data, do security checks for multiple users and profiles, and uncover bugs or discover enhancements you’d like to add. Automated test scripts can’t determine a user’s level of satisfaction with your app, so you’ll want to train several new users to evaluate your application in a real-world setting without affecting your business data. In essence, you’ll want to create another development environment that mimics your production environment, and have beta testers use it. You have multiple options for creating a dedicated testing environment. One is to create a sandbox copy of your production environment and deploy directly from your development environment to your sandbox. In this way, you’ll test not only the finished application, but the procedure used to deploy the completed application as well.

 

If you don’t have a sandbox, you can use a DE environment as your testing environment. The standard DE environment may be limiting because of license and storage limits. However the table below outlines larger test environments available to partners, customers, and developers:

Testing EnvironmentUser LicensesData StorageAPI Enabled*Notes
Partner Test Edition(Enterprise/Platform Edition)¹25 full CRM licenses 20 Force.com Platform licenses and more…1 GB(about 1,000,000 records)YesThis is Enterprise Edition with more storage, features, licenses and 3 Sandbox orgs
Partner Test Edition(Professional Edition) ¹10 PE licenses and more…1 GB(about 1,000,000 records)YesThis is Professional Edition with more storage, features, licenses and the ability to install Beta Managed Packages
Sandbox²See Development Environments for details

* This includes both the Force.com Web Services and Metadata API – limits can be found here

 

1. Available for registered Force.com ISV and Consulting Partners

 

2. You can refresh each sandbox 29 days from its previous refresh or creation

 

Partner Test Edition (Enterprise/Platform Edition) is ideal if:

 

  • You are a partner looking for a production-like environment with more users and storage to run real-life tests
  • You are a partner developing a managed package to release commercially and you need a sandbox to test your beta managed package
  • You want to be sure your app will run smoothly in Enterprise and Force.com Editions

 

 

Partner Test Edition (Professional Edition) is ideal if:

  • You are a partner looking for a production-like environment with more users and storage to run real-life tests
  • You are a partner developing a managed package to release commercially and you need to test your beta managed package against Professional Edition. NOTE: This special Professional Edition test environment will allow the install of beta managed package
  • You want to be sure your app will run smoothly in Professional Edition

 

Sandbox is ideal if:

  • You want to test against a copy of your production environment (including production customization and data)
  • You have an Enterprise, Unlimited, or Force.com Edition environment with a sandbox
  • You want to test a beta managed package

 

Best Practices and Testing Considerations

  • Partners can take advantage of additional test environments. Visit Partner Development & Test Environments for more details
  • If you are developing a Force.com app that leverages Apex Code, you will need to ensure that you have included test methods with greater than 75% code coverage to deploy. For more help, check out An Introduction to Apex Code Test Methods
  • Always test your app before deployment
  • Always test your app as a beta-managed package before releasing. For more help, check out An Introduction to Packaging

SCENARIOS

Now that you have a better understanding of environments and what’s available for you to leverage, let’s take a look at a few scenarios that outline what a customer, developer, and partner may experience.

 

Scenario 1: You are a Developer looking to get started for free building a Force.com application

 

  • Sign up for a free Developer Edition environment here
  • Begin building on Force.com and using all of the platform features
  • Sign up for another free Developer Edition to test your application
  • Use the Force.com IDE to develop and deploy your application from development to test to production

 

Scenario 2: You are a Customer who wants to build a new Force.com application for your production environment

 

  • Get a free Developer Edition organization or set up a sandbox (depending on your production environment)
  • Use another Developer Edition or sandbox environment to test your application’s functionality
  • Sign up for another free Developer Edition to test your application
  • Use the Force.com IDE to develop and deploy your application to production

 

Scenario 3: You are a Partner who wants to build a Force.com application to sell

 

  • Sign up for a free Developer Edition or Partner DE organization
  • Use the Force.com IDE to develop your application
  • Package your app and upload it as a beta managed package
  • Test your beta managed package in sandbox, DE and/or the Partner Test environments
  • Upload the package as a released managed package and deploy it to your customers

 

Scenario 4: You are a Partner who wants to build and sell a composite app that integrates with Force.com

 

  • Sign up for a free Developer Edition or Partner DE organization. Both environments include access to the various Force.com APIs that can enable you to build your integration
  • Use the Force.com IDE to develop your application
  • Package your app and upload it as a beta managed package
  • Test your beta managed package in sandbox, DE and/or the Partner Test environments
  • Upload the package as a released managed package and deploy it to your customers

SUMMARY

This article provides an overview of the various Force.com environments. The Force.com platform provides a variety of robust environments for developing and testing. Whether you are a developer looking to build a Force.com app for your production environment or a partner looking to commercialize your next SaaS app on Force.com, there are many environments you can leverage throughout the app life-cycle.