This is a migrated thread and some comments may be shown as answers.

Using a service/factory or not in an AngularJS app

5 Answers 47 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
improwise
Top achievements
Rank 1
Iron
Iron
improwise asked on 02 Dec 2015, 05:05 PM
Considering that most Kendo UI controls (via Kendo UI DataSource) has direct support for talking with dataservices server side, is there any general recommendations if one should still use a "general" service/factory to handle data transfers or is it better to just let Kendo UI handle this directly? What would be the pros and cons of respective solution? Is there any best practices available that describes this more in detail?  

5 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 04 Dec 2015, 09:31 AM
Hello Patrik,

The pros of using the build-in Kendo UI transport is that you will receive the functionality out of the box. On the other hand if you define custom DataSource transport that uses AngularJS service/factory to handle data transfers you will have more control on the way client communicates with the server.

Which one you will prefer is a matter of preference and specific requirements.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 04 Dec 2015, 09:41 AM

Hi,

 

Thank you. Are there any special recommendations/considerations you think we should take into account if we decide to build our own implementation. I'm thinking of settings or similar that could affect the performance, security etc of the Kendo UI components and such?

 

0
Petyo
Telerik team
answered on 08 Dec 2015, 09:14 AM

Hello Patrik,

 

there is nothing Kendo UI specific that should affect the framework in this case. Feel free to pick the approach you find most suitable. 

 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 12 Dec 2015, 10:24 AM

Do you have some samples of how to use the Kendo UI Datasource combined with a general AngularJS factory/services? Perhaps using a Kendo UI Grid which I guess is the most commonly used control for stuff like this although I guess it's not much difference in this regard to other Kendo UI controls. 

Are there any obvious drawbacks to not use Kendo UI Datasource directly against the WebAPI? What about authentication?

0
Petyo
Telerik team
answered on 15 Dec 2015, 11:54 AM

Hello Patrik,

 

Check this example. With it, the authentication part should be configured through the $http service. 

 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Data Source
Asked by
improwise
Top achievements
Rank 1
Iron
Iron
Answers by
Alexander Valchev
Telerik team
improwise
Top achievements
Rank 1
Iron
Iron
Petyo
Telerik team
Share this question
or