Salesforce.com Team DevelopmentCarlos Ramirez Martinez-Eiroa
Index Safe Harbor Statement Team Development Basics Continuous Integration Demo Non-packaged Development Package Dev...
Safe Harbor Statement We don’t have all the answers, but… it’s working! Also, no need to take notes:http://www.soliantco...
Team Development Basics
Team Development Basics Version Control (SVN, Git, ...) Separate Development Environment for each Developer Unit Testin...
Team Development Process1. One developer commits all code to a new repo from a project   connected to the sandbox (1st com...
Repo = GospelDeveloper Org = Scratch Paper
Continuous Integration
What does it do?1. Pulls the code from the repo (from version control) on   a scheduled basis2. Runs all the automated tes...
Advantages Developers don’t need to be running the tests manually  every time they change code There is no need to manua...
DemoSVN + Bamboo
Development
ScenariosA. Non-Package DevelopmentB. Package Development
Scenario A: Non-Package Development Shared Version Control Repository One Developer Sandbox* per Developer Possibly one...
Why Developer Sandboxes? If Developer Orgs are free, why do we need a Developer  Sandbox for each developer?             ...
Main issue to address:  Cost to purchase additional Developer Sandboxes    Can we tell clients that this is a requirement*...
Scenario B: Package Development Shared Version Control Repository One Developer Org per Developer - connected to repo O...
Gotchas
Scenario A: Non-Package Gotchas All changes in production must be replicated in AT  LEAST one developer Sandbox  (they wi...
Scenario B: Package Gotchas I Do NOT create the package until the end - creating a  package will add the namespace prefix...
Scenario B: Package Gotchas II     Use try/catch in webservice calls (same as in      JavaScript)       Calls to methods ...
Namespace Prefix SubstitutionSome of the issues mentioned above can beautomatically handled by this project:    github.com...
Setup & Configuration
Ant Migration Tool Used by Jenkins or Bamboo Can be used from Force.com  IDE, MavensMate, Command Line, ... Extension t...
Ant Migration Tool ConfigBuild.xmlBuild.properties
Resources
 Blog post:  soliantconsulting.com/blog/2013/03/salesforcecomforcecom-team-  development LinkedIn discussion:  linkedin....
Thank You!
Q&A
Upcoming SlideShare
Loading in...5
×

Team Development & Continuous Integration on the Salesforce Platform

2,030

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,030
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
61
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • 1. Artie makes a change (see change in Artie's dev org) 2. Artie commits the change 3. Run Bamboo build 4. Carlos updates SVN 5. See change in Carlos' dev org 6. See change in Test/UAT org
  • Team Development & Continuous Integration on the Salesforce Platform

    1. 1. Salesforce.com Team DevelopmentCarlos Ramirez Martinez-Eiroa
    2. 2. Index Safe Harbor Statement Team Development Basics Continuous Integration Demo Non-packaged Development Package Development Non-packaged Gotchas Package Gotchas ANT Migration Tool Resources Q&A
    3. 3. Safe Harbor Statement We don’t have all the answers, but… it’s working! Also, no need to take notes:http://www.soliantconsulting.com/blog/2013/03/salesforcecomforcecom-team-development
    4. 4. Team Development Basics
    5. 5. Team Development Basics Version Control (SVN, Git, ...) Separate Development Environment for each Developer Unit Testing (Salesforce provides JUnit-like framework) Continuous Integration (Jenkins/Hudson, Bamboo, ...)
    6. 6. Team Development Process1. One developer commits all code to a new repo from a project connected to the sandbox (1st commit)2. Other developers in the team check out the project3. Developers update their local project at the beginning of the day4. Developers commit code to, and update from, the repo one or more times a dayResource: http://www.soliantconsulting.com/blog/2013/03/working-forcecom-ide-and-subversion-svn
    7. 7. Repo = GospelDeveloper Org = Scratch Paper
    8. 8. Continuous Integration
    9. 9. What does it do?1. Pulls the code from the repo (from version control) on a scheduled basis2. Runs all the automated tests3. Deploys to a Test/UAT environment (ANT Migration Tool)4. Notifies team (by email) if there was any issue
    10. 10. Advantages Developers don’t need to be running the tests manually every time they change code There is no need to manually deploy to a test/UAT org for other stakeholders to see the status of the project There is immediate feedback to the team if there is any issue with the code
    11. 11. DemoSVN + Bamboo
    12. 12. Development
    13. 13. ScenariosA. Non-Package DevelopmentB. Package Development
    14. 14. Scenario A: Non-Package Development Shared Version Control Repository One Developer Sandbox* per Developer Possibly one Sandbox for internal testing Definitely one Sandbox for UAT
    15. 15. Why Developer Sandboxes? If Developer Orgs are free, why do we need a Developer Sandbox for each developer?  because of 3rd party managed packages! Usually Salesforce applications have managed packages installed, and references to these packages in Apex and/or VF. Some packages cannot be installed in Developer Orgs because:  They are deprecated  They ask for credentials  Dev orgs are just not supported
    16. 16. Main issue to address: Cost to purchase additional Developer Sandboxes Can we tell clients that this is a requirement*? *Only during development
    17. 17. Scenario B: Package Development Shared Version Control Repository One Developer Org per Developer - connected to repo One Partner Developer Org (20 accounts) for Testing/QA - connected to repo One Developer Org for Packaging - connected to repo Up to 4 different edition orgs for UAT - NOT connected to repo (deploy code as Managed Package)
    18. 18. Gotchas
    19. 19. Scenario A: Non-Package Gotchas All changes in production must be replicated in AT LEAST one developer Sandbox (they will be pulled from this one and add it to the repo) Refresh Sandbox only AFTER all changes have been deployed
    20. 20. Scenario B: Package Gotchas I Do NOT create the package until the end - creating a package will add the namespace prefix to all classes, fields, objects, etc. To avoid prefix issues (so that code can be deployed to multiple Developer Orgs):  Do not use any prefix in Apex code (apex code will work with or without prefix)  Use try-catch in Javascript calls from buttons (show)
    21. 21. Scenario B: Package Gotchas II  Use try/catch in webservice calls (same as in JavaScript) Calls to methods annotated with @webservice from either JavaScript or from an external application need to use the prefix.  To call Apex code from JavaScript in a VF page you can user $RemoteAction (will automatically resolve the namespace)
    22. 22. Namespace Prefix SubstitutionSome of the issues mentioned above can beautomatically handled by this project: github.com/jordanbaucke/sfdc-namespace-prefixGlorified search and replace.Bamboo runs this script after checking out the code fromthe repository, but before deploying it to the packagingorg.
    23. 23. Setup & Configuration
    24. 24. Ant Migration Tool Used by Jenkins or Bamboo Can be used from Force.com IDE, MavensMate, Command Line, ... Extension to Ant Allows you to automate deployment, running tests, ...
    25. 25. Ant Migration Tool ConfigBuild.xmlBuild.properties
    26. 26. Resources
    27. 27.  Blog post: soliantconsulting.com/blog/2013/03/salesforcecomforcecom-team- development LinkedIn discussion: linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionI D=221804807&gid=142613 SVN: subversion.apache.org Git: git-scm.com Jenkins: jenkins-ci.org Bamboo: atlassian.com/software/bamboo
    28. 28. Thank You!
    29. 29. Q&A
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×