What is a Lightning Component

The lightning component framework is a UI framework to develop dynamic web applications for mobiles and desktops. It uses Javascript(client-side) and Apex(server-side) to create single-page web applications. This framework is a collection of codes where you can create applications without writing codes. Lightning Component consists of event-driven architecture which has made easy to build many…

Read More

Visualforce Vs Lightning – Which to choose and When

Visualforce:  The Visualforce framework provides a robust set of tags that are resolved at the server-side and that work alongside standard or custom controllers to make database and other operations simple to implement. This is a page-centric web application model. It’s great for basic functionality, but it’s challenging to deliver the new, more dynamic experience that users…

Read More

Using Ternary Operator in Salesforce Lightning Components

The below code shows how to use Ternary Operator in Salesforce Lightning Components: Ternary_Operator.cmp <aura:component > <aura:attribute name=”isError” type=”Boolean” description=”If Name is empty then true, else false”/> <aura:handler name=”init” value=”{!this}” action=”{!c.doInit}” /> <div class=”init”> <lightning:input label=”Enter your Name” aura_id=”FullName” class=”{!v.isError == true ? ‘error errorBorder’ : ‘correct correctBorder’}” onchange=”{!c.handleNameChange}” /> </div> </aura:component> Ternary_Operator.js ({ doInit:…

Read More