As 2015 draws to a close, it seems to have flown by in a lightning flash. This has been another fantastic year for Salesforce, with the release of an entire new UI, bigger APIs, better analytics and even greater platform functionality.
For me, Trailhead has been massive this year. The Salesforce development learning platform gets stronger every month, has a massive following, and has really captured the spirit of the developer community, It truly is an amazing educational resource for Salesforce developers, administrators and users of all ability levels.
As a special holiday bonus, Salesforce has rounded off the year in style with the introduction of 6 new badges to get stuck into. Here's a summary of the badges and what they have to offer:
Name | Overview |
---|---|
Advanced Formulas |
Are you looking to take your formula ninja skills to the next level? This module looks at some more complex practical formulas, including a range of the pre-built functions you have always seen in passing, but weren't sure how to use! |
Apex Integration Services |
Need Salesforce to connect to your external systems and communicate with external REST and SOAP data sources? No problem, Apex integration classes to the rescue! Essential for developers, includes great example test methods and mock classes. |
Lightning Chatter Basics |
A whirlwind tour of how Chatter works in the new Lightning Experience UI. A good introductory badge for those new to chatter, or trying out LEX for the first time. |
Lightning Data Management |
Load data into Salesforce, Load data out of Salesforce. Simple but effective module. |
Application Lifecycle Management |
Questions about version control? Can't decide between change sets and the Force.com Migration tool? Confused about the concept of a sandbox that doesn't involve a bucket and spade? This is the module for you! |
Build a Battle Station Project |
Awaken your Salesforce abilities with this cool app project that enables you to build a whole planning project with NO CODING REQUIRED. Now anyone can be a Salesforce Jedi master! |
For the developers out there, although there is definite benefit to doing all of the badges, the most relevant of the new content is the Apex Integration Services badge. The badge is made up of 4 different units, 1 set of questions and 3 practical exercises (I like that ratio!) :
Apex Integration Overview: This short introductory unit provides some information on connecting to external services. Also includes information on adding remote sites before making calls to external REST and SOAP services, a classic gotcha when starting with integrations.
Apex REST Callouts: The first practical exercise focuses on connecting to external data using REST callouts, explaining the difference between the varieties of call (GET, POST, DELETE etc.). The challenge involves creating an Apex Class that retrieves data on an animal through a callout to a REST service, and then creating your own test methods and accompanying mock class. You cannot pass the challenge until you have run all tests and have 100% coverage on the apex callout class.
Tip: The practical exercise for this unit includes creating a custom mock class to provide a sample response for the callout when made from a test. However, this is not the only way to accomplish this, make sure you try out using the StaticResourceCalloutMock class as mentioned in the unit body. This is a really cool feature, allowing you to use a static resource as the example response to a callout!
Apex SOAP Callouts: This unit switches focus to retrieving data using an Apex to connect to an external SOAP based web service with accompanying WSDL service definition file. This is an important module, as although in modern development there is much more of a lean towards REST based HTTP callouts to transfer data between systems, there are still a lot of enterprise level systems that only allow access through WSDL based SOAP web service calls.
Tip: Make sure you follow the initial exercise instructions carefully. I got myself in quite a horrible renaming mess when I just skipped through the generate Apex Classes fromWSDL menu, as I didn't ensure that the name of the class was "ParkService" leaving it as the default "parksServices".
Apex Web Services: The previous two units dealt with interacting with services published from other systems. In this unit the roles are reversed, as Salesforce becomes the source of the data. The unit content and accompanying practical challenge is all about defining a class and annotated methods that allows data interaction to be made possible through REST calls to Salesforce. Completing this method once again reminded me how ridiculously easy it is to create REST interfaces for accessing your data.
Tip 1: The practical challenge can be quite a lot to get your head around at first, but its actually quite simple when it comes to the implementation. Think subquery to get all the Accounts with their related Contacts in one SOQL request, and getting the id of the Account from the url is just a case of using some funky substring methods (I used the substringBeforeLast and SubstringAfterLast, never used them before, great!).
Tip 2: In the practical challenge you simply have to create a get request. Make sure to try creating other methods with other supported annotations, such as a @HttpPut or @HttpDelete.
The Apex Integration Services badge is definitely one of my favourite modules so far. When I started Salesforce Development (around 6 years ago) one of the first development tasks I had to do was integrate Salesforce with an external system using WSDL based SOAP callouts. I found it really difficult and the amount of practical content out there for help was minimal. I wish I had great resources like this back then, that allow you to get hands on with great examples.
One of the most impressive elements of the module is the presence of test classes and methods in each of the exercises. In some of the previous Apex modules, while the core functionality was demonstrated in great fashion, there was little mention of testing. While this is ok in training exercises, as soon as you start coding in real world practical applications, you soon realise the importance of writing test methods, and especially writing good test methods. Any good force.com developer knows that you should be spending a considerable portion of your coding time writing test methods, so why should be training be any different?
I thought it was a great idea to prevent developers from passing challenges until they add test methods that cover all of the class code 100%. By writing the modules in this way, Salesforce is encouraging more test centric development, which in my opinion is fantastic!!
Another great positive is the presence of dedicated web services specifically initialised for the module. It may sound like a minor point, but it makes a big difference having a reliable service to test your code against. I've seen plenty of web service training examples in the past where the source service no longer works or has been replaced, which is incredibly frustrating.
So if you want to learn more about coding integrations on the Salesforce platform, or earn any of the other cool badges, then get yourself down to the trailhead site now!
Here's to a great 2016, a year hopefully filled with just as much great Trailhead content, and badges galore! If your located in the South West of the UK, why not come to our January Trailhead Smash and get on the badge trail early!
HAPPY NEW YEAR EVERYONE!!!