Stephen Byrne
Stephen Byrne

Reputation: 7495

Kendo MVC Dynamic Linq extensions

I've been trialling the Kendo MVC helper framework for a bit now (specifically to work with the Grid which I have indirectly bound to a database via Entity Framework) and although it's very cool I have run into a couple of problems/concerns I'm, hoping someone here will be able to help with.

Most all of the examples I see on the Kendo site show the power of the ToDataSourceResult IQueryable extension method being run directly from a controller, which in the system we're building isn't going to fly - we need to have a clear decoupling of the controller and service/dal/ef layers. This means that these layers are going to have to have a dependency on kendo.mvc.dll which is a concern for the architects because it is tightly coupling us to staying with Kendo throughout the lifecycle of the product.

Getting access to the actual raw Expressions generated by the Dynamic Linq extensions in the Kendo dll would solve my problem because I would be able to take in the DataSourceRequest, get various collections of Expressions (Sort,Filter, Group, etc) and pass them down into my business layers without those layers having any knowledge of Kendo, execute them and then package up the results they return into a DataSourceResult.

This way, if halfway through the project the client-side framework changes, all I'll need to worry about is how to generate expressions for the new framework, and won't need to touch my lower layers at all.

Does anyone know if this is possible at all? From what I can make out, all of the expression builders in the Kendo.Mvc.Infrastructure.* namespace are internal or private...

Upvotes: 3

Views: 2451

Answers (2)

daniel
daniel

Reputation: 761

we are using this sentences to retrieve the Expression that a IFilterDescription encapsulate: Kendo.Mvc.ExpressionBuilder.Expression(request.Filters);

Upvotes: 1

Trey Gramann
Trey Gramann

Reputation: 2004

The Kendo examples are just the fastest simplest way to show off their product - we tell our new developers not to use them as a reference.

We have our Presentation layer split up into 3 projects Web (View), Controllers, and Models (applied to View which we call ViewModels but not to be confused with MVVM). The Kendo dll is only a reference in the Web and Controller. We then have a Presentation service that connects to Multiple projects in the business layer (where we have Models and can apply DataAnnotation) and the Data Provider layer - everything is dependency injected and IoC - and the Kendo dll is not to be found anywhere in these.

We also have UI Automation testing with the FREE Telerik Testing Framework that has a translator for Kendo as well.

So with a very long winded answer, Yes.

Out team of 15-20 developers has been able to develop some large Web based systems very rapidly using Kendo. We recommend it highly.

Hope this helps.

Upvotes: 0

Related Questions