After successful development of our application in salesforce, we need
to deploy it to production or any other environment as per our requirement.
Salesforce provides various methods to deploy your code in any other
environment.
Below are the types of methods you can use to deploy your
code.
1.
Change Sets.
2.
Salesforce force.com migration tools – Ant/Java
base
3.
Workbench
4.
Salesforce Package.
Let’s discuss about all different types of tools and their
Limitations and Advantages.
- Change Sets – It is the easiest way to deploy meta-data from one salesforce sandbox to another. It is provided by salesforce and you need to configure change-sets from salesforce sandbox itself. It will work only for connected sandboxes (i.e Developer to Test Sandbox & Test Sandbox to Production Sandbox). We cannot use it between any individual sandbox to migrate meta-data.
Advantages –
Ø
Easy to configure.
Ø
Can deploy selected components from one sandbox
to another.
Ø
UI based deployment.
Limitations –
Ø
Can migrate only between connected Sandboxes
(Developer to Test, Test to Production).
Ø
Need to manually select all components that
needs to be migrated, which is time consuming for large number of components.
- Salesforce force.com migration tools ( Ant/Java base) - Salesforce provides force.com migration tool, which is java base ant migration to deploy meta-data between any sandboxes. It uses command line to deploy code. It also gives flexibility to ‘validate’ your code first and then ‘deploy’ it. It also allows you to configure deployment with or without ‘test classes’. It is useful to deploy large number of components and it gives you control to deploy code according to target sandbox requirement, rather than replicating same components from source Sandbox.
Advantages –
Ø
Useful for enterprise level project to deploy
large number of meta-data components.
Ø
Useful when we need to deploy code to another
developer Sandbox with test class execution.
Limitations –
Ø
Need to configure Ant before deployment, it is one
time activity.
Ø
May not give compilation error in one ‘validation’,
therefore need to validate deployment many times till all compilation errors
are solved.
- Workbench – Workbench is web based tool, which allows you to deploy package by uploading it in workbench. It is good for small package. Like Ant base migration, it allows you to migrate between any Sandbox.
Advantages –
Ø
Easy to deploy by uploading package for limited
components deployment.
Limitations –
Ø
Need to upload proper package for deployment.
Ø
Does not provide option to deploy with test
classes. Therefore not suitable for production deployment.
- Salesforce Package – Salesforce allows you to deploy components using packages. There are two types of packages ‘Manged’ and ‘Unmanged’. It is not recommended to deploy using packages as it may override components if wrong package is deployed. It will also not allows you to validate ‘code coverage’ before deployment.
Packages are useful when you want
to give some functionality which users can’t modify, and just use that
functionality with help of ‘Managed’ Packages.

Comments
Post a Comment