Why use Lightning? and not other JS Frameworks

Posted on Updated on

Salesforce introduced Salesforce1 Lightning Components last year(2014) at Dreamforce. Lightning components give you a client-server framework based up JavaScript that is native to the Salesforce1 platform. It comes complete with an event-driven architecture that is optimized for fast Single Page Apps. If you are familiar with frameworks like AngularJS, Backbone and React you will know how Salesforce1 Lightning Framework is better from these frameworks.


AngularJS : 

It was first released in 2009 and made available as open source framework under MIT license. Ever since its release, Angular ecosystem has grown beyond imagination. It currently boasts the biggest community of developers and is the most used JavaScript framework for developing Single Page Web Applications. AngularJS framework gives super powers to HTML by adding all the necessary features required to build dynamic views (interactive user interface). It gives option to extend HTML attributes by the use of Angular directives. Extending HTML with AngularJS is very simple, one can use standard AngularJS directive or develop a custom directive and use it on any div. Two way data binding is at the core of Angular.js.

BackboneJS :

It was first released in 2010 by Jeremy Ashkenas as open source JavaScript Framework under MIT license. It is a lightweight JavaScript Framework, it is simple, small size package and easy to learn. You can get started building apps with Backbone JavaScript Framework within no time. It is growing slow even though biggies like Pinterest, Foursquare, Walmart, Disqus are using backone.js. The main reason for that appears to be the sluggish release cycle of backbone and lack of power features that other frameworks offer out of the box. It is useful but more as a side framework rather than the core framework of your web project.

React :

ReactJS was first released as open source in 2013 under BSD license.React.js JavaScript Framework is behind the user interface of Facebook as well as Instagram. This gives us a quick idea about how powerful is ReactJS when it comes to building large scale applications of extreme dynamic nature. The community is growing rapidly ever since its release and it is the fastest growing JavaScript framework as of today. One can find tons of resources, tutorials and React component libraries to get going within no time. ReactJS is best at rendering complex user interfaces with high performance. The basic fundamental behind React is the concept of virtual DOM. ReactJS utilizes a virtual DOM, which can be rendered either at client side or server side and communicate back and forth. When the data manipulation is much more dynamic and complex, client side DOM manipulations become performance intensive.

Lightning Components : 

Lightning is different from above frameworks it is designed first and foremost for enterprise applications. Lighting has a rich event driven architecture that appeals to JavaScript developers and all of the power of the Force.com platform. The power of the component framework is in its ease of customization. Developers can combine multiple components into larger ones or even applications.

Lighting components encapsulate functionality, markup and CSS into reusable functional units that can be assembled into larger components or complete application. Using appHostable tag you can expose your component in Salesforce1 and it will become a mobile application.

Like other component frameworks where you typically have to roll your own backend functionality, authentication and connectivity, with Lightning you simply expose server-side Apex functionality with a single annotation and then instruct the component to utilize it.And now you have access to workflow, data validation, queues, bulk processing, reporting, dashboards much more.

Below are the features which tell you, why use Lightning and not other JS Framework?

  1. Lightning is NATIVE to Salesforce.
  2. INTEGRATED with Salesforce1.
  3. Commercial AppExchange
  4. Support OTHER JavaScript frameworks.
  6. EXTENDABLE and Resuable across apps and orgs.
  7. Encapsulated markup, logic and style.
  8. Responsive UI
  9. Loose coupling with a publish/subscribe eventing model.

Will Lightning applications and components replace other JS Frameworks? May be but time will tell. Should you get started building Lightning components now? Absolutely Yes!!!  🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s