Cloud Everything !

Salesforce1 Ligtning App - Intmist

Salesforce1 Lightning Components: Getting started with Salesforce1 lightning components

Leave a comment


At Dreamforce’14 Salesforce has introduced a faster way to build mobile application on Salesforce1 platform which is called Salesforce1 lightning framework.

What is Salesforce1 lightning?

Salesforce1 lightning is a UI framework built at the top of Aura framework. Salesforce1 lightning uses javascript language at client-side and Apex language at Server side. UI components are built over html5 and bound with controller javascript. This framework is provided as Salesforce1 lightning components which are reusable components and can be used with more than one Salesforce1 lightning apps.

Development of lightning components is currently available in Salesforce Developer edition organisations only. However Salesforce has provided lightning app builder to create Salesforce1 application just by drag and drop only. It is in pilot now but should available in general in next releases spring’15 or summer’15.

Enabling Lightning Components:

Prerequisite is a developer edition organisation which must have a namespace registered. All winter’15 edition org has lightning feature but disables.

To enable Salesforce1 lightning components go to Setup > DevelopLightning Components.

Check the ckeckbox “Enable Lightning Components” to enable lightning componentsScreen Shot 2014-11-02 at 2.24.05 pm

Also check the Enable Debug Mode checkbox to enable debugging.

Click Save button.

You have successfully enabled lightning components in DE org. Now It should look like this:

Salesforce1 lightning is a UI framework built at the top of Aura framework. Salesforce1 lightning uses javascript language at client-side and Apex language at Server side. UI components are built over html5 and bound with controller javascript. This framework is provided as Salesforce1 lightning components which are reusable components and can be used with more than one Salesforce1 lightning apps.

How to create a Salesforce1 lightning application ?

Right now lightning application can be created by Developer console only. To create a lightning application go to File > New. Click on Lightning Application

Screen Shot 2014-11-02 at 3.17.49 pm

Enter the desired name of the application in popup window. Ex: OpportunityManager

Create Salesforce1 lightning App

You have successfully created a lightning application. It is denoted by <aura:application> tag

New Salesforce1 Lightning Application - Intmist

On the right hand side new application menu is provided. It allows to create application controller,  css style sheet, helper library, documentation and renderer library.

To create a controller click on “CONTROLLER” below the “APPLICATION” or alternatively Ctrl + Shift + 2 can be used to create controller. It will create a new file names OpportunityManagerController.js

Salesforce1 Lightning App Controller - Intmist

Preview button allow to see preview of application to test in real scenario. Our app should look like this:

Salesforce1 lightning app preview

A Salesforce lightning app url formed as https://salesforce_instance.lightning.force.com/namespace/application_name.app. Here it is https://na15.lightning.force.com/intmist/OpportunityManager.app

This was the simple basic way to start with Salesforce1 lightning application development. Undoubtedly Salesforce1 lightning has a lot to do.

 

Some useful links:

https://developer.salesforce.com/resource/pdfs/Lightening_Components_Cheatsheet.pdf
http://rajaraodv.github.io/auratutorials/tutorials/aura-docs.html

 

Author: Ashwani

Senior Lead Salesforce Consultant and Developer For any question please contact us at ashwanicloud@gmail.com

Leave a comment