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 > Develop > Lightning Components.
Check the ckeckbox “Enable Lightning Components” to enable lightning components
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:
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
Enter the desired name of the application in popup window. Ex: OpportunityManager
You have successfully created a lightning application. It is denoted by <aura:application> tag
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
Preview button allow to see preview of application to test in real scenario. Our app should look like this:
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