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.

• • •