Learning Salesforce as a Developer

Learning Salesforce as a developer

A retrospective on 2 months of learning Salesforce by Tom Blockleyย 

What is this?

This is intended to be a useful, but lighthearted look at the learning curve of Salesforce when you are already a developer of some sort. It is intended to communicate the advantages (and disadvantages) of learning Salesforce as a second (or third, or fourth, etcโ€ฆ) technology as opposed to learning it as a first technology as someone fresh out of university might.

In the form of an Agile Retrospective. Because why not.

Who is this for?

This is aimed at people who already have a bunch of experience as a developer, who are thinking of branching out / retraining into Salesforce.

It is for companies who do a lot of Salesforce development work and are looking to bring on board an experienced developer.

It is for Salesforce employees and developer advocates who will have a little (a lot) more clout than me, to maybe grab some learnings for enticing career developers to switch to Salesforce.

Who even are you?

Iโ€™m Tom! I joined Desynit (and the Salesforce community) at the beginning of April this year. I had never looked at Salesforce before.

Iโ€™ve been a *cough* professional *cough* developer since 2005.

Most recently I spent nearly 8 years at another great Bristol based company, writing a whole load of Python.

I have been a Certified Scrum Master since 2012 and have put that to good use.

I am not a specialist and I wear many hats (metaphorically – I actually donโ€™t much like actual hats, they make my head sweat).

Ok Iโ€™m sold, letโ€™s go

What went well?

Loads of stuff went well, Iโ€™ve really enjoyed learning Salesforce so far. But thatโ€™s vague so here are some specifics:

Trailhead

Trailhead is a great learning resource and I wish more technologies had similar quality learning materials. Concepts and features are introduced in a neat fashion, and you are often reinforcing things youโ€™ve learnt in previous modules, making sure they are nicely ingrained. The practical challenges are particularly good and itโ€™s nice to get to the end of a module and get it checked for quality (albeit by a robot). Also badges. I have 40 at the time of writing.

Testing

The fact that writing tests for your code is given such a high priority makes me really happy.

I come from a background of relying on a QA team, a Selenium test suite, and the occasional unit test, to make sure that our code was up to scratch. But it took years to get to that point, and still it often fell to manual testing because sometimes your former self was just in a rush right then and there.

In Salesforce, in order to push a release live, you have to attain a certain test coverage. There is a full testing toolkit available and thereโ€™s a Trailhead module to get you started. Brilliant!

Itโ€™s in the cloud

I used to hate that term because itโ€™s just a machine in a datacenter somewhere and itโ€™s really not a cloud. But Salesforce is, to a developer. You donโ€™t have to worry about whether your clientโ€™s site is going to go down in the middle of the night because someone kicked a power cable, or whether your vm/server/cluster is going to get a Zero Day, or how youโ€™re going to run a staggered major OS Version update across your fleet. Thatโ€™s someone elseโ€™s job and that is lovely. (Not for the Salesforce core developers and sysadmins I guess thoughโ€ฆ thanks for keeping it away from us!). You just write some code and wait for it to compile and there you go, itโ€™s live (well, live in a sandbox).

Learning the language

The language is fine. A lot of what Salesforce is moving towards involves Javascript, so most people who are already developers will be able to grok that really quickly. Apex itself is much like Java. The developer documentation is easy to find and pretty complete, so far as Iโ€™ve found so far. The templating language(s) in the page templates is much like any other; youโ€™ve just got to learn the magic words and it will do the hard work for you. SOQL and SOSL are clever and intuitive.

The Community

Thereโ€™s a lot of great community spirit out there. Developers are helping each other out a lot on the Salesforce Stack Exchange and elsewhere, and that is always reassuring. I have been lucky enough to have met a bunch of the UK MVPs already, and and witness the monster event that is the World Tour. People want Salesforce to succeed. That is important. Itโ€™s also fun. The meet-ups and the user groups are really great and I plan to be doing a talk at one once Iโ€™ve learned something of use to others!

What went badly?

Of course not everything is wine and roses. Here are some things that I stumbled on that you can feel sorry for me about, or more usefully: avoid yourself.

Trailhead

Some of the trails and modules are aimed at the very beginners, and you find yourself skipping to the end to do the challenge and then working backwards up it to find the bits you missed by thinking you already understood. Bear in mind that these have to cater to beginners, and just try to be open minded and patient – itโ€™s probably better in the long run.

I havenโ€™t been able to spend a great deal of time in Trailhead. If you are a new employer, try to set aside as much time as you can, perhaps allowing for ongoing weekly doses. My learning started very broad thanks to Trailhead but I could have done with more.

Testing

Whilst in theory, testing your code properly in Salesforce should always be happening, I have already witnessed ways for it not to be.

You have to achieve a certain percentage of overall coverage for a release. This means that if you want to cheat you can do so by creating a really long apex class that does nothing (for example one that has a function which instantiates a bunch of really long lists of lists and adds to it one by one) and then write a test that calls it. Bingo! Increased Coverage! What could go wrong!? Apart from everything.

Itโ€™s in the cloud

For the most part this is a really great feature. It does sometimes make it slow to build though, and you canโ€™t run a local instance of Salesforce so you HAVE to have a steady, reliable internet connection.

Learning the language

Coming from a very loosely typed, runtime compiled language (Python) to a strongly typed, precompiled one has been both good and bad. I miss having a command line interactive debugger most. ย I miss having dictionaries, generator expressions, and default values for method arguments, and I keep getting told off for forgetting semi-colons. But Iโ€™m getting used to it and it does do everything it needs to.

What did I learn?

Weโ€™re not that different, you and I

Salesforce is a CRM. Yes, itโ€™s a big, complex, almost infinitely customisable platform, but at the heart of it, itโ€™s a CRM.

A CRM is not that different to a CMS, or any other system that needs to worry about access controls, user roles and groups, workflow, searching and sharing. In my past life I did a lot of work on a Python CMS called Plone. It turns out Plone and Salesforce have a lot in common, which made it easy for me to grasp a lot of the concepts of Salesforce.

Donโ€™t bother trying to rename files

Really donโ€™t. In fact, try to stop thinking of them as files. Theyโ€™re not really once theyโ€™re compiled and such anyway.

If you (like me) like to work locally, you can. There are Salesforce plugins available for many IDEs. I use Visual Studio Code and that has at least two, including one that integrates with the excellent Mavensmate.

However, this makes you think you can create and rename files like you might in a normal filesystem codebase. Donโ€™t. Do yourself a favour and use the plugin tools to create files. If you need to rename one copy the contents into a new file and then delete the old one through the web in the setup menu.

Clicks vs. Code

There is a lot you can do with the declarative side of Salesforce and I strongly recommend to any developer that they embrace it. Just because you can do it in code doesnโ€™t mean you should. In fact sometimes itโ€™s a lot, lot quicker to use clicks. Some things, like permission sets and custom fields is best done declarativelyย and as a developer you shouldnโ€™t feel bad about that. In fact, you should feel liberated!

Use the Developer Console for log debugging

I personally donโ€™t want to use it for development, because I have a nice IDE that Iโ€™m used to, has powerful editing and searching tools. But use it for your debug logs. You can set checkpoints where you can examine the state of all your variables, and query results. They are really snapshots of a point in time, as you canโ€™t make changes then continue the flow, but they are really useful. You can also view the logs of any user by enabling logging for them, again useful for diagnosing user specific issues. Permissions here we come.

What still puzzles me?

Version Control

I come from a world of version control and branching for features and tagging releases and keeping master clean at all times. Going into Salesforce where the only guaranteed canonical source of whatโ€™s live is, well, live, is difficult. There is not quite enough integration with version control, and it makes it difficult to run nice feature branches. It often winds up with big commits where you pull in the content from Salesforce and commit it to Git, rather than the other way around. This makes it hard to work in a team, on a single repository, which is really unfortunate.

Iโ€™m sure thereโ€™s a better way to do this though and I have all my fingers crossed that the Developer Experience will sort out a lot of this. In particular, the scratch orgs look very useful from what I saw at the World Tour. If not then I have some ideas of my ownโ€ฆ

Nomenclature

Some of the naming is multiply overloaded, in particular the word App. I am still working on that and I have a feeling that Salesforce is too.

Declarative changes can really mess with your work

If someone goes off and changes stuff declaratively in the live organisation, this can really ruin your day when you come to releasing. In my head there needs to be some sort of pre-release merge that can be run between live and a sandbox so you can see the differences and confirm youโ€™re unlikely to hit a nasty surprise that knocks your release of schedule.

.THIS and other animals

For the most part, the component driven nature of Lightning makes total sense. But there are limitations. I find myself copy-pasting the same snippets of style into multiple components, and thereโ€™s no pre-compiler like Less involved, so the CSS you write can end up looking pretty brutal.

The same applies to certain things regularly done in Javascript. The answer is to make these things global resources, I suppose, but then you lose the specificity of .THIS. What would be nice is for those components that are always contained by another component to be able to inherit those styles already declared. Perhaps triggered by some sort of scoping decorator on the definitions. Then youโ€™d need a pre-compiler and you could have nice tidy nested CSS too ๐Ÿ˜‰

Whatโ€™s next?

For me…

It wouldnโ€™t be an agile retrospective without identifying some sort of next steps. I should know, Iโ€™m dead agile meโ€ฆ

So hereโ€™s some things I want to do next:

  1. I have already signed up for the Salesforce DX, and when it hits beta, Iโ€™m going to start using it straight away with my fingers tightly crossed
  2. I want to get back into some more Trailheads – I want to get from 40 up to 50 badges because gamification actually works sometimes
  3. Throw myself into the community a bit more. Thereโ€™s a good amount of Stack Exchange content and I think relative newcomers have an advantage when answering other newcomersโ€™ questions
  4. Keep learning! Iโ€™ve only just scratched the surface of what Salesforce is capable of, and thereโ€™s plenty more to do. Especially if I want my certifications

For the Developerโ€ฆ

If you are a developer looking into Salesforce, donโ€™t stop at this blog. Read some more of the blogs in the Desynit Dev Zone

Dip a toe in – pop along to one of the many developer meet-ups happening all over the world. You can find your nearest one and just turn up. Thereโ€™s usually some food and drink put on too.

Take the first step – sign up for a developer edition right now, and get stuck into some of the Developer Trailhead trails

For the Employer

Come to one of the Forcewest User Groups and chat to other companies who have employed developers to do Salesforce

Seriously consider making Trailhead a core part of your onboarding material for new hires – both experienced and otherwise!

Work with Desynit

Looking for exceptional, professional Salesforce support?

Our independent tech team has been servicing enterprise clients for over 15 years from our HQ in Bristol, UK. Let’s see how we can work together and get the most out of your Salesforce implementation.