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

Push Technology Support

6 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 25 Apr 2014, 03:10 PM

We are investigating the use of Kendo to update some of our applications originally developed with Telerik MVC Extensions to be more dynamic.

It appears you have recently updated the DataSource to support SignalR, as shown in the Grid MVC wrapper Demos. It is not however clear from the documentation how far this support goes. In general:

1. What components other than the Grid support SignalR as a data source?

2. Which if any of these support server Push as well as Read?

3. Do any of the DataViz components support SignalR as a source?

4. Can you give us any form of roadmap as to what dynamic update features are to be supported, especially with the Data Viz components and MVC?

Regards

Chris Warren

6 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 29 Apr 2014, 11:49 AM
Hello Christopher,

Basically SignalR support is provided by the DataSource component, it is not a feature of the Grid. And since every widget that is binding relies on the DataSource  you can configure any widget to be used with SingalR. The only specific case to the chart is that you have to explicily create a dataSource object when creating a Chart.

Here is an example that uses the same SingalR service that the Grid uses, you can give a try with separate tabs one with the chart and one with the Grid where you can edit the records that the Chart displays:

http://trykendoui.telerik.com/@pesho/IFAn

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Christopher
Top achievements
Rank 1
answered on 29 Apr 2014, 12:14 PM

Hello Petur

Thank you for the information.

Do you have any examples of this that uses the MVC wrappers. Currently the Chart and other components in the MVC wrappers API  do not appear to use DataSourceBuilder but the ReadOnlyAjaxDataSourceBuilder which supplies the SignalR and Client/Server Read methods but they cause an "Uncaught RangeError: Maximum call stack size exceeded " i.e. an infinite loop in kendo.all.min.js

Also do these examples have the Hub code so it is possible to see the C#/JSON structures that the SignalR Chart methods are expecting.

Regards

Chris


0
Petur Subev
Telerik team
answered on 01 May 2014, 07:55 AM
Hello Christopher,

The Server Side of the SignalR demo is shared in the following code library:

http://www.telerik.com/support/code-library/binding-to-signalr

Regarding the MVC Chart DataSource configuration - it contains options for binding to SignalR

e.g.

@(Html.Kendo().Chart().DataSource(ds=>ds.SignalR().Transport(...

Could you please demonstrate the exception that you have with a small demo so I can run and see what exactly is the case?

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Christopher
Top achievements
Rank 1
answered on 02 May 2014, 10:16 AM
Thank you for the example on the Server side code this is useful for seeing how the model should be used.

I have extracted an example solution which is causing the error and attached it in a zip. I've removed the actual nu-get packages and the KENDO lib/script/content directories (2014.1.415.440) to reduce the size of the zip.

Your MVC example unfortunately stops at the point of the issue. The .Transport is a Kendo.Mvc.UI.Fluent.ReadOnlySignalRDataSourceBuilder and not a Kendo.Mvc.UI.Fluent.SignalRDataSourceBuilder as in the SignalRLocalHub Grid example. This only has Read methods on client and server and no others.

Best Regards

Chris Warren
0
Petur Subev
Telerik team
answered on 06 May 2014, 02:40 PM
Hello Christopher,

I am sorry for the late reply, I was investigating the case. It looks like the problem is that the chart options fail to initialize the dataSource object successfully. I will inform the team about this.

The only work around that I can suggest you is to initialize the dataSource with JavaScript and then set it to the chart.

e.g.

<script>
    var ds = new kendo.data.DataSource({
        "type": "signalr",
        "transport": {
            "signalr": {
                "hub": hub,
                "promise": hubStart,
                "server": {
                    "read": "GetChartValues"
                },
                "client": {
                    "read": "GetChartValues"
                }
            }
        },
        "schema": {
            "model": {
                "id": "Index",
                "fields": {
                    "Index": {
                        "editable": false,
                        "type": "string"
                    },
                    "Value": {
                        "type": "number"
                    }
                }
            }
        },
        "autoSync": true
    });
 
    $(function () {
        $("#chart").data("kendoChart").setDataSource(ds);
    })
        
 
</script>

Another thing that you were missing was specifying the read server method. Check the highlighted in yellow above.

I attached a working modification of your project.

I am sorry for the inconvenience caused.

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
T. Tsonev
Telerik team
answered on 08 May 2014, 03:15 PM
Hi,

The issue has been resolved in the latest internal builds starting from version 2014.1.508. It should be available for download tomorrow.

As a token of gratitude for your involvement your Telerik points have been updated.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Christopher
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Christopher
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or