FORUM

Single Page Application

1

Hi ,

I want to create a single page application in salesforce. Somebody suggested me to use AngularJS, but I heard that salesforce  recently introduced  lightening components which can be used to build single page applications, I want to work my application seamlessly in desktop as well as in my mobile, please suggest me a better solution.

Thanks in advance.

Adam

0
0



Category: Tags: asked July 23, 2015

10 Answers

5
accepted

Hi Adam,

In salesforce we can use both AngularJS and Lightening Components (to an Extent) to build single page application. Both Approach have its on limitations and advantages . In the case of AngularJS Its have some limitation when we handling huge amount of data. Lightning components are salesforce provided functionality and its will suit  efficiently with any salesforce application. the only problem currently with lightening components is that its is not available in mobile devices. Compared to lightening components AngularJS Application have better performance.

I suggest you to Use AngularJS and do Consider efficiently the case of handling large amount of data.

Regards.

 

Manu KM

 

0
0



3

Yes, We  can use Apex Classes for that, No there is no special Limitation for that, but we do we have to consider the governor limits.

also we can use the visualforce remoting to fetch data from the controller class. Or we can write factory methods in angularJS .

There is also some custom built library’s that we can use something like ngForce etc.

 

0
0



2

Hi,

Yes , There thing to consider in salesforce ,Please reference the  following blog for more about implementing angularJS in salesfore.

http://www.saaspie.com/2015/03/27/developing-simple-application-in-salesforce-using-angular-js/

Regards

Manu

0
0



1

Hi Adam,

You can build single page applications using lightening components. This will be the easy way to create single page applications.

Using Angularjs you can create single page applications in salesforce. There are some javascript libraries available like ngForce using which you can easily access salesforce data. The following links will help you.

https://developer.salesforce.com/blogs/developer-relations/2013/05/angularjs-and-ngforce-more-fun-in-the-javascript-playground.html

http://blog.jeffdouglas.com/2013/06/10/angularjs-and-salesforce-com-tutorial/

0
0



1

Hi Adam,

There are little more things to consider in salesforce for angularJs. Please refer the following blog to know how to develop angularjs application in salesfore in detail.

http://www.saaspie.com/2015/03/27/developing-simple-application-in-salesforce-using-angular-js/

 

Thank you.

Manu

0
0



0

Thanks Manu.

I have a doubt – How do we handle Business logic in AngularJS, we have to use Apex Controller right?. Is there any limitation to use that?

 

0
0



0

Hi Adam,

You can do the business logic in angularjs itself. you just need to call salesforce controller to get the data. you can use visualforce remoting for this.

0
0



0

Hi,

This Is awesome. Thank you guys.

 

0
0



0

Hi ,

I am trying to implement AngularJS in my Salesforce org , but it didn’t works. I referred angular JS own site for the tutorial. Is there anything particular to do with salesforce ?? please help me.

This is my code ,

<apex:page>
<script src=“http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js”></script>
<body>

<div ng-app=“”>
  <p>Name : <input type=“text” ng-model=“name”></p>
  <h1>Hello {{name}}</h1>
</div>

</body>

</apex:page>

But this same code works in my local.

Thanks in advance .

Adam

0
0



Please Login to Answer This Question