The difference between the Kendo UI web interface and the Kendo user interface for ASP.NET for MVC

When creating an MVC project through Visual Studio, views are created with ".cshtml" files.

KendoUI server Wrappers have a model in the view, while KendoUI Web not only does not have a model, but there are no “.cshtml” files; HTML only. HTML seems to just point to a data source for reengineering / updating data, while KendoUI server Wrappers need a model to go to a controller for operations of the same type.

What is the difference between the two? I just don’t understand the concept of KendoUI Web and how it works. As for adaptive rendering, where you create multiple copies of your ".cshtml" files to render on a specific device. How is this achieved with KendoUI Web?

It also appears that you can use jQuery using the selector for the KendoUI Web toolkit (whose name has not changed), unlike the KendoUI server wrappers. You just don’t know what jQuery selectors are with KendoUI server wrappers.

It is very difficult for me to program against KendoUI Server Wrappers (although they should be easier and faster to implement) due to various events that you will need for a certain extension for processing, and not knowing that the selector names are located. This is not like the KendoUI Web toolkit.

+6
source share
3 answers

Simply put, Kendo UI Web is open to any framework that can support javascript / jQuery , but Kendo UI Server Wrappers / Kendo UI ASP.NET for MVC > for ASP.NET MVC projects.

Working with the Kendo website will require a lot of additional coding and processing, while the MVC version is more convenient for developers and easy to maintain. If you are working on ASP.NET MVC projects, you can easily do your coding with server wrappers.

The Kendo UI website is free to use, while the server shell (Kendo user interface for ASP.NET MVC) requires a paid license for each developer.

A simple example of the code difference for a kendo grid is as follows:

with server wrappers

 @model IEnumerable<Kendo.Mvc.Examples.Models.ProductViewModel> @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.ProductID).Groupable(false); columns.Bound(p => p.ProductName); columns.Bound(p => p.UnitPrice); columns.Bound(p => p.UnitsInStock); }) .Groupable() .Pageable() .Sortable() .Scrollable() .Filterable() .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("Products_Read", "Grid")) ) ) 

with Kendo web interface

 <script> $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { data: createRandomData(50), pageSize: 10 }, groupable: true, sortable: true, pageable: { refresh: true, pageSizes: true }, columns: [ { field: "FirstName", width: 90, title: "First Name" } , { field: "LastName", width: 90, title: "Last Name" } , { width: 100, field: "City" } , { field: "Title" } , { field: "BirthDate", title: "Birth Date", template: '#= kendo.toString(BirthDate,"dd MMMM yyyy") #' } , { width: 50, field: "Age" } ] }); }); </script> 

You can check the render grid here .

Learn more about server wrappers and Kendo UI Web .

+16
source

Well, Habo said all this, basically. Server wrappers are great for those who (like me) like to be "lazy" when coding. I prefer fluently how to do things with wrappers, as opposed to the pure javascript method.

However, you should keep in mind that KendoUI MVC Wrappers are not a silver bullet. If you don't know your way around javascript, you may be up to date on what can be done with the KendoUI map.

For me, I found a balance between using shells and javascript (for example, using "events") to do more "advanced" things. :)

+1
source

I know this is a pretty old question, but I think my answer will add value (as it contains updated information).

The Telerik documentation contains this page , which explains the comparison between Kendo-UI and its server-side observers (especially ASP.NET MVC wrappers) pretty well.

In addition, with regard to the name of the selectors, in fact, the wrappers require a name (which will be displayed as the id attribute of the element). The Telerik documentation and forum also have some CSS selectors necessary for you to play with CSS where you need it. You just need to make it difficult enough. For example, here is a page where you can find a CSS selector to change the behavior of Kendo Grid headers.

Hope this helps

0
source

Source: https://habr.com/ru/post/955728/


All Articles