Top 5 Tips for Building Your First LWC

I am very honored to have been asked by 100daysoftrailhead.com to record a session about Top 5 Tips for Building Your 1st LWC. And with that, I wanted to write this post to summarize the tips that I featured in that presentation.

Tip # 1 – Hit the Trail

If you are brand new to Lightning Web Components, then you definitely want to begin by working through the Build Lightning Web Components trail on Trailhead. The trail several projects and modules and you do not have to work them all at once. But at the very least, you should complete the first one, Quick Start: Lighting Web Components.

Tip # 2 – Install the Salesforce Extended Expansion Pack

Better Option is to install the Salesforce Extended Expansion Pack
Better Option is to install the Salesforce Extended Expansion Pack

The official Salesforce docs tell you to install the Salesforce Extension Pack for Visual Studio Code. But, I suggest you also/or instead install the Salesforce Extended Expansion Pack, which you can do by Clicking the Extensions icon in the left toolbar of Visual Studio Code and then selecting Salesforce Extension Pack (Extended).

Select the Extended Expansion Pack though the Extensions icon in Visual Studio Code
Select the Extended Expansion Pack though the Extensions icon in Visual Studio Code

This extension pack will include 4 additional JavaScript libraries that you will more than likely need. They are XML, ESLint, Prettier and Apex PMD.

Tip # 3 – Embrace the Command Line Interface (CLI) Help

Don’t fear the CLI – Embrace it! I know that the Salesforce Extensions offers a very nifty Command Palette tool, but that does not cover everything that the CLI offers. By using the built-in help features, you not only get access to the latest docs (and that you can be rest assured of), but you can learn a lot about what the CLI Offers.

To access the help feature, just type the following sfdx help from a Terminal Window in Visual Studio Code. This will bring up results such as the following:

Access the CLI help feature from Terminal window
Access the CLI help feature from Terminal window

To drill down into one of the topics, such as the force one, use the following:

sfdx force --help

From there you can drill down as far as you need to, such as this command for accessing info about creating a Salesforce DX project:

sfdx force:project:create --help

Tip # 4 – Use Base Lightning Components Whenever Possible

The Base Lightning Components that Salesforce offers not only make your life as a developer so much easier, they are highly performant than anything you might try to create yourself. So, you should check them all out and make sure to use them whenever possible.

The Component library offers a handy Lightning Mini Playground that you can use to access sample HTML and JavaScript directly.

The Component Library offers a handy Lightning Mini Playground feature

Tip # 5 – Reference the Code in the Sample App Gallery

The Sample App Gallery includes real-world code that were all designed by the incredible developers with the Salesforce developer relations group. They not only demonstrate new Salesforce features, but best practices for how to create Lightning web components.

As you begin the process, the most important one to checkout is the LWC Recipes one. This GitHub repo features very short code snippets that demonstrate how to perform certain key operations.

Bonus Tip – Check out My New Pluralsight Course

This month, I also released my latest Pluralsight course, “Salesforce Lightning Web Components: The Big Picture“. You can find out more about it in this post. Once you have completed that course, you might want to checkout, “Building Your First Lightning Web Component (LWC) for Salesforce“.

Salesforce Trailhead: Approach with Caution

Proceed to the Salesforce Trailhead with caution

As a former member of the Trailhead team, I am hesitant to write this, but I think it is an important thing for people to be aware of. If you have been using Trailhead for longer than a year, then you need to be aware of these pretty serious limitations.

While you can retake challenges for badges and projects, you cannot do so for Superbadges. More importantly, once you complete a badge, you have no way of knowing that the content for that badge may have been significantly updated. As in, all the content you understood when you completed the badge, is no longer relevant.

As I am sure you are aware, Salesforce does major releases three times a year. When they do, they prepare comprehensive release notes and the Trailhead authors are instructed to review these notes and update their content as necessary. That part is great. What is not great is that you as a consumer of Trailhead content have no way of knowing that the content was updated (without revisiting EVERY badge you have earned to examine the content).

The badge itself just indicates that it was completed on a certain date. As in the image below of a badge I completed in 2015. This badge has since been significantly updated and the content that was once relevant when I completed the badge is VERY different.

Trailhead badge completed in 2015 that now has VERY different content

How do you know that you are aware of the latest features and updates to the platform? Well, it is up to you to pick through the release notes and then cross reference any Trailhead content that you may have completed. Nice, right?

Just wanted to make sure everyone was aware of this (what I consider to be) serious limitation. I hope the team is actively addressing it. I would say I know, but they don’t talk to me since I left the team.

Not to be missed Developer Content on Trailhead

THLogoOk, I know I work for Trailhead and so I am a little bit biased, but I just have to say that we released some incredibly awesome developer-based content in September. If you are a serious Salesforce developer that has been waiting for some juicy content from Trailhead, I think you will really like what we have out right now. This post highlights my favorites.

Got Slack?

A lot of teams do and they love it. If your team does, wouldn’t it be cool if you could integrate Slack with systems in your own company? Well you can. Using webhooks, you can bring notifications and data in from other systems and build your very own Slack app. You can even use AI services to create your own intelligent Slack bot.

To get started, check out this beginner module, Slack Development Basics. Once you know the basics, you can move on to working through the Build a Welcome Bot for Slack. In that hands-on project, you will use Node SDK’s and the Slack API’s to build a welcome bot that interacts with users that signup to your channel.

What about Heroku?

If you have not been playing around with Heroku, then you are missing out. Seriously! Heroku is such an incredible platform and EVERY Salesforce developer should be looking at how they can work with it to deliver incredible online experiences.

We have two new projects that you need to check out. If you are new to Heroku, then look at Quick Start: Build a Java App on Heroku, which is a simple three step project that will get your feet wet with creating, deploying and scaling a simple Java app on Heroku.

More experienced developers wanting to see a rich end-to-end solution will want to move straight to Develop a Heroku App that Integrates with Salesforce, which walks you through installing the Dreamhouse App to Heroku and then setting up Heroku Connect so that property data is synced both ways between your Salesforce org and Heroku app. You will even see how to implement continuous delivery through Heroku Pipelines and Flow.

Need to know more about JavaScript?

Every Salesforce developer should be trying to enhance their JavaScript skills since the Lightning platform is all about JavaScript. JavaScript Skills for Salesforce Developers is just what you need to learn the key JavaScript skills that you need to take your Visualforce pages and Lightning Components to the next level.

Think you know enough about Unit Testing?

I bet you could learn some more and I know just the module to help. This new module called Unit Testing on the Lightning Platform dives deep into topics such as positive and negative testing, using a mock and a stub, as well as permission-based testing. It even covers testing JavaScript with the Lightning Testing Service.

Finish it all off with Alexa

Ready for some fun? We have a super fun project that uses a new voice platform called Violet to build an Alexa-based app that links back to your Salesforce org. Quick Start: Violet will walk you through setting up an Alexa Skill that lets you plan a game night for your friends.

Have fun!!!

 

 

 

New Dream Job at Salesforce

THLogoI have very exciting news to share. The first day of Dreamforce will also be my first day as a member of the Trailhead team. I have accepted a job as a Technical Curriculum Engineer.

Doesn’t that just sound cool?

And the best part is that I will be working for the legendary, Jeff Douglas!!! Yep, that guy. The one and only. I bet you are way jealous now.

The thing that I love so much about Trailhead is the quality of the content they produce. I truly believe they are leading the way in terms of how to produce effective technical instructional material and I am just thrilled to be a part of it.

The thing I am most passionate about in life is the process of taking something that is very complex and difficult and presenting it in a way that is easily understandable to almost anyone. It is kind of like the ultimate crossword puzzle (and yes, I happen to love crossword puzzles).

As far as this blog and my courses at Pluralsight, we will have to see how that goes. I still have my latest course about Lightning Best Practices coming out soon (since I am almost finished with it). But after that is published, I may take a break for a while so I can really focus on my new and exciting job.

Cheers everyone,

Sara

 

Trailhead + Pluralsight = Successful Salesforce Developer

SFSucess

When I discovered Salesforce in 2011, the best way to learn all about it was to go through the Force.com Workbook, which has now been retired. I want to say the workbook was over 400 pages long and even though it did contain a ton of useful information, it was a bit dry and hard to read.

Fast forward to today and the old retired workbook has been replaced by a much improved source of information in the form of Trailhead. Trailhead uses the phrase, “The fun way to learn Salesforce” and they sure aren’t exaggerating.

Since it began in late 2014, Trailhead has grown quite a bit and just recently got it’s biggest update, which you can learn about here. If you are a developer that is interested in learning more about Salesforce, this is the way to go. Not only is the content free, but it is top quality. It is a GREAT, and as they say “fun” way to get introduced to any Salesforce related topic.

If you are interested in learning about Lightning (and who doesn’t want to learn more about Lightning?), and you are new to Lightning, check out:

And if you are already comfortable with the basics of Lightning and looking for something a little more challenging, then check out the following brand new modules:

But don’t stop with Trailhead. If you are really interested in becoming a Salesforce Ninja and earning a 6 figure income, then you need a subscription to Pluralsight too. I know developers tend to shy away from paying for anything, but the low cost of a Pluralsight subscription is more than worth it. And after all, if you are earning a 6 figure income, the low cost of a monthly subscription is nothing really.

The quality of the content on Pluralsight is unmatched by none. I know this because before I became a Pluralsight author, I produced courses/books for other vendors and none of them come close to Pluralsight. No one does more to ensure their authors will be successful and produce unique, quality content like Pluralsight. Period!!!

Also, as great as Trailhead is, it usually is only a starting point. It tells you the most important things you need to know, but tends to skip over a lot of the details. This is part of what makes it fun, but sometimes the details are good to know. Especially if you want to become a Salesforce Ninja, like I know you do. Well that is where the Pluralsight courses will come into play.

I know my two courses on Lightning, which you can find here, are loaded full of details that you will find no where else. The kind of details you get from blood, sweat and tears. From banging your head on the desk for hours before you finally figured out how something worked (NOTE: While I have not literally hit my head on the desk, I have certainly considered it enough).

And besides my two glorious Lightning courses, there are a bunch more about Salesforce (with more coming out everyday). In particular, I recommend:

Trailheads New Data Integration Specialist Superbadge is Super Fun!

trailhead_superbadge_data_integrationI recently had the fortunate opportunity to provide early testing and feedback for the latest Superbadge released by Salesforce’s Trailhead. This one covers all the different aspects of being a data integration specialist. This includes being able to configure both inbound and outbound security, being able to synchronize Salesforce data with external systems, and creating test Apex classes to do both Apex REST and SOAP callouts.

Even though I have done quite a bit of data integration work over the years (both with Salesforce and .NET), I admittedly had not done much with it in the past two years, so I figured this might be a bit of a challenge.

It sure was a challenge, but in a very good way I think. And, it was actually fun! Yeah, right, fun I said.

The superbadge is not like any of the other trailheads you may have completed in the past. This special superbadge is designed to test how well you really grasped the underlying material and not just walk you through yet another predictable tutorial. It is also based on real-world type scenarios, similar to what you would encounter in your development job.

This particular superbadge requires that you to complete 4 other Trailhead badges as pre-requisites before you can even attempt the badge. The other badges will give you the knowledge that you need, but the challenges in the superbadge will only offer you business requirements. You will be asked to complete 9 different challenges that will really confirm you know the material well. You will even be asked to apply best practices when applicable.

What is so fun about it, is that it forces you to think though the scenarios and not just repeat a bunch of steps. If you are a developer like me, then you actually like this type of challenge, You probably also like crossword puzzles and mind teasers too, I’m guessing

So, I challenge anyone with no to a lot of experience with Salesforce data integration to check out this newly available superbadge and let me know what you think. I bet you will love it just as much as I did.

Why Every Salesforce Developer should be using Trailhead

I have recently been using Trailhead to help me study for an upcoming exam and I have been incredibly impressed with how good it is. I have already posted about the Trailhead modules that cover new material, such as Lightning, but what I was surprised about was how useful it was for reviewing material that I thought I already knew pretty well.

Trailhead is definitely not exhaustive in it’s coverage, but what I like most about the modules is that they go over just the stuff you really need to know. And most importantly, they go over best practices. There are so many examples of inefficient and just plain bad code out there (even on some of the Salesforce sites I hate to say). The text and challenges in the Trailhead modules were well thought out and it is obvious they put a lot of time into developing them. It still Trailheadsurprises me that something this good is free, but fortunately for us, it is.

If you are preparing for one of the Certified Developer tracks, you really need to check out the Developer Trail. It covers a lot of what goes into the exams and the progressively harder challenges really solidify what you just learned. Unlike tutorials that you can just follow in your sleep, the challenges tell you to do something, but not how to do it. And, if you do not do it exactly right, you do not get the points. You actually have to THINK about what you are doing and this is absolutely the best way to learn.

And if you are a certified developer who has been doing this for several years, there is still stuff for you to learn, even when it comes to best practices. As we all know, this platform is changing constantly and that means that so are best practices.

And honestly, it is just fun seeing yourself rack up the points. I really like the WooHoo I get at the end of the challenge. I am proud to say I have 5 badges and over 12,000 points so far (with more to come). How many will you get?