Tips On Passing The Advanced Developer (DEV 501) / Platform Developer II Programming Assignment

You are currently viewing Tips On Passing The Advanced Developer (DEV 501) / Platform Developer II Programming Assignment

I recently got this E-mail from the Salesforce certification department and I can’t express how ecstatic I was. Having grabbed all other 19 Salesforce certifications , passing the Advanced Developer exam was the final step towards my dream of having all current 20 certifications and being ‘Everything Certified’ (barring CTA of course). The following E-mail made that dream come true:

Hell yeah!!
Hell yeah!!


Please note that in order to receive the programming assignment, you must have passed the first stage of Advanced Developer or Platform Developer II as a pre-requisite. Also, Advanced Developer exam has been phased out by Platform Developer II though the structure of both exams is almost the same with the only difference that Platform Developer II tests you on Integration related concepts like SOAP, REST, Analytics API as well which were not a part of Advanced Developer (DEV 501). Since the Platform Developer II multiple choice exam would most likely be different from what Advanced Developer offered, I am not going to get into explaining the multiple choice part of the exam since the latter no longer exists. Without further ado, let’s get to the most fun and challenging part of this exam; the mighty Programming Assignment.

Pre-Requisites before you register for the Programming Assignment:coding

  • 1-2 years of hands on experience with Apex and Visualforce development
  • Good knowledge of base-system objects, data-modeling, process automation, security model, user interface, triggers, controllers, pagination, Visualforce charting, SOQL/SOSL, custom settings, custom labels, field sets and design patterns, Apex and Visualforce best practices
  • Willingness to devote at least 30-40 hours to the assignment during a period of 30 days


If you lack knowledge in any of the above areas, I would recommend gaining more experience and them attempting the exam. Believe me, you will be using a lot of the above when working on your Programming Assignment. Following explains the initial org setup around the assignment quite well:

Source: Official Salesforce Developer Blog
Source: Official Salesforce Developer Blog


Implementing the main business logic

  • Read the Programming Assignment PDF multiple times since going through it once won’t be enough unless you have a photographic memory. The more you go through it, less are the chances of missing a requirement hidden somewhere in that 15-20 page document.
  • Before you start coding, design the application architecture on a piece of paper or use a tool like Lucid Chart/Gliffy/Visio to better understand what the logic flow will be like within the application. Lay out the components that you will be building and the metadata type that you would use to build it.
  • One of the most important things to ensure is that you do not re-invent the wheel and use standard methods wherever you can unless there are limitations imposed by the standard API/methods. For example, consider using standard set controllers or apex charts when building something like pagination, table grid or analytic charts. Make generous use of SOQL aggregate functions and Group By clause when aggregating data in your application.
  • Salesforce loves testing on data security and sharing so make sure your application respects the security and access part explained in the assignment PDF.
  • When writing code, be immensely generous with code comments. Think of it as explaining your code to a person totally new to the wonderful world of Apex and Visualforce, even if it means comments for every business logic or instance variable in your method/class. Following is how I wrote the code comments for my assignment:code-comments
  • I personally love the one trigger per object design pattern and that is what I followed when building the application. Have all the logic embedded in Apex classes and invoke them from a trigger (one per object).
  • Governor limits: Respect those and the examiners will respect you. Make sure all of your relevant code that will be manipulating data is bulkified.
  • Write neat and clean code: Be meticulous with indentation and naming convention
  • Make sure you anticipate, handle and catch any trigger or controller exceptions that can occur when an end user works with your application. Always display user-friendly error message to the end user. The examiner should never ever see an exception like this when testing the application:

  • Re-usability and Convenience should be evident in your design wherever possible: Use components like custom labels, custom settings, custom metadata types, fields sets that encourage optimal design decisions.
  • Ensure that there are no recursive trigger calls happening within the application. Use static boolean variables to deal with recursion.


Testing the application

  • Your unit tests will be judged and examined at par with the main application logic so make sure you follow testing best practices. The testing should be complete and not aim at only achieving decent code coverage but also being 100% Production ready.
  • Remember that test methods shouldn’t be too long which means having different test methods for different kinds of business logic. Do not try to club multiple tests for different business logic into a single method. I had around 20 test methods in my application and till the time they make sense, the more test methods you have the better it is.
  • Assert, Assert, Assert: Assert the behavior of the application as much as you possibly can and don’t just assert the size of a list after performing DML. Assert values of fields and other transaction related calculations. Also, perform both positive and negative asserts.
  • Test large data volumes: You must test in bulk. I tested with 5000-9000 records throughout my test methods and made sure that my application was able to take that load without exploding in my face.
  • People might disagree but I would suggest achieving close to 100% test coverage, if not 100%. That doesn’t mean you should focus on the number itself and afford to miss testing scenarios and use cases. Examiners will be easily able to see through that.
  • Test profile security, record sharing and data access by trying to manipulate data via different profile users and asserting that users can only perform actions that they are allowed to.
  • Re-test everything in Production after deploying code from Sandbox to Production. I cannot emphasize enough the importance of doing this. I spent 2-3 hours performing all sorts of testing in the Production environment a day before submission and found that I needed to complete a couple of post deployment steps for the application to work as expected. Whew, so glad I did that!
  • Create a test data utility class where you handle the creation of test data. Invoke the methods of this class in your other test classes wherever you need test data. This is not necessary but is definitely a good testing methodology and will most likely be appreciated by the examiner.
  • And again, constantly think of as many test scenarios as you can and keep on adding them as test methods to your test class. I know I explained this above but this point did deserve a second mention since it’s the most critical part of unit testing.


Writing the essay exam

  • Do not rush through this and schedule the essay exam close to the submission date of your programming assignment. The reason why I say this is because let’s say you take your essay exam somewhere during the middle of the programming assignment phase and you end up changing the solution or design after submitting the essay, it might be problematic. I took my essay exam after submitting the programming assignment and I recommend doing the same.
  • Before you take the exam, organize your thoughts and make notes on the design considerations, testing best practices and steps you took to improve scalability of your application. Think about what challenged you the most while working on the assignment and how you dealt with those challenges.
  • The essay exam will have 3-4 questions and I would suggest providing as much detail as possible when composing your answers. Avoid writing one-liners and be clear and elaborate when explaining your choices and design decisions.


Having put in your best effort, time and resources into the assignment, I am sure the 8-12 week waiting for results will be tough. I went through the same myself and began frequently checking my E-mails around the time the exam results were to be declared. Remember that this is not an easy exam and the judges take the task of reviewing your assignment very seriously. Based on what I know, there are multiple stages of examination that your assignment goes through and multiple judges work with each other to agree on the final score. I should tell you that whether you pass or fail, the notification E-mail will list out your strengths and weaknesses (areas needing improvement) which is immensely helpful for carving out your future line of action. So even if you don’t pass the first time, learn from this experience and attempt the exam again after having a more firm grip on areas that need improvement .

Good luck and don’t forget to flaunt that shiny logo on your LinkedIn profile and Resume after passing this fun exam!