This is a migrated thread and some comments may be shown as answers.
Loading Kendo UI through composer
5 Answers 337 Views
This is a migrated thread and some comments may be shown as answers.
Rinck
Top achievements
Rank 1
Rinck asked on 19 Oct 2013, 09:59 PM
This is not so much a question, but more tip for those looking to do the same.

I'm usiing Kendo + PHP Wrappers in various projects and for all my new projects I have started using composer as an easy way to reuse code and pull in external libraries. The only frustration I had was that I couldn't use this method to pull in the Kendo library.

So I decided to create my own little composer package, which is basically just a wrapper for the entire Kendo library. It contains both the PHP files and the js/css files.

For my most recent project I am using the Laravel 4 Framework (awesome, check it out: laravel.com), so my package is focused on Laravel, but really it should work for all frameworks (no laravel dependencies).

Since Kendo PHP is not open source, I could not simply create a github project and be done with it. Instead I set up a private Composer repository using Satis, using this tutorial: composer/satis tutorial

That was fairly straightforward and easy to do. To host the library, I created a private subversion repository on my private server (I'll be migrating everything to git once I have more time...) which contains the kendo js, css and php files.

The next step was to make sure that when I include the Kendo Composer package, the Composer Autoload function works as expected. To make that work, I had to add the following section to my composer.json file:
"autoload": {
    "classmap": [
        "src/Kendoui/lib"
    ]
}
This will ensure that whenever composer updates or installs, it scans the entire library folder and generates a classmap for autoloading. You won't have to manually include any more classes and when the Kendo library is updated, a simple composer update should do the trick for you.

I just thought I'd share this with everyone in case people are trying to do the same. If you would like to get a similar setup and run into issues, I'm more than happy to help! :)

Regards,
Rinck

5 Answers, 1 is accepted

Sort by
0
Paolo
Top achievements
Rank 1
answered on 02 Feb 2016, 03:16 PM

I use Laravel 5, but found easier to simply join it with kendo UI than with kendo ui for php.

Do you have any suggestions about the best practices to use kendo ui php with laravel 5 without messing up mvc pattern?

 Thanks!

0
Rinck
Top achievements
Rank 1
answered on 02 Feb 2016, 03:26 PM

Hey Paolo,

 I haven't gotten around to really playing with L5, so I can't help you there. It has been on my todo list for a long time, but I need to find time somewhere first! :-) I'll keep you updated when I do get around to updating to L5 and integrating Kendo UI.

Regards,
Rinck

0
Paolo
Top achievements
Rank 1
answered on 02 Feb 2016, 07:59 PM

Thanks for your reply Rinck!

 For HTML5/JS Kendo UI there are no problems because HTML5 Kendo are javascript and css libraries so it's simply a matter of linking files in blade views.

I'll also check how to integrate Kendo UI for PHP into Laravel. I think that findind a good practice in this case is more complex.

Kind regards.

0
Rajesh
Top achievements
Rank 1
answered on 16 Aug 2020, 07:26 AM
I am also looking for the same.
0
Martin
Telerik team
answered on 18 Aug 2020, 04:16 PM

Hello Rajesh,

In general, the Telerik UI for PHP suite has not been officially tested and designed with Laravel integration in mind. This does not mean that it is incompatible with Laravel, but I am afraid that we could not provide you with best practices on such integration. 


After researching further, I would suggest you to review this article, where a suggestion approach is shown on how to integrate the Telerik UI for PHP wrappers with Laravel. I hope it will be helpful.

Regards,
Martin
Progress Telerik

Asked by
Rinck
Top achievements
Rank 1
Answers by
Paolo
Top achievements
Rank 1
Rinck
Top achievements
Rank 1
Rajesh
Top achievements
Rank 1
Martin
Telerik team
Share this question
or