5.1 Write unit test for a class

Why unit test

Salesforce requires at least 75% code coverage of all the Apex code. So in short, in Salesforce world, you must write unit test. For me, I firmly believe it is a good practice that every org and company should follow. The earlier you find a bug, the easier you can fix it. It will finally save you a lot of time and effort and money if you do the unit tests properly.

• • •

4.3 Avoid infinite loops

What is infinite loop in Salesforce Trigger

Today, we need to introduce a very important concept in Salesforce Trigger – infinite loop. I will show you what it is and how you should avoid them.

• • •

2.3 Handle ui elements in client side controller

In our previous example we generated a lightning component which handles click events from two buttons. If you are an experienced developer, you might have already noticed that the code is not very DRY (Don’t repeat yourself). Both buttons serves almost the same functionality, why do we need to duplicate the code?

• • •

2.2 Some explanation about how lightning component works

In our previous post, we have introduced lightning component client side controller. And in the future, we will also introduce server side controller and client side helper. Why, you may wonder, are there so many different files? In Visualforce, we used to have only two files – the page and the controller, right?

• • •

2.1 A simple example using button

In the previous chapter, we have gone through how to generate a very basic lightning app and lightning component. Our pages are static in the first chapter. Now, in this chapter, we will be adding some client side logic to make it responsive.

• • •