Over the past number of months, I’ve fielded an enormous number of questions about Kendo UI. In this post, I’d like to answer a question I’ve received about the DataSource component. This question speaks more to the architectural concerns of your application as opposed to the technical aspects of Kendo UI. Nevertheless, it’s a question that warrants some examination.
I am considering moving to Kendo UI but I am discouraged by the examples that I see for connecting to the DataSource component. How can I use existing data from a database in a Kendo UI application?
Coming back to the question posed earlier, if you want to “use existing data from a database in a Kendo UI application” then you need to expose it via HTTP. There are a lot of different ways to do this; your options really do vary wildly, database to database. That stated, I’m a fan of implementing a service layer that can be exposed and consumed by frameworks like Kendo UI. For example, if you’re a .NET developer then you can take advantage of ASP.NET Web API. Many other solutions exist for Java, PHP, and others. The point is that you can have a great deal of control over how your data is provided to consuming clients. Of course, how you chose to implement these endpoints is another topic entirely. For now, know that for Kendo UI, we need some mechanism of accessing your data. Because we’re on the web, that means HTTP.